@midnight-ntwrk/midnight-js-protocol 5.0.0-beta.8 → 5.0.0-beta.9-pre.c78447d3
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 +14 -4
- package/dist/engine.d.ts +33 -2
- package/dist/engine.js +11 -3
- package/dist/engine.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +6 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +78 -46
- package/dist/index.js +57 -56
- package/dist/index.js.map +1 -1
- package/dist/shared/{deploy-D6yyn9P7.js → deploy-HjSaMZEL.js} +159 -140
- package/dist/shared/deploy-HjSaMZEL.js.map +1 -0
- package/package.json +4 -3
- package/dist/shared/deploy-D6yyn9P7.js.map +0 -1
package/README.md
CHANGED
|
@@ -134,7 +134,7 @@ The engine exposes `downConvertForExecution`, `executeCircuit`, `executeConstruc
|
|
|
134
134
|
|
|
135
135
|
`migratedV9ContractState` passed to `wrapKeepStateCall` must be the migrated v9 state **as read from chain**, which is not `rawContractState` above: it is where the deployed operation and its verifier key come from, and the key location the prototype carries is derived from that key. A blank or constructor-built state throws `ComposeFailedError` (code `MIDNIGHT_JS_P_COMPOSE_FAILED`) with `stage` naming which lookup failed and `version` naming the ledger era it was composing for.
|
|
136
136
|
|
|
137
|
-
Circuits with Zswap coin effects run on this leg like any other. The transcript carries `zswapLocalState` — the post-call Zswap local state, decoded into the runtime's public shape — which is what you turn into the transaction's segmented Zswap offer (`zswapStateToSegmentedOffer` in `@midnight-ntwrk/midnight-js-contracts`)
|
|
137
|
+
Circuits with Zswap coin effects run on this leg like any other. The transcript carries `zswapLocalState` — the post-call Zswap local state, decoded into the runtime's public shape — which is what you turn into the transaction's segmented Zswap offer (`zswapStateToSegmentedOffer` in `@midnight-ntwrk/midnight-js-contracts`). You do not hand that offer to `composeCallTx` as ready-made bytes: you hand it a `zswapOffer` factory, which the composer calls back with each call's guaranteed/fallible split once it has drawn it. That split is the fourth argument `zswapStateToSegmentedOffer` routes by — without it every movement lands in the guaranteed segment, and a circuit whose transcript is wholly fallible produces an offer the wallet cannot balance. Omitting the factory altogether leaves you composing a transaction missing the coin movements the circuit recorded.
|
|
138
138
|
|
|
139
139
|
The transcript also carries `partitionContext` — the block, the starting effects and the commitment indices the pre-fork query context recorded while the circuit ran. Pass it on unchanged: a transcript composed without it is partitioned against a context the circuit never ran on, and a circuit that RECEIVED a coin in-contract cannot be partitioned at all, because the index its commitment was registered at lives only in that context. `wrapKeepStateCall` carries it for you; a hand-built call entry has to supply it. A context the target era cannot read throws `ComposeFailedError` with `stage: 'call-partition-context'`.
|
|
140
140
|
|
|
@@ -151,7 +151,17 @@ const era = await loadLedgerEra(versionOfRecord(indexerRecord));
|
|
|
151
151
|
|
|
152
152
|
const state = era.extractState(rawContractState);
|
|
153
153
|
const decoded = era.decodeContractState(rawContractState);
|
|
154
|
-
const
|
|
154
|
+
const { transaction, partitions } = era.composeCallTx({
|
|
155
|
+
calls,
|
|
156
|
+
networkId,
|
|
157
|
+
ttl,
|
|
158
|
+
// Called back ONCE, with one `[guaranteed, fallible]` pair per call, in
|
|
159
|
+
// `calls` order -- cross-contract callees first, the root call last. Route
|
|
160
|
+
// against all of them: a transaction carries one offer per segment, so
|
|
161
|
+
// destructuring the first pair alone would route the whole transaction
|
|
162
|
+
// against a callee's split and drop the root call's.
|
|
163
|
+
zswapOffer: (partitions) => buildSegmentedOfferBytes(partitions)
|
|
164
|
+
});
|
|
155
165
|
const deploy = era.composeDeployTx({ contractState, verifierKeys, networkId, ttl });
|
|
156
166
|
```
|
|
157
167
|
|
|
@@ -160,7 +170,7 @@ const deploy = era.composeDeployTx({ contractState, verifierKeys, networkId, ttl
|
|
|
160
170
|
| `version` | The era this object is bound to — the value that was passed in |
|
|
161
171
|
| `extractState` | Reads the primary state out of a raw contract-state envelope |
|
|
162
172
|
| `decodeContractState` | Reads an envelope into its state plus the entry points it declares, each with its verifier key and that key's hash |
|
|
163
|
-
| `composeCallTx` | Composes an UNPROVEN call transaction and
|
|
173
|
+
| `composeCallTx` | Composes an UNPROVEN call transaction and answers with its bytes plus each call's guaranteed/fallible split |
|
|
164
174
|
| `composeDeployTx` | Composes an UNPROVEN deploy and returns it with the address it will have and the initial state that address came from |
|
|
165
175
|
|
|
166
176
|
Derive the era with `versionOfRecord` or `networkHeadVersion` (see [Version Module](#version-module)) rather than writing the string by hand. An era string that is not `'v8'` or `'v9'` rejects with `UnknownLedgerVersionError`; the offending value is on the error's `requestedVersion` field, not in its message.
|
|
@@ -179,7 +189,7 @@ The same method names mostly mean the same capabilities. One thing the v8 arm re
|
|
|
179
189
|
|
|
180
190
|
- **A call tree.** The v8 arm composes exactly one call. A cross-contract call is a ledger-9-only feature a pre-fork contract cannot emit, so that era has no call tree to express: a `calls` list longer than one throws `ComposeOptionError` with `option: 'calls'` rather than composing the first entry and dropping the rest.
|
|
181
191
|
|
|
182
|
-
**A Zswap offer is not one of them.** Both eras
|
|
192
|
+
**A Zswap offer is not one of them.** Both eras call the `zswapOffer` factory back with the split they resolved and carry the offer it answers with into the transaction; both throw `ComposeOptionError` with `option: 'zswapOffer'` for bytes their own decoder rejects, with the decoder's failure on `cause`. Both read that offer LAST, after the call's unshielded payout has been aggregated, so a call with two faults is refused the same way on either era. A coin-moving call composes on either era.
|
|
183
193
|
|
|
184
194
|
The v8 arm also *requires* `verifierKeys` on `composeDeployTx`, where the v9 arm accepts its omission in one case. The retained deploy leg registers the compiled contract's keys onto the initial state itself, so it always needs the map; omitting it throws `ComposeOptionError` with `option: 'verifierKeys'`. The v9 arm allows the omission only for a state that ALREADY carries its keys, and checks rather than assumes it: a state still declaring a blank-keyed entry point throws the same `ComposeOptionError` with the same `option`. So the two arms agree on every input except one — a pre-keyed state, which deploys as-is on v9 and needs its keys supplied again on v8.
|
|
185
195
|
|
package/dist/engine.d.ts
CHANGED
|
@@ -274,9 +274,26 @@ interface WrapKeepStateCallOptions {
|
|
|
274
274
|
* @see {@link EraSeam}
|
|
275
275
|
*/
|
|
276
276
|
type Ledger8DeployableContractState = Pick<OnchainRuntimeV3.ContractState, 'serialize'>;
|
|
277
|
+
/**
|
|
278
|
+
* A pre-fork signing key, under a name a consumer can write. The retained
|
|
279
|
+
* runtime's own alias, not a mirror of it: the current era's signing key is a
|
|
280
|
+
* different shape, so the two must never be spelled the same way here.
|
|
281
|
+
*/
|
|
282
|
+
type Ledger8SigningKey = OnchainRuntimeV3.SigningKey;
|
|
283
|
+
/**
|
|
284
|
+
* The state a retained constructor hands back, as {@link executeConstructor}
|
|
285
|
+
* uses it: `.serialize()` to cross the era boundary by bytes, and
|
|
286
|
+
* `.maintenanceAuthority` to write the authority the constructor itself leaves
|
|
287
|
+
* unsatisfiable.
|
|
288
|
+
*
|
|
289
|
+
* Wider than {@link Ledger8DeployableContractState} on purpose — the authority
|
|
290
|
+
* is set before the state is ever serialized, so nothing downstream of those
|
|
291
|
+
* bytes needs the member.
|
|
292
|
+
*/
|
|
293
|
+
type Ledger8ConstructedContractState = Pick<OnchainRuntimeV3.ContractState, 'serialize' | 'maintenanceAuthority'>;
|
|
277
294
|
/** What a pre-fork `contract.initialState(constructorContext, ...args)` call returns. */
|
|
278
295
|
interface Ledger8ConstructorResult {
|
|
279
|
-
readonly currentContractState:
|
|
296
|
+
readonly currentContractState: Ledger8ConstructedContractState;
|
|
280
297
|
readonly currentPrivateState: unknown;
|
|
281
298
|
/**
|
|
282
299
|
* The Zswap local state the constructor ended on, still ENCODED. A
|
|
@@ -299,6 +316,13 @@ interface ExecuteConstructorOptions {
|
|
|
299
316
|
readonly args: readonly unknown[];
|
|
300
317
|
readonly privateState: unknown;
|
|
301
318
|
readonly coinPk: string;
|
|
319
|
+
/**
|
|
320
|
+
* The key the deployed contract's maintenance authority is built from. A
|
|
321
|
+
* caller that omits it gets a freshly sampled one, reported back on
|
|
322
|
+
* {@link ConstructorResultPojo.signingKey} — the only copy that will ever
|
|
323
|
+
* exist, so it has to be kept.
|
|
324
|
+
*/
|
|
325
|
+
readonly signingKey?: Ledger8SigningKey;
|
|
302
326
|
}
|
|
303
327
|
/**
|
|
304
328
|
* The result of running a pre-fork constructor: the freshly built contract
|
|
@@ -314,6 +338,13 @@ interface ConstructorResultPojo {
|
|
|
314
338
|
* the outputs for one that does, which is what lets the deploy be balanced.
|
|
315
339
|
*/
|
|
316
340
|
readonly zswapLocalState: ZswapLocalState;
|
|
341
|
+
/**
|
|
342
|
+
* The key the state's maintenance authority was built from — the caller's
|
|
343
|
+
* own when one was supplied, otherwise the sampled one. Reported because a
|
|
344
|
+
* sampled key exists nowhere else: without it the deployment is as
|
|
345
|
+
* unmaintainable as the empty committee the constructor left.
|
|
346
|
+
*/
|
|
347
|
+
readonly signingKey: Ledger8SigningKey;
|
|
317
348
|
}
|
|
318
349
|
|
|
319
350
|
/**
|
|
@@ -364,4 +395,4 @@ interface Ledger8Engine {
|
|
|
364
395
|
declare const createLedger8Engine: () => Promise<Ledger8Engine>;
|
|
365
396
|
|
|
366
397
|
export { createLedger8Engine };
|
|
367
|
-
export type { ConstructorResultPojo, ContractEntryPointPojo, DownConvertedState, ExecuteCircuitOptions, ExecuteConstructorOptions, Ledger8ChargedState, Ledger8DeployableContractState, Ledger8Engine, Ledger8StateValue, TranscriptPojo, WrapKeepStateCallOptions };
|
|
398
|
+
export type { ConstructorResultPojo, ContractEntryPointPojo, DownConvertedState, ExecuteCircuitOptions, ExecuteConstructorOptions, Ledger8ChargedState, Ledger8DeployableContractState, Ledger8Engine, Ledger8SigningKey, Ledger8StateValue, TranscriptPojo, WrapKeepStateCallOptions };
|
package/dist/engine.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ledgerV9 from '@midnightntwrk/ledger-v9';
|
|
2
2
|
import { ComposeOptionError, Ledger8RuntimeInvalidError, DownConvertFailedError, MerkleNotRehashedError, UnknownLedger8AxisError, Ledger8InstanceMismatchError } from './errors.js';
|
|
3
|
-
import { a as assembleCallPrototype, e as executeConstructor } from './shared/deploy-
|
|
3
|
+
import { a as assembleCallPrototype, e as executeConstructor } from './shared/deploy-HjSaMZEL.js';
|
|
4
4
|
import '@midnight-ntwrk/compact-js';
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -104,7 +104,7 @@ const reexpressOperationsForCurrentEra = (entryPoints) => {
|
|
|
104
104
|
*/
|
|
105
105
|
const wrapKeepStateCall = (options) => {
|
|
106
106
|
const { transcript, contractAddress, contractState, ledgerParameters } = options;
|
|
107
|
-
|
|
107
|
+
const { prototype } = assembleCallPrototype(ledgerV9, {
|
|
108
108
|
circuitId: transcript.circuitId,
|
|
109
109
|
contractAddress,
|
|
110
110
|
// The retained execution leg partitions nothing: it always submits the raw
|
|
@@ -123,6 +123,7 @@ const wrapKeepStateCall = (options) => {
|
|
|
123
123
|
stage: 'wrap-call',
|
|
124
124
|
version: 'v9'
|
|
125
125
|
});
|
|
126
|
+
return prototype;
|
|
126
127
|
};
|
|
127
128
|
|
|
128
129
|
/*
|
|
@@ -502,9 +503,16 @@ const createLedger8Engine = async () => {
|
|
|
502
503
|
createCircuitContext: glue.createCircuitContext,
|
|
503
504
|
CostModel: glue.CostModel
|
|
504
505
|
};
|
|
506
|
+
// The authority slice from ocrt3, the context builder from the glue: the
|
|
507
|
+
// same mixing the compact runtime above does, sound for the same reason --
|
|
508
|
+
// the authority is written onto a state the glue built, so the two must be
|
|
509
|
+
// one instance.
|
|
505
510
|
const ledger8ConstructorRuntime = {
|
|
506
511
|
createConstructorContext: glue.createConstructorContext,
|
|
507
|
-
decodeZswapLocalState: glue.decodeZswapLocalState
|
|
512
|
+
decodeZswapLocalState: glue.decodeZswapLocalState,
|
|
513
|
+
sampleSigningKey: ocrt3.sampleSigningKey,
|
|
514
|
+
signatureVerifyingKey: ocrt3.signatureVerifyingKey,
|
|
515
|
+
ContractMaintenanceAuthority: ocrt3.ContractMaintenanceAuthority
|
|
508
516
|
};
|
|
509
517
|
return {
|
|
510
518
|
downConvertForExecution: (state) => downConvertForExecution(state, ledger8CompactRuntime),
|
package/dist/engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sources":["../src/lib/v9/operations.ts","../src/lib/v9/wrap.ts","../src/lib/v8/down-convert.ts","../src/lib/v8/execute.ts","../src/lib/v8/instance-guard.ts","../src/lib/v8/engine.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;AAaG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,gCAAgC,GAAG,CAAC,WAA8C,KAAgB;AAC7G,IAAA,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,aAAa,EAAE;IAC1C,IAAI,UAAU,GAAG,CAAC;AAElB,IAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;;;;;AAKpC,QAAA,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE;YACxC;QACF;AACA,QAAA,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,iBAAiB,EAAE;AAClD,QAAA,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW;QAC9C,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC;QACnD,UAAU,IAAI,CAAC;IACjB;AAEA,IAAA,IAAI,UAAU,KAAK,CAAC,EAAE;AACpB,QAAA,MAAM,IAAI,kBAAkB,CAAC,IAAI,EAAE,eAAe,CAAC;IACrD;AAEA,IAAA,OAAO,KAAK,CAAC,SAAS,EAAE;AAC1B,CAAC;;ACxED;;;;;;;;;;;;;AAaG;AAgCH;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,iBAAiB,GAAG,CAAC,OAAiC,KAAoC;IACrG,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,OAAO;
|
|
1
|
+
{"version":3,"file":"engine.js","sources":["../src/lib/v9/operations.ts","../src/lib/v9/wrap.ts","../src/lib/v8/down-convert.ts","../src/lib/v8/execute.ts","../src/lib/v8/instance-guard.ts","../src/lib/v8/engine.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":";;;;;AAAA;;;;;;;;;;;;;AAaG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,gCAAgC,GAAG,CAAC,WAA8C,KAAgB;AAC7G,IAAA,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,aAAa,EAAE;IAC1C,IAAI,UAAU,GAAG,CAAC;AAElB,IAAA,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE;;;;;AAKpC,QAAA,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE;YACxC;QACF;AACA,QAAA,MAAM,SAAS,GAAG,IAAI,QAAQ,CAAC,iBAAiB,EAAE;AAClD,QAAA,SAAS,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW;QAC9C,KAAK,CAAC,YAAY,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC;QACnD,UAAU,IAAI,CAAC;IACjB;AAEA,IAAA,IAAI,UAAU,KAAK,CAAC,EAAE;AACpB,QAAA,MAAM,IAAI,kBAAkB,CAAC,IAAI,EAAE,eAAe,CAAC;IACrD;AAEA,IAAA,OAAO,KAAK,CAAC,SAAS,EAAE;AAC1B,CAAC;;ACxED;;;;;;;;;;;;;AAaG;AAgCH;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,iBAAiB,GAAG,CAAC,OAAiC,KAAoC;IACrG,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,GAAG,OAAO;AAChF,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,qBAAqB,CAAC,QAAQ,EAAE;QACpD,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,eAAe;;;AAGf,QAAA,UAAU,EAAE;AACV,YAAA,IAAI,EAAE,eAAe;YACrB,QAAQ,EAAE,UAAU,CAAC,gBAA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,YAAmC;IACpE,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtC,OAAO,yBAAyB,CAAC;QACjC,OAAO,oCAAoC;AAC5C,KAAA,CAAC;IAEF,2BAA2B,CAAC,oBAAoB,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC;;;;AAKxF,IAAA,MAAM,qBAAqB,GAA0B;QACnD,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,YAAY,EAAE,IAAI,CAAC;KACpB;AACD,IAAA,MAAM,uBAAuB,GAA4B;QACvD,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;QACjD,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;QAC/C,SAAS,EAAE,IAAI,CAAC;KACjB;;;;;AAKD,IAAA,MAAM,yBAAyB,GAA8B;QAC3D,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;QACvD,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;QACjD,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;QAClD,4BAA4B,EAAE,KAAK,CAAC;KACrC;IAED,OAAO;QACL,uBAAuB,EAAE,CAAC,KAAK,KAAK,uBAAuB,CAAC,KAAK,EAAE,qBAAqB,CAAC;QACzF,cAAc,EAAE,CAAC,OAAO,KAAK,cAAc,CAAC,OAAO,EAAE,uBAAuB,CAAC;QAC7E,iBAAiB;QACjB,gCAAgC;QAChC,kBAAkB,EAAE,CAAC,OAAO,KAAK,kBAAkB,CAAC,OAAO,EAAE,yBAAyB;KACvF;AACH;;;;"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -316,7 +316,7 @@ declare class ComposeFailedError extends Error {
|
|
|
316
316
|
* @see {@link ComposeRefusalOrder}
|
|
317
317
|
* @see {@link VerifierKeys}
|
|
318
318
|
*/
|
|
319
|
-
type ComposeOption = 'calls' | 'contractState' | 'ledgerParameters' | 'networkId' | 'ttl' | 'verifierKeys' | 'zswapOffer';
|
|
319
|
+
type ComposeOption = 'calls' | 'contractState' | 'ledgerParameters' | 'networkId' | 'signingKey' | 'ttl' | 'verifierKeys' | 'zswapOffer';
|
|
320
320
|
/**
|
|
321
321
|
* Thrown by the composition legs when one of their options cannot be used at
|
|
322
322
|
* all, as opposed to {@link ComposeFailedError}, which reports a circuit whose
|
package/dist/errors.js
CHANGED
|
@@ -375,6 +375,12 @@ class ComposeOptionError extends Error {
|
|
|
375
375
|
ttl: () => 'Refusing to compose a transaction with an invalid time-to-live. An unparseable Date is recorded by ' +
|
|
376
376
|
'the ledger as the Unix epoch, producing a transaction that has already expired. Pass a valid future ' +
|
|
377
377
|
'instant as `ttl`.',
|
|
378
|
+
signingKey: (version) => `Refusing to run a ${version}-era constructor with a malformed \`signingKey\`. The key builds the ` +
|
|
379
|
+
"deployed contract's maintenance authority, and the runtime reads it as 32 bytes written in hex - so " +
|
|
380
|
+
'pass exactly 64 hexadecimal characters, which is what that era\'s `sampleSigningKey` produces. The ' +
|
|
381
|
+
'runtime itself reports a malformed key as `failed to fill whole buffer` or ' +
|
|
382
|
+
"`Invalid character 'z' at position 0`, naming neither the option nor the era. The key is not " +
|
|
383
|
+
'rendered here: it is a secret, and on the sampled path the only copy that will exist.',
|
|
378
384
|
calls: (version) => `Refusing to compose a ${version} call transaction from this call list: the era can compose exactly ` +
|
|
379
385
|
'one call, and composing only the first would silently drop the rest. A cross-contract call is a ' +
|
|
380
386
|
'ledger-9-only feature a pre-fork contract cannot emit, so this era has no call tree to express — ' +
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../src/errors.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;;;;;;;;;AAaG;AAIH;;;;;;AAMG;AACI,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC;AAChD,IAAA,6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ACxG;IACH;;IAGA,OAAO,QAAQ,CAAC,UAAkB,EAAA;AAChC,QAAA,OAAO,IAAI,2BAA2B,CACpC,CAAA,oBAAA,EAAuB,UAAU,CAAA,2CAAA,CAA6C;YAC5E,CAAA,CAAA,EAAI,sBAAsB,CAAA,yCAAA,CAA2C,CACxE;IACH;AACD;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -371,7 +371,7 @@ declare class ComposeFailedError extends Error {
|
|
|
371
371
|
* @see {@link ComposeRefusalOrder}
|
|
372
372
|
* @see {@link VerifierKeys}
|
|
373
373
|
*/
|
|
374
|
-
type ComposeOption = 'calls' | 'contractState' | 'ledgerParameters' | 'networkId' | 'ttl' | 'verifierKeys' | 'zswapOffer';
|
|
374
|
+
type ComposeOption = 'calls' | 'contractState' | 'ledgerParameters' | 'networkId' | 'signingKey' | 'ttl' | 'verifierKeys' | 'zswapOffer';
|
|
375
375
|
/**
|
|
376
376
|
* Thrown by the composition legs when one of their options cannot be used at
|
|
377
377
|
* all, as opposed to {@link ComposeFailedError}, which reports a circuit whose
|
|
@@ -602,26 +602,22 @@ type PartitionedCallTranscript = [
|
|
|
602
602
|
Transcript<AlignedValue$1> | undefined
|
|
603
603
|
];
|
|
604
604
|
/**
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
605
|
+
* Builds the transaction's Zswap offers once the composer holds every call's
|
|
606
|
+
* partition, in `calls` order. Returns serialized offer bytes per segment; an
|
|
607
|
+
* absent member is the normal shape of a segment that moves no shielded coin.
|
|
608
|
+
*
|
|
609
|
+
* A function rather than ready-made bytes because a coin has to be routed into
|
|
610
|
+
* the segment its movement belongs to, and the segment boundary is not known
|
|
611
|
+
* until the transcripts are split -- which happens inside the composer. There
|
|
612
|
+
* is deliberately no way to supply an offer without being handed the partition
|
|
613
|
+
* it must be routed against.
|
|
614
|
+
*
|
|
615
|
+
* @see {@link ComposeRefusalOrder}
|
|
608
616
|
*/
|
|
609
|
-
|
|
610
|
-
readonly
|
|
611
|
-
readonly
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* The chain's own serialized ledger parameters at the block this call is
|
|
615
|
-
* built against, or {@link INITIAL_LEDGER_PARAMETERS} to partition against
|
|
616
|
-
* the era's initial cost model instead.
|
|
617
|
-
*
|
|
618
|
-
* Required, exactly as on `ComposeCallEntry`. The partitioner runs on this
|
|
619
|
-
* path too, so an optional field here would reopen the silent
|
|
620
|
-
* wrong-cost-model fallback that {@link LedgerParametersOption} exists to
|
|
621
|
-
* close.
|
|
622
|
-
*/
|
|
623
|
-
readonly ledgerParameters: LedgerParametersOption;
|
|
624
|
-
}
|
|
617
|
+
type ZswapOfferFactory = (partitions: readonly PartitionedCallTranscript[]) => {
|
|
618
|
+
readonly guaranteed?: Uint8Array;
|
|
619
|
+
readonly fallible?: Uint8Array;
|
|
620
|
+
};
|
|
625
621
|
/**
|
|
626
622
|
* One contract call in a call transaction.
|
|
627
623
|
*
|
|
@@ -661,10 +657,12 @@ interface ComposeCallEntry {
|
|
|
661
657
|
* `calls` is in execution-trace order: cross-contract callees first, the root
|
|
662
658
|
* call last. A circuit with no cross-contract calls has a single entry.
|
|
663
659
|
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
660
|
+
* `zswapOffer` is called back once every call has been assembled, with the
|
|
661
|
+
* partitions to route against; omitting it composes a transaction with no
|
|
662
|
+
* shielded offer. `networkId` and `ttl` carry the caller's policy decisions —
|
|
663
|
+
* which network, how long the transaction lives.
|
|
667
664
|
*
|
|
665
|
+
* @see {@link ZswapOfferFactory}
|
|
668
666
|
* @see {@link ComposeRefusalOrder} for when the envelope options are checked.
|
|
669
667
|
* @see {@link EraSeam}
|
|
670
668
|
*/
|
|
@@ -672,8 +670,22 @@ interface ComposeCallOptions {
|
|
|
672
670
|
readonly calls: readonly ComposeCallEntry[];
|
|
673
671
|
readonly networkId: string;
|
|
674
672
|
readonly ttl: Date;
|
|
675
|
-
readonly
|
|
676
|
-
|
|
673
|
+
readonly zswapOffer?: ZswapOfferFactory;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* What a composed call transaction answers with: the serialized UNPROVEN
|
|
677
|
+
* transaction, and the partition each call was split into, in `calls` order.
|
|
678
|
+
*
|
|
679
|
+
* The partitions are returned rather than left inside the composer because a
|
|
680
|
+
* caller that has to report what a call recorded per segment would otherwise
|
|
681
|
+
* have to split the same transcript a second time, and nothing would notice if
|
|
682
|
+
* the two answers stopped agreeing.
|
|
683
|
+
*
|
|
684
|
+
* @see {@link EraSeam}
|
|
685
|
+
*/
|
|
686
|
+
interface ComposeCallResultPojo {
|
|
687
|
+
readonly transaction: Uint8Array;
|
|
688
|
+
readonly partitions: readonly PartitionedCallTranscript[];
|
|
677
689
|
}
|
|
678
690
|
/**
|
|
679
691
|
* Everything a deploy transaction needs.
|
|
@@ -808,8 +820,14 @@ interface LedgerEra {
|
|
|
808
820
|
* contract cannot emit. The refusal is raised, never worked around. A Zswap
|
|
809
821
|
* offer is NOT refused on either era.
|
|
810
822
|
*
|
|
823
|
+
* A call's Zswap offer is supplied as a factory rather than as ready-made
|
|
824
|
+
* bytes: a coin has to be routed into the segment its movement belongs to,
|
|
825
|
+
* and the segment boundary is not known until this method has split the
|
|
826
|
+
* transcripts. The factory is handed that split, and the same split comes
|
|
827
|
+
* back on the result.
|
|
828
|
+
*
|
|
811
829
|
* @param options The calls to compose and the transaction-wide envelope.
|
|
812
|
-
* @returns The serialized UNPROVEN transaction.
|
|
830
|
+
* @returns The serialized UNPROVEN transaction and each call's partition.
|
|
813
831
|
* @throws ComposeOptionError if an option is unusable on this era — an
|
|
814
832
|
* empty `networkId`, an invalid `ttl`, undecodable offer or state bytes, or
|
|
815
833
|
* a call tree with more than one entry on the retained pre-fork era.
|
|
@@ -818,7 +836,7 @@ interface LedgerEra {
|
|
|
818
836
|
* @see {@link ComposeRefusalOrder}
|
|
819
837
|
* @see {@link EraSeam}
|
|
820
838
|
*/
|
|
821
|
-
composeCallTx(options: ComposeCallOptions):
|
|
839
|
+
composeCallTx(options: ComposeCallOptions): ComposeCallResultPojo;
|
|
822
840
|
/**
|
|
823
841
|
* Composes an UNPROVEN deploy transaction and returns it together with the
|
|
824
842
|
* address the deployment will have and the initial state that address was
|
|
@@ -842,23 +860,6 @@ interface LedgerEra {
|
|
|
842
860
|
* @see {@link ComposeRefusalOrder}
|
|
843
861
|
*/
|
|
844
862
|
composeDeployTx(options: ComposeDeployOptions): DeployResultPojo;
|
|
845
|
-
/**
|
|
846
|
-
* Resolves one call's guaranteed/fallible transcript pair, without composing
|
|
847
|
-
* a transaction.
|
|
848
|
-
*
|
|
849
|
-
* PROTOTYPE SEAM. A caller that has to route a Zswap coin into the right
|
|
850
|
-
* segment needs the partition BEFORE it builds the offer, and `composeCallTx`
|
|
851
|
-
* computes the partition only after the offer has been handed to it as an
|
|
852
|
-
* option. Without this the retained-era pipeline places every coin movement
|
|
853
|
-
* in the guaranteed segment and the wallet cannot balance the result.
|
|
854
|
-
*
|
|
855
|
-
* @param options The call's transcript source, address, circuit and the
|
|
856
|
-
* chain's own serialized ledger parameters.
|
|
857
|
-
* @returns The `[guaranteed, fallible]` pair, either member possibly absent.
|
|
858
|
-
* @throws ComposeFailedError, ComposeOptionError as `composeCallTx` does for
|
|
859
|
-
* the same inputs.
|
|
860
|
-
*/
|
|
861
|
-
partitionCallTranscript(options: EraPartitionCallOptions): PartitionedCallTranscript;
|
|
862
863
|
}
|
|
863
864
|
|
|
864
865
|
/**
|
|
@@ -1188,9 +1189,26 @@ interface WrapKeepStateCallOptions {
|
|
|
1188
1189
|
* @see {@link EraSeam}
|
|
1189
1190
|
*/
|
|
1190
1191
|
type Ledger8DeployableContractState = Pick<OnchainRuntimeV3.ContractState, 'serialize'>;
|
|
1192
|
+
/**
|
|
1193
|
+
* A pre-fork signing key, under a name a consumer can write. The retained
|
|
1194
|
+
* runtime's own alias, not a mirror of it: the current era's signing key is a
|
|
1195
|
+
* different shape, so the two must never be spelled the same way here.
|
|
1196
|
+
*/
|
|
1197
|
+
type Ledger8SigningKey = OnchainRuntimeV3.SigningKey;
|
|
1198
|
+
/**
|
|
1199
|
+
* The state a retained constructor hands back, as {@link executeConstructor}
|
|
1200
|
+
* uses it: `.serialize()` to cross the era boundary by bytes, and
|
|
1201
|
+
* `.maintenanceAuthority` to write the authority the constructor itself leaves
|
|
1202
|
+
* unsatisfiable.
|
|
1203
|
+
*
|
|
1204
|
+
* Wider than {@link Ledger8DeployableContractState} on purpose — the authority
|
|
1205
|
+
* is set before the state is ever serialized, so nothing downstream of those
|
|
1206
|
+
* bytes needs the member.
|
|
1207
|
+
*/
|
|
1208
|
+
type Ledger8ConstructedContractState = Pick<OnchainRuntimeV3.ContractState, 'serialize' | 'maintenanceAuthority'>;
|
|
1191
1209
|
/** What a pre-fork `contract.initialState(constructorContext, ...args)` call returns. */
|
|
1192
1210
|
interface Ledger8ConstructorResult {
|
|
1193
|
-
readonly currentContractState:
|
|
1211
|
+
readonly currentContractState: Ledger8ConstructedContractState;
|
|
1194
1212
|
readonly currentPrivateState: unknown;
|
|
1195
1213
|
/**
|
|
1196
1214
|
* The Zswap local state the constructor ended on, still ENCODED. A
|
|
@@ -1213,6 +1231,13 @@ interface ExecuteConstructorOptions {
|
|
|
1213
1231
|
readonly args: readonly unknown[];
|
|
1214
1232
|
readonly privateState: unknown;
|
|
1215
1233
|
readonly coinPk: string;
|
|
1234
|
+
/**
|
|
1235
|
+
* The key the deployed contract's maintenance authority is built from. A
|
|
1236
|
+
* caller that omits it gets a freshly sampled one, reported back on
|
|
1237
|
+
* {@link ConstructorResultPojo.signingKey} — the only copy that will ever
|
|
1238
|
+
* exist, so it has to be kept.
|
|
1239
|
+
*/
|
|
1240
|
+
readonly signingKey?: Ledger8SigningKey;
|
|
1216
1241
|
}
|
|
1217
1242
|
/**
|
|
1218
1243
|
* The result of running a pre-fork constructor: the freshly built contract
|
|
@@ -1228,6 +1253,13 @@ interface ConstructorResultPojo {
|
|
|
1228
1253
|
* the outputs for one that does, which is what lets the deploy be balanced.
|
|
1229
1254
|
*/
|
|
1230
1255
|
readonly zswapLocalState: ZswapLocalState;
|
|
1256
|
+
/**
|
|
1257
|
+
* The key the state's maintenance authority was built from — the caller's
|
|
1258
|
+
* own when one was supplied, otherwise the sampled one. Reported because a
|
|
1259
|
+
* sampled key exists nowhere else: without it the deployment is as
|
|
1260
|
+
* unmaintainable as the empty committee the constructor left.
|
|
1261
|
+
*/
|
|
1262
|
+
readonly signingKey: Ledger8SigningKey;
|
|
1231
1263
|
}
|
|
1232
1264
|
|
|
1233
1265
|
/**
|
|
@@ -1283,4 +1315,4 @@ interface Ledger8Engine {
|
|
|
1283
1315
|
declare const loadLedger8Engine: () => Promise<Ledger8Engine>;
|
|
1284
1316
|
|
|
1285
1317
|
export { CURRENT_LEDGER_VERSION, ComposeFailedError, ComposeOptionError, DownConvertFailedError, INITIAL_LEDGER_PARAMETERS, LEDGER_VERSIONS, Ledger8InstanceMismatchError, Ledger8RuntimeInvalidError, Ledger8RuntimeMissingError, MerkleNotRehashedError, NO_CIRCUIT, PROTOCOL_ERROR_CODES, PayloadNotATransactionError, RETAINED_LEDGER_VERSIONS, StateDecodeFailedError, TRANSACTION_TAG_PREFIX, UnknownLedger8AxisError, UnknownLedgerVersionError, UnknownProtocolVersionError, loadLedger8, loadLedger8Engine, loadLedgerEra, networkHeadVersion, protocolVersionToLedger, versionOfRecord };
|
|
1286
|
-
export type { CallTranscriptSource, ComposeCallEntry, ComposeCallOptions, ComposeDeployOptions, ComposeOption, ComposeStage, ConstructorResultPojo, ContractEntryPointPojo, ContractStatePojo, CurrentLedgerVersion, DeployResultPojo, DownConvertStage, DownConvertedState,
|
|
1318
|
+
export type { CallTranscriptSource, ComposeCallEntry, ComposeCallOptions, ComposeCallResultPojo, ComposeDeployOptions, ComposeOption, ComposeStage, ConstructorResultPojo, ContractEntryPointPojo, ContractStatePojo, CurrentLedgerVersion, DeployResultPojo, DownConvertStage, DownConvertedState, ExecuteCircuitOptions, ExecuteConstructorOptions, Ledger8ChargedState, Ledger8DeployableContractState, Ledger8Engine, Ledger8InstanceAxis, Ledger8SigningKey, Ledger8StateValue, LedgerEra, LedgerParametersOption, LedgerVersion, PartitionContext, PartitionedCallTranscript, ProtocolErrorCode, ProtocolV8, ProtocolVersionSource, ProtocolVersionUnknownReason, RetainedEraSubpath, RetainedLedgerVersion, TranscriptPojo, VersionResolutionPath, VersionedRecord, WrapKeepStateCallOptions, ZswapOfferFactory };
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ export { MerkleNotRehashedError, PROTOCOL_ERROR_CODES, PayloadNotATransactionErr
|
|
|
3
3
|
import * as ledgerV9 from '@midnightntwrk/ledger-v9';
|
|
4
4
|
import { ContractState } from '@midnightntwrk/ledger-v9';
|
|
5
5
|
export { ledgerV9 as ledger };
|
|
6
|
-
import { b as entryPointName, c as assertComposeEnvelope, a as assembleCallPrototype, d as composeV8DeployTx, r as resolveVerifierKeyRegistrations, p as partitionCallTranscript } from './shared/deploy-D6yyn9P7.js';
|
|
7
|
-
export { I as INITIAL_LEDGER_PARAMETERS } from './shared/deploy-D6yyn9P7.js';
|
|
8
6
|
import { hashVerifierKey } from '@midnight-ntwrk/compact-js';
|
|
9
7
|
import * as compactJs from '@midnight-ntwrk/compact-js';
|
|
10
8
|
export { compactJs };
|
|
9
|
+
import { b as entryPointName, c as assertComposeEnvelope, a as assembleCallPrototype, d as composeV8DeployTx, r as resolveVerifierKeyRegistrations } from './shared/deploy-HjSaMZEL.js';
|
|
10
|
+
export { I as INITIAL_LEDGER_PARAMETERS } from './shared/deploy-HjSaMZEL.js';
|
|
11
11
|
import { l as loadLedger8 } from './shared/load-C0TZnEd2.js';
|
|
12
12
|
export { CURRENT_LEDGER_VERSION, LEDGER_VERSIONS, RETAINED_LEDGER_VERSIONS, networkHeadVersion, protocolVersionToLedger, versionOfRecord } from './version.js';
|
|
13
13
|
import * as compactRuntime from '@midnight-ntwrk/compact-runtime';
|
|
@@ -181,6 +181,24 @@ const aggregateUnshieldedOffers = (calls, ledger, version) => {
|
|
|
181
181
|
* See the License for the specific language governing permissions and
|
|
182
182
|
* limitations under the License.
|
|
183
183
|
*/
|
|
184
|
+
/**
|
|
185
|
+
* Reads a serialized Zswap offer into the v8 era, reporting bytes this era
|
|
186
|
+
* cannot decode as {@link ComposeOptionError}. An absent offer is the normal
|
|
187
|
+
* shape of a call that moved no shielded coins, and stays absent.
|
|
188
|
+
*
|
|
189
|
+
* @see {@link ComposeRefusalOrder}
|
|
190
|
+
*/
|
|
191
|
+
const readZswapOffer$1 = (raw, v8) => {
|
|
192
|
+
if (raw === undefined) {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
try {
|
|
196
|
+
return v8.ZswapOffer.deserialize('pre-proof', raw);
|
|
197
|
+
}
|
|
198
|
+
catch (cause) {
|
|
199
|
+
throw new ComposeOptionError('v8', 'zswapOffer', cause);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
184
202
|
/**
|
|
185
203
|
* Composes a v8-native call transaction from one call's inputs and immediately
|
|
186
204
|
* serializes it. The call prototype comes from {@link assembleCallPrototype}
|
|
@@ -193,9 +211,9 @@ const aggregateUnshieldedOffers = (calls, ledger, version) => {
|
|
|
193
211
|
* @param options The call's inputs, offers and envelope options.
|
|
194
212
|
* @param v8 The v8 ledger module, as handed over by `loadLedger8`
|
|
195
213
|
* (`./load.ts`).
|
|
196
|
-
* @returns The UNPROVEN, serialized call transaction.
|
|
197
|
-
* @throws ComposeOptionError If `networkId` is empty
|
|
198
|
-
* instant.
|
|
214
|
+
* @returns The UNPROVEN, serialized call transaction and the call's partition.
|
|
215
|
+
* @throws ComposeOptionError If `networkId` is empty, `ttl` is not a valid
|
|
216
|
+
* instant, or the factory answered with offer bytes this era cannot read.
|
|
199
217
|
* @throws ComposeFailedError If `contractState` has no registered operation for
|
|
200
218
|
* `circuitId` (stage `'call-operation'`), or the operation it does have
|
|
201
219
|
* carries no verifier key (stage `'call-verifier-key'`), plus every stage
|
|
@@ -203,9 +221,9 @@ const aggregateUnshieldedOffers = (calls, ledger, version) => {
|
|
|
203
221
|
* @see {@link ComposeRefusalOrder}
|
|
204
222
|
*/
|
|
205
223
|
const composeV8CallTx = (options, v8) => {
|
|
206
|
-
const { contractAddress, contractState, networkId, ttl,
|
|
224
|
+
const { contractAddress, contractState, networkId, ttl, zswapOffer } = options;
|
|
207
225
|
assertComposeEnvelope(options, 'v8');
|
|
208
|
-
const prototype = assembleCallPrototype(v8, {
|
|
226
|
+
const { prototype, partition } = assembleCallPrototype(v8, {
|
|
209
227
|
circuitId: options.circuitId,
|
|
210
228
|
contractAddress,
|
|
211
229
|
transcript: options.transcript,
|
|
@@ -234,7 +252,15 @@ const composeV8CallTx = (options, v8) => {
|
|
|
234
252
|
if (unshielded.fallible !== undefined) {
|
|
235
253
|
intent.fallibleUnshieldedOffer = unshielded.fallible;
|
|
236
254
|
}
|
|
237
|
-
|
|
255
|
+
// Built only once the call is split, which is the whole point of taking a
|
|
256
|
+
// factory -- see ComposeRefusalOrder.
|
|
257
|
+
const offers = zswapOffer?.([partition]);
|
|
258
|
+
const guaranteedOffer = readZswapOffer$1(offers?.guaranteed, v8);
|
|
259
|
+
const fallibleOffer = readZswapOffer$1(offers?.fallible, v8);
|
|
260
|
+
return {
|
|
261
|
+
transaction: v8.Transaction.fromPartsRandomized(networkId, guaranteedOffer, fallibleOffer, intent).serialize(),
|
|
262
|
+
partitions: [partition]
|
|
263
|
+
};
|
|
238
264
|
};
|
|
239
265
|
|
|
240
266
|
/*
|
|
@@ -264,24 +290,6 @@ const readContractState$1 = (raw, v8) => {
|
|
|
264
290
|
throw new ComposeOptionError('v8', 'contractState', cause);
|
|
265
291
|
}
|
|
266
292
|
};
|
|
267
|
-
/**
|
|
268
|
-
* Reads a serialized Zswap offer into the v8 era, reporting bytes this era
|
|
269
|
-
* cannot decode as {@link ComposeOptionError}. An absent offer is the normal
|
|
270
|
-
* shape of a call that moved no shielded coins, and stays absent.
|
|
271
|
-
*
|
|
272
|
-
* @see {@link ComposeRefusalOrder}
|
|
273
|
-
*/
|
|
274
|
-
const readZswapOffer$1 = (raw, v8) => {
|
|
275
|
-
if (raw === undefined) {
|
|
276
|
-
return undefined;
|
|
277
|
-
}
|
|
278
|
-
try {
|
|
279
|
-
return v8.ZswapOffer.deserialize('pre-proof', raw);
|
|
280
|
-
}
|
|
281
|
-
catch (cause) {
|
|
282
|
-
throw new ComposeOptionError('v8', 'zswapOffer', cause);
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
293
|
/**
|
|
286
294
|
* Maps the era-facade's call options onto the v8-native composition leg
|
|
287
295
|
* (`./compose.ts`).
|
|
@@ -292,7 +300,7 @@ const readZswapOffer$1 = (raw, v8) => {
|
|
|
292
300
|
* @param options The era-facade call options.
|
|
293
301
|
* @param v8 The v8 ledger module, as handed over by `loadLedger8`
|
|
294
302
|
* (`./load.ts`).
|
|
295
|
-
* @returns The UNPROVEN, serialized call transaction.
|
|
303
|
+
* @returns The UNPROVEN, serialized call transaction and the call's partition.
|
|
296
304
|
* @throws ComposeOptionError If an option cannot be used: a malformed envelope
|
|
297
305
|
* option, unreadable offer or contract-state bytes, or more than one entry in
|
|
298
306
|
* `calls`.
|
|
@@ -302,17 +310,13 @@ const readZswapOffer$1 = (raw, v8) => {
|
|
|
302
310
|
* @see {@link EraSeam}
|
|
303
311
|
*/
|
|
304
312
|
const composeEraV8CallTx = (options, v8) => {
|
|
305
|
-
const { calls, networkId, ttl,
|
|
313
|
+
const { calls, networkId, ttl, zswapOffer } = options;
|
|
306
314
|
// Checked here, not left to the inner leg, so both arms refuse in the same
|
|
307
315
|
// order; the re-check in the leg is idempotent -- see ComposeRefusalOrder.
|
|
308
316
|
assertComposeEnvelope(options, 'v8');
|
|
309
317
|
if (calls.length === 0) {
|
|
310
318
|
throw new ComposeFailedError('v8', 'call-empty', NO_CIRCUIT);
|
|
311
319
|
}
|
|
312
|
-
// Both offers are read before anything is composed -- see
|
|
313
|
-
// ComposeRefusalOrder.
|
|
314
|
-
const guaranteedOffer = readZswapOffer$1(guaranteedZswapOffer, v8);
|
|
315
|
-
const fallibleOffer = readZswapOffer$1(fallibleZswapOffer, v8);
|
|
316
320
|
if (calls.length > 1) {
|
|
317
321
|
throw new ComposeOptionError('v8', 'calls');
|
|
318
322
|
}
|
|
@@ -332,8 +336,7 @@ const composeEraV8CallTx = (options, v8) => {
|
|
|
332
336
|
ledgerParameters: call.ledgerParameters,
|
|
333
337
|
networkId,
|
|
334
338
|
ttl,
|
|
335
|
-
|
|
336
|
-
fallibleZswapOffer: fallibleOffer
|
|
339
|
+
zswapOffer
|
|
337
340
|
}, v8);
|
|
338
341
|
};
|
|
339
342
|
/**
|
|
@@ -422,7 +425,7 @@ const readZswapOffer = (raw) => {
|
|
|
422
425
|
* before `.prove()` is ever called.
|
|
423
426
|
*
|
|
424
427
|
* @param options The calls to compose and the transaction-wide envelope.
|
|
425
|
-
* @returns The serialized UNPROVEN transaction.
|
|
428
|
+
* @returns The serialized UNPROVEN transaction and each call's partition.
|
|
426
429
|
* @throws ComposeFailedError if the call list is empty (stage `'call-empty'`)
|
|
427
430
|
* or a call cannot be assembled; `stage` names which step refused it.
|
|
428
431
|
* @throws ComposeOptionError if the network id, the ttl, a Zswap offer or a
|
|
@@ -430,17 +433,15 @@ const readZswapOffer = (raw) => {
|
|
|
430
433
|
* @see {@link ComposeRefusalOrder}
|
|
431
434
|
*/
|
|
432
435
|
const composeV9CallTx = (options) => {
|
|
433
|
-
const { calls, networkId, ttl,
|
|
436
|
+
const { calls, networkId, ttl, zswapOffer } = options;
|
|
434
437
|
assertComposeEnvelope(options, 'v9');
|
|
435
438
|
if (calls.length === 0) {
|
|
436
439
|
throw new ComposeFailedError('v9', 'call-empty', NO_CIRCUIT);
|
|
437
440
|
}
|
|
438
|
-
// Read both offers before composing anything -- see ComposeRefusalOrder.
|
|
439
|
-
const guaranteedOffer = readZswapOffer(guaranteedZswapOffer);
|
|
440
|
-
const fallibleOffer = readZswapOffer(fallibleZswapOffer);
|
|
441
441
|
let intent = ledgerV9.Intent.new(ttl);
|
|
442
|
+
const partitions = [];
|
|
442
443
|
for (const call of calls) {
|
|
443
|
-
|
|
444
|
+
const { prototype, partition } = assembleCallPrototype(ledgerV9, {
|
|
444
445
|
circuitId: call.circuitId,
|
|
445
446
|
contractAddress: call.contractAddress,
|
|
446
447
|
transcript: call.transcript,
|
|
@@ -452,7 +453,9 @@ const composeV9CallTx = (options) => {
|
|
|
452
453
|
operations: readContractState(call.contractState),
|
|
453
454
|
stage: 'call-operation',
|
|
454
455
|
version: 'v9'
|
|
455
|
-
})
|
|
456
|
+
});
|
|
457
|
+
partitions.push(partition);
|
|
458
|
+
intent = intent.addCall(prototype);
|
|
456
459
|
}
|
|
457
460
|
// Read the partitioned pairs back off the intent rather than re-deriving
|
|
458
461
|
// them -- see ComposeRefusalOrder.
|
|
@@ -469,7 +472,17 @@ const composeV9CallTx = (options) => {
|
|
|
469
472
|
if (unshielded.fallible !== undefined) {
|
|
470
473
|
intent.fallibleUnshieldedOffer = unshielded.fallible;
|
|
471
474
|
}
|
|
472
|
-
|
|
475
|
+
// LAST, after the unshielded payout has been aggregated off the assembled
|
|
476
|
+
// intent, because both steps refuse and the arms must refuse in one order --
|
|
477
|
+
// see ComposeRefusalOrder. Built only once every call is split, which is the
|
|
478
|
+
// whole point of taking a factory.
|
|
479
|
+
const offers = zswapOffer?.(partitions);
|
|
480
|
+
const guaranteedOffer = readZswapOffer(offers?.guaranteed);
|
|
481
|
+
const fallibleOffer = readZswapOffer(offers?.fallible);
|
|
482
|
+
return {
|
|
483
|
+
transaction: ledgerV9.Transaction.fromPartsRandomized(networkId, guaranteedOffer, fallibleOffer, intent).serialize(),
|
|
484
|
+
partitions
|
|
485
|
+
};
|
|
473
486
|
};
|
|
474
487
|
/**
|
|
475
488
|
* Registers a verifier key for every entry point the state declares, against
|
|
@@ -671,12 +684,7 @@ const createV9Era = () => {
|
|
|
671
684
|
extractState: (raw) => extractStateWith(raw, 'v9', extractV9EncodedStateValue),
|
|
672
685
|
decodeContractState: (raw) => decodeContractStateWith(raw, 'v9', ledgerV9),
|
|
673
686
|
composeCallTx: composeV9CallTx,
|
|
674
|
-
composeDeployTx: composeV9DeployTx
|
|
675
|
-
partitionCallTranscript: (options) => {
|
|
676
|
-
// See the v8 arm: the assembler's tuple is readonly, the ledger's is not.
|
|
677
|
-
const [guaranteed, fallible] = partitionCallTranscript(ledgerV9, { ...options, version: 'v9' });
|
|
678
|
-
return [guaranteed, fallible];
|
|
679
|
-
}
|
|
687
|
+
composeDeployTx: composeV9DeployTx
|
|
680
688
|
};
|
|
681
689
|
return Object.freeze(era);
|
|
682
690
|
};
|
|
@@ -692,14 +700,7 @@ const createV8Era = async () => {
|
|
|
692
700
|
extractState: (raw) => extractStateWith(raw, 'v8', (bytes) => extractEncodedStateValue(bytes, 'v8', v8.ContractState)),
|
|
693
701
|
decodeContractState: (raw) => decodeContractStateWith(raw, 'v8', v8),
|
|
694
702
|
composeCallTx: (options) => composeEraV8CallTx(options, v8),
|
|
695
|
-
composeDeployTx: (options) => composeEraV8DeployTx(options, v8)
|
|
696
|
-
partitionCallTranscript: (options) => {
|
|
697
|
-
// Copied into a mutable pair rather than handed on: the assembler answers
|
|
698
|
-
// with a readonly tuple, and the ledger's own `PartitionedTranscript` --
|
|
699
|
-
// which is what every consumer of this pair is typed against -- is not.
|
|
700
|
-
const [guaranteed, fallible] = partitionCallTranscript(v8, { ...options, version: 'v8' });
|
|
701
|
-
return [guaranteed, fallible];
|
|
702
|
-
}
|
|
703
|
+
composeDeployTx: (options) => composeEraV8DeployTx(options, v8)
|
|
703
704
|
};
|
|
704
705
|
return Object.freeze(era);
|
|
705
706
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/lib/shared/contract-state.ts","../src/lib/shared/unshielded.ts","../src/lib/v8/compose.ts","../src/lib/v8/adapt.ts","../src/lib/v9/compose.ts","../src/lib/era/envelope.ts","../src/lib/era/load-era.ts","../src/lib/v8/load-engine.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["readContractState","readZswapOffer","LedgerContractStateV9"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;AAaG;AAwEH;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,CAC9B,GAAe,EACf,OAAsB,EACtB,OAA+C,KAC1B;AACrB,IAAA,IAAI;AACF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC;IACrB;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,MAAM,IAAI,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC;IAClD;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,uBAAuB,GAAG,CACrC,GAAe,EACf,OAAsB,EACtB,MAA4B,KACP;AACrB,IAAA,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC;AACrD,QAAA,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,UAAU,KAA4B;;;YAGlF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;AAC/C,YAAA,IAAI,SAAS,KAAK,SAAS,EAAE;gBAC3B,MAAM,IAAI,KAAK,CACb,CAAA,qCAAA,EAAwC,cAAc,CAAC,UAAU,CAAC,CAAA,mCAAA,CAAqC,CACxG;YACH;AACA,YAAA,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS;YACjC,OAAO;AACL,gBAAA,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC;gBACrC,WAAW;AACX,gBAAA,eAAe,EAAE,WAAW,KAAK,SAAS,GAAG,SAAS,GAAG,eAAe,CAAC,WAAW;aACrF;AACH,QAAA,CAAC,CAAC;AAEF,QAAA,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,IA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Y,KAAK,YAAY,CAAC,mBAAmB,EAAE;AACzD,KAAA,KAAK,CAAC,CAAC,KAAc,KAAI;IACxB,aAAa,GAAG,SAAS;AACzB,IAAA,MAAM,KAAK,YAAY,0BAA0B,IAAI,KAAK,YAAY;AACpE,UAAE;UACA,IAAI,0BAA0B,CAAC,SAAS,EAAE,KAAK,CAAC;AACtD,CAAC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/lib/shared/contract-state.ts","../src/lib/shared/unshielded.ts","../src/lib/v8/compose.ts","../src/lib/v8/adapt.ts","../src/lib/v9/compose.ts","../src/lib/era/envelope.ts","../src/lib/era/load-era.ts","../src/lib/v8/load-engine.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["readZswapOffer","readContractState","LedgerContractStateV9"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;AAaG;AAwEH;;;;;;;;;;;;AAYG;AACI,MAAM,gBAAgB,GAAG,CAC9B,GAAe,EACf,OAAsB,EACtB,OAA+C,KAC1B;AACrB,IAAA,IAAI;AACF,QAAA,OAAO,OAAO,CAAC,GAAG,CAAC;IACrB;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,MAAM,IAAI,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC;IAClD;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,uBAAuB,GAAG,CACrC,GAAe,EACf,OAAsB,EACtB,MAA4B,KACP;AACrB,IAAA,IAAI;QACF,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,WAAW,CAAC,GAAG,CAAC;AACrD,QAAA,MAAM,WAAW,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC,UAAU,KAA4B;;;YAGlF,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;AAC/C,YAAA,IAAI,SAAS,KAAK,SAAS,EAAE;gBAC3B,MAAM,IAAI,KAAK,C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D;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACI,MAAM,iBAAiB,GAAG,OAC9B,aAAa,KAAK,OAAO,aAAiB;KACxC,IAAI,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,mBAAmB,EAAE;AACzD,KAAA,KAAK,CAAC,CAAC,KAAc,KAAI;IACxB,aAAa,GAAG,SAAS;AACzB,IAAA,MAAM,KAAK,YAAY,0BAA0B,IAAI,KAAK,YAAY;AACpE,UAAE;UACA,IAAI,0BAA0B,CAAC,SAAS,EAAE,KAAK,CAAC;AACtD,CAAC,CAAC;;;;"}
|
|
@@ -1,6 +1,109 @@
|
|
|
1
1
|
import { encodeContractKeyLocation, hashVerifierKey } from '@midnight-ntwrk/compact-js';
|
|
2
2
|
import { ComposeFailedError, ComposeOptionError } from '../errors.js';
|
|
3
3
|
|
|
4
|
+
/*
|
|
5
|
+
* This file is part of midnight-js.
|
|
6
|
+
* Copyright (C) Midnight Foundation
|
|
7
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* You may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Resolves a ledger entry-point key to its name.
|
|
20
|
+
*
|
|
21
|
+
* @param id The entry point as the state declares it — already a string, or
|
|
22
|
+
* the bytes a byte-declared entry point carries.
|
|
23
|
+
* @returns `id` itself when it is a string, otherwise its UTF-8 decoding.
|
|
24
|
+
* @see {@link VerifierKeys}
|
|
25
|
+
*/
|
|
26
|
+
const entryPointName = (id) => typeof id === 'string' ? id : new TextDecoder().decode(id);
|
|
27
|
+
/**
|
|
28
|
+
* Pairs each supplied verifier key with the entry point the state declares for
|
|
29
|
+
* it, after validating the map against those entry points in BOTH directions:
|
|
30
|
+
* every key must name a declared entry point, and every declared entry point
|
|
31
|
+
* must have a key.
|
|
32
|
+
*
|
|
33
|
+
* @param entryPoints The entry points the state declares, as `operations()`
|
|
34
|
+
* returns them.
|
|
35
|
+
* @param verifierKeys Entry-point name -> raw, tagged verifier key bytes.
|
|
36
|
+
* @param version The era every failure raised here names.
|
|
37
|
+
* @returns One registration per supplied key, in the map's own order, each
|
|
38
|
+
* carrying the DECLARED entry point rather than its resolved name — which is
|
|
39
|
+
* what `setOperation` must be handed.
|
|
40
|
+
* @throws ComposeFailedError at stage `'deploy-ambiguous-circuit'` when two
|
|
41
|
+
* declared entry points resolve to the same name. Checked before either
|
|
42
|
+
* direction below.
|
|
43
|
+
* @throws ComposeFailedError at stage `'deploy-unknown-circuit'` when a key
|
|
44
|
+
* names an entry point the state does not declare.
|
|
45
|
+
* @throws ComposeFailedError at stage `'deploy-verifier-key'` when a declared
|
|
46
|
+
* entry point has no key in the map.
|
|
47
|
+
* @see {@link VerifierKeys}
|
|
48
|
+
*/
|
|
49
|
+
const resolveVerifierKeyRegistrations = (entryPoints, verifierKeys, version) => {
|
|
50
|
+
const declared = new Map();
|
|
51
|
+
for (const entryPoint of entryPoints) {
|
|
52
|
+
const circuitId = entryPointName(entryPoint);
|
|
53
|
+
if (declared.has(circuitId)) {
|
|
54
|
+
throw new ComposeFailedError(version, 'deploy-ambiguous-circuit', circuitId);
|
|
55
|
+
}
|
|
56
|
+
declared.set(circuitId, entryPoint);
|
|
57
|
+
}
|
|
58
|
+
const registrations = [];
|
|
59
|
+
for (const [circuitId, verifierKey] of verifierKeys) {
|
|
60
|
+
const entryPoint = declared.get(circuitId);
|
|
61
|
+
if (entryPoint === undefined) {
|
|
62
|
+
throw new ComposeFailedError(version, 'deploy-unknown-circuit', circuitId);
|
|
63
|
+
}
|
|
64
|
+
registrations.push({ entryPoint, circuitId, verifierKey });
|
|
65
|
+
}
|
|
66
|
+
for (const circuitId of declared.keys()) {
|
|
67
|
+
if (!verifierKeys.has(circuitId)) {
|
|
68
|
+
throw new ComposeFailedError(version, 'deploy-verifier-key', circuitId);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return registrations;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* This file is part of midnight-js.
|
|
76
|
+
* Copyright (C) Midnight Foundation
|
|
77
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
78
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
79
|
+
* You may not use this file except in compliance with the License.
|
|
80
|
+
* You may obtain a copy of the License at
|
|
81
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
82
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
83
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
84
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
85
|
+
* See the License for the specific language governing permissions and
|
|
86
|
+
* limitations under the License.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Rejects the two envelope options the ledger accepts but should not: an
|
|
90
|
+
* empty `networkId`, and a `ttl` that is not a valid instant.
|
|
91
|
+
*
|
|
92
|
+
* @param options The transaction-envelope options to check.
|
|
93
|
+
* @param version The era every failure raised here names.
|
|
94
|
+
* @throws ComposeOptionError naming option `'networkId'` for an empty network
|
|
95
|
+
* id, or `'ttl'` for a `ttl` that is not a valid instant.
|
|
96
|
+
* @see {@link ComposeRefusalOrder}
|
|
97
|
+
*/
|
|
98
|
+
const assertComposeEnvelope = (options, version) => {
|
|
99
|
+
if (options.networkId.length === 0) {
|
|
100
|
+
throw new ComposeOptionError(version, 'networkId');
|
|
101
|
+
}
|
|
102
|
+
if (Number.isNaN(options.ttl.getTime())) {
|
|
103
|
+
throw new ComposeOptionError(version, 'ttl');
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
4
107
|
/*
|
|
5
108
|
* This file is part of midnight-js.
|
|
6
109
|
* Copyright (C) Midnight Foundation
|
|
@@ -139,7 +242,8 @@ const resolvePartition = (ledger, options) => {
|
|
|
139
242
|
* against.
|
|
140
243
|
* @param options The call's own inputs, the operation registry to resolve
|
|
141
244
|
* `circuitId` against, and the era to name in a failure.
|
|
142
|
-
* @returns The module's own `ContractCallPrototype` for this call
|
|
245
|
+
* @returns The module's own `ContractCallPrototype` for this call, and the
|
|
246
|
+
* guaranteed/fallible pair it was built from.
|
|
143
247
|
* @throws ComposeFailedError naming `version` and `circuitId`, at
|
|
144
248
|
* `options.stage` when `operations` has no registered operation for
|
|
145
249
|
* `circuitId`; at `'call-verifier-key'` when the resolved operation carries no
|
|
@@ -163,8 +267,9 @@ const assembleCallPrototype = (ledger, options) => {
|
|
|
163
267
|
}
|
|
164
268
|
const [guaranteed, fallible] = resolvePartition(ledger, options);
|
|
165
269
|
// Wrapped as one step rather than per argument -- see ComposeRefusalOrder.
|
|
270
|
+
let prototype;
|
|
166
271
|
try {
|
|
167
|
-
|
|
272
|
+
prototype = new ledger.ContractCallPrototype(contractAddress, circuitId, op, guaranteed, fallible, options.privateTranscriptOutputs, options.input, options.output, options.communicationCommitmentRandomness ?? ledger.communicationCommitmentRandomness(),
|
|
168
273
|
// The canonical, contract-qualified key location this framework's
|
|
169
274
|
// provers resolve artifacts by -- see ComposeRefusalOrder.
|
|
170
275
|
encodeContractKeyLocation({
|
|
@@ -176,135 +281,10 @@ const assembleCallPrototype = (ledger, options) => {
|
|
|
176
281
|
catch (cause) {
|
|
177
282
|
throw new ComposeFailedError(version, 'call-prototype', circuitId, cause);
|
|
178
283
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
*
|
|
184
|
-
* PROTOTYPE SEAM. It exists because the retained-era pipeline has to know the
|
|
185
|
-
* partition BEFORE it builds the call's Zswap offer, and until now the only way
|
|
186
|
-
* to obtain one was to compose the whole transaction -- by which point the
|
|
187
|
-
* offer has already been handed over as an option. Routing a coin against a
|
|
188
|
-
* partition that does not exist yet places every movement in the guaranteed
|
|
189
|
-
* segment, which the wallet then cannot balance.
|
|
190
|
-
*
|
|
191
|
-
* Same inputs, same failures and same order as the partition step inside
|
|
192
|
-
* {@link assembleCallPrototype}; that function now delegates here rather than
|
|
193
|
-
* keeping a second copy.
|
|
194
|
-
*
|
|
195
|
-
* @param ledger The ledger module (ledger-v8 or ledger-v9) to partition against.
|
|
196
|
-
* @param options The call's transcript source, address, circuit and the
|
|
197
|
-
* chain's own serialized ledger parameters.
|
|
198
|
-
* @returns The `[guaranteed, fallible]` pair, either member possibly absent.
|
|
199
|
-
* @throws ComposeFailedError at `'call-transcript-empty'`,
|
|
200
|
-
* `'call-contract-state'`, `'call-partition-context'` or `'call-partition'`.
|
|
201
|
-
* @throws ComposeOptionError at `'ledgerParameters'` for a parameter blob this
|
|
202
|
-
* era cannot read.
|
|
203
|
-
* @see {@link ComposeRefusalOrder}
|
|
204
|
-
*/
|
|
205
|
-
const partitionCallTranscript = (ledger, options) => resolvePartition(ledger, options);
|
|
206
|
-
|
|
207
|
-
/*
|
|
208
|
-
* This file is part of midnight-js.
|
|
209
|
-
* Copyright (C) Midnight Foundation
|
|
210
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
211
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
212
|
-
* You may not use this file except in compliance with the License.
|
|
213
|
-
* You may obtain a copy of the License at
|
|
214
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
215
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
216
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
217
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
218
|
-
* See the License for the specific language governing permissions and
|
|
219
|
-
* limitations under the License.
|
|
220
|
-
*/
|
|
221
|
-
/**
|
|
222
|
-
* Resolves a ledger entry-point key to its name.
|
|
223
|
-
*
|
|
224
|
-
* @param id The entry point as the state declares it — already a string, or
|
|
225
|
-
* the bytes a byte-declared entry point carries.
|
|
226
|
-
* @returns `id` itself when it is a string, otherwise its UTF-8 decoding.
|
|
227
|
-
* @see {@link VerifierKeys}
|
|
228
|
-
*/
|
|
229
|
-
const entryPointName = (id) => typeof id === 'string' ? id : new TextDecoder().decode(id);
|
|
230
|
-
/**
|
|
231
|
-
* Pairs each supplied verifier key with the entry point the state declares for
|
|
232
|
-
* it, after validating the map against those entry points in BOTH directions:
|
|
233
|
-
* every key must name a declared entry point, and every declared entry point
|
|
234
|
-
* must have a key.
|
|
235
|
-
*
|
|
236
|
-
* @param entryPoints The entry points the state declares, as `operations()`
|
|
237
|
-
* returns them.
|
|
238
|
-
* @param verifierKeys Entry-point name -> raw, tagged verifier key bytes.
|
|
239
|
-
* @param version The era every failure raised here names.
|
|
240
|
-
* @returns One registration per supplied key, in the map's own order, each
|
|
241
|
-
* carrying the DECLARED entry point rather than its resolved name — which is
|
|
242
|
-
* what `setOperation` must be handed.
|
|
243
|
-
* @throws ComposeFailedError at stage `'deploy-ambiguous-circuit'` when two
|
|
244
|
-
* declared entry points resolve to the same name. Checked before either
|
|
245
|
-
* direction below.
|
|
246
|
-
* @throws ComposeFailedError at stage `'deploy-unknown-circuit'` when a key
|
|
247
|
-
* names an entry point the state does not declare.
|
|
248
|
-
* @throws ComposeFailedError at stage `'deploy-verifier-key'` when a declared
|
|
249
|
-
* entry point has no key in the map.
|
|
250
|
-
* @see {@link VerifierKeys}
|
|
251
|
-
*/
|
|
252
|
-
const resolveVerifierKeyRegistrations = (entryPoints, verifierKeys, version) => {
|
|
253
|
-
const declared = new Map();
|
|
254
|
-
for (const entryPoint of entryPoints) {
|
|
255
|
-
const circuitId = entryPointName(entryPoint);
|
|
256
|
-
if (declared.has(circuitId)) {
|
|
257
|
-
throw new ComposeFailedError(version, 'deploy-ambiguous-circuit', circuitId);
|
|
258
|
-
}
|
|
259
|
-
declared.set(circuitId, entryPoint);
|
|
260
|
-
}
|
|
261
|
-
const registrations = [];
|
|
262
|
-
for (const [circuitId, verifierKey] of verifierKeys) {
|
|
263
|
-
const entryPoint = declared.get(circuitId);
|
|
264
|
-
if (entryPoint === undefined) {
|
|
265
|
-
throw new ComposeFailedError(version, 'deploy-unknown-circuit', circuitId);
|
|
266
|
-
}
|
|
267
|
-
registrations.push({ entryPoint, circuitId, verifierKey });
|
|
268
|
-
}
|
|
269
|
-
for (const circuitId of declared.keys()) {
|
|
270
|
-
if (!verifierKeys.has(circuitId)) {
|
|
271
|
-
throw new ComposeFailedError(version, 'deploy-verifier-key', circuitId);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
return registrations;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
/*
|
|
278
|
-
* This file is part of midnight-js.
|
|
279
|
-
* Copyright (C) Midnight Foundation
|
|
280
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
281
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
282
|
-
* You may not use this file except in compliance with the License.
|
|
283
|
-
* You may obtain a copy of the License at
|
|
284
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
285
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
286
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
287
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
288
|
-
* See the License for the specific language governing permissions and
|
|
289
|
-
* limitations under the License.
|
|
290
|
-
*/
|
|
291
|
-
/**
|
|
292
|
-
* Rejects the two envelope options the ledger accepts but should not: an
|
|
293
|
-
* empty `networkId`, and a `ttl` that is not a valid instant.
|
|
294
|
-
*
|
|
295
|
-
* @param options The transaction-envelope options to check.
|
|
296
|
-
* @param version The era every failure raised here names.
|
|
297
|
-
* @throws ComposeOptionError naming option `'networkId'` for an empty network
|
|
298
|
-
* id, or `'ttl'` for a `ttl` that is not a valid instant.
|
|
299
|
-
* @see {@link ComposeRefusalOrder}
|
|
300
|
-
*/
|
|
301
|
-
const assertComposeEnvelope = (options, version) => {
|
|
302
|
-
if (options.networkId.length === 0) {
|
|
303
|
-
throw new ComposeOptionError(version, 'networkId');
|
|
304
|
-
}
|
|
305
|
-
if (Number.isNaN(options.ttl.getTime())) {
|
|
306
|
-
throw new ComposeOptionError(version, 'ttl');
|
|
307
|
-
}
|
|
284
|
+
// Copied into a mutable pair rather than handed on: the partitioner answers
|
|
285
|
+
// with a readonly tuple, and the ledger's own `PartitionedTranscript` --
|
|
286
|
+
// which is what every consumer of this pair is typed against -- is not.
|
|
287
|
+
return { prototype, partition: [guaranteed, fallible] };
|
|
308
288
|
};
|
|
309
289
|
|
|
310
290
|
/*
|
|
@@ -326,24 +306,63 @@ const assertComposeEnvelope = (options, version) => {
|
|
|
326
306
|
* (`initialState`) and packages the result into a
|
|
327
307
|
* {@link ConstructorResultPojo}.
|
|
328
308
|
*
|
|
309
|
+
* Also sets the state's maintenance authority to a one-key committee over the
|
|
310
|
+
* caller's signing key. The retained constructor leaves an EMPTY committee with
|
|
311
|
+
* a threshold of one — one signature from a set of zero keys, which nothing can
|
|
312
|
+
* satisfy — so a deployment left on it could never have a verifier key
|
|
313
|
+
* inserted, removed or replaced, nor its authority updated, because updating it
|
|
314
|
+
* is itself a rule change. Nothing else on the retained path offers a place to
|
|
315
|
+
* put a key: `createConstructorContext` takes none, and `ComposeV8DeployOptions`
|
|
316
|
+
* carries none.
|
|
317
|
+
*
|
|
329
318
|
* @param options The compiled contract module, constructor arguments, private
|
|
330
|
-
* state
|
|
319
|
+
* state, coin public key and optional signing key.
|
|
320
|
+
* @throws ComposeOptionError naming option `'signingKey'` when a supplied key
|
|
321
|
+
* is not the 32 bytes of hex the retained runtime reads, raised before the
|
|
322
|
+
* constructor runs.
|
|
331
323
|
* @param runtime The injected pre-fork glue slice used to build the
|
|
332
|
-
* constructor context.
|
|
333
|
-
* @returns The freshly built contract state
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
324
|
+
* constructor context and the authority.
|
|
325
|
+
* @returns The freshly built contract state, the resulting private state and
|
|
326
|
+
* the signing key the authority was built from. The state is a pre-fork
|
|
327
|
+
* HANDLE, so it does not go straight into a deploy: both
|
|
328
|
+
* {@link composeV8DeployTx} and the era facade's `composeDeployTx` take it as
|
|
329
|
+
* BYTES, which is what `.serialize()` on that handle produces — and the
|
|
330
|
+
* authority is written before that, so it travels with those bytes.
|
|
337
331
|
* @see {@link RetainedEraExecution}
|
|
338
332
|
*/
|
|
333
|
+
/**
|
|
334
|
+
* The shape the retained runtime reads a signing key in: 32 bytes written in
|
|
335
|
+
* hex, either case.
|
|
336
|
+
*
|
|
337
|
+
* MEASURED against the pinned runtime rather than guessed. `sampleSigningKey()`
|
|
338
|
+
* answers 64 lowercase hex characters; an uppercase key of the same length is
|
|
339
|
+
* accepted, a shorter or longer one fails with `failed to fill whole buffer`
|
|
340
|
+
* and a non-hex one with `Invalid character 'z' at position 0`. The value being
|
|
341
|
+
* a valid Schnorr scalar is a cryptographic property this cannot check, and the
|
|
342
|
+
* runtime's own `Malformed Schnorr signing key` already names it.
|
|
343
|
+
*/
|
|
344
|
+
const LEDGER8_SIGNING_KEY_PATTERN = /^[0-9a-fA-F]{64}$/;
|
|
339
345
|
const executeConstructor = (options, runtime) => {
|
|
340
346
|
const { contract, args, privateState, coinPk } = options;
|
|
347
|
+
// BEFORE the constructor is run, so nothing is executed against a key the
|
|
348
|
+
// maintenance authority could never have been built from, and the refusal
|
|
349
|
+
// names the option rather than leaving the runtime's own buffer message to
|
|
350
|
+
// stand for it.
|
|
351
|
+
if (options.signingKey !== undefined && !LEDGER8_SIGNING_KEY_PATTERN.test(options.signingKey)) {
|
|
352
|
+
throw new ComposeOptionError('v8', 'signingKey');
|
|
353
|
+
}
|
|
341
354
|
const constructorContext = runtime.createConstructorContext(privateState, coinPk);
|
|
342
355
|
const result = contract.initialState(constructorContext, ...args);
|
|
356
|
+
const signingKey = options.signingKey ?? runtime.sampleSigningKey();
|
|
357
|
+
// `counter` is `0n` because the retained runtime documents it as `0n` at
|
|
358
|
+
// deployment; every later update sets it to exactly one more than the
|
|
359
|
+
// current value.
|
|
360
|
+
result.currentContractState.maintenanceAuthority = new runtime.ContractMaintenanceAuthority([runtime.signatureVerifyingKey(signingKey)], 1, 0n);
|
|
343
361
|
return {
|
|
344
362
|
contractState: result.currentContractState,
|
|
345
363
|
privateState: result.currentPrivateState,
|
|
346
|
-
zswapLocalState: runtime.decodeZswapLocalState(result.currentZswapLocalState)
|
|
364
|
+
zswapLocalState: runtime.decodeZswapLocalState(result.currentZswapLocalState),
|
|
365
|
+
signingKey
|
|
347
366
|
};
|
|
348
367
|
};
|
|
349
368
|
/**
|
|
@@ -424,5 +443,5 @@ const composeV8DeployTx = (options, v8) => {
|
|
|
424
443
|
};
|
|
425
444
|
};
|
|
426
445
|
|
|
427
|
-
export { INITIAL_LEDGER_PARAMETERS as I, assembleCallPrototype as a, entryPointName as b, assertComposeEnvelope as c, composeV8DeployTx as d, executeConstructor as e,
|
|
428
|
-
//# sourceMappingURL=deploy-
|
|
446
|
+
export { INITIAL_LEDGER_PARAMETERS as I, assembleCallPrototype as a, entryPointName as b, assertComposeEnvelope as c, composeV8DeployTx as d, executeConstructor as e, resolveVerifierKeyRegistrations as r };
|
|
447
|
+
//# sourceMappingURL=deploy-HjSaMZEL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-HjSaMZEL.js","sources":["../../src/lib/shared/verifier-keys.ts","../../src/lib/shared/compose-options.ts","../../src/lib/shared/compose-types.ts","../../src/lib/shared/assemble-call.ts","../../src/lib/v8/deploy.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAKH;;;;;;;AAOG;AACI,MAAM,cAAc,GAAG,CAAC,EAAuB,KACpD,OAAO,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,EAAE,EAAE,CAAC;IAClF;IAEA,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC,cAAc,CAAC,mBAAmB,CAAC;AACzD,IAAA,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;IAEnD,OAAO;AACL,QAAA,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,SAAS,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,SAAS,EAAE;QACrG,eAAe,EAAE,MAAM,CAAC,OAAO;AAC/B,QAAA,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,SAAS;KAC5C;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midnight-ntwrk/midnight-js-protocol",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.9-pre.c78447d3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Protocol type re-exports for midnight-js framework",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -98,11 +98,12 @@
|
|
|
98
98
|
"eslint": "^10.8.1",
|
|
99
99
|
"onchain-runtime-v3-test-only": "npm:@midnight-ntwrk/onchain-runtime-v3@3.1.0",
|
|
100
100
|
"rollup": "^4.60.4",
|
|
101
|
-
"rollup-plugin-dts": "^6.
|
|
101
|
+
"rollup-plugin-dts": "^6.5.1",
|
|
102
102
|
"typescript": "^6.0.3",
|
|
103
103
|
"vitest": "^4.1.7"
|
|
104
104
|
},
|
|
105
105
|
"engines": {
|
|
106
106
|
"node": ">=22.12"
|
|
107
|
-
}
|
|
107
|
+
},
|
|
108
|
+
"stableVersion": "5.0.0-beta.8"
|
|
108
109
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-D6yyn9P7.js","sources":["../../src/lib/shared/compose-types.ts","../../src/lib/shared/assemble-call.ts","../../src/lib/shared/verifier-keys.ts","../../src/lib/shared/compose-options.ts","../../src/lib/v8/deploy.ts"],"sourcesContent":[null,null,null,null,null],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;AAaG;AAiEH;;;;;;;;AAQG;AACI,MAAM,yBAAyB,GAAG;;ACvFzC;;;;;;;;;;;;;AAaG;AAqKH;;;;;;AAMG;AACH,MAAM,sBAAsB,GAAG,CAC7B,YAA2B,EAC3B,gBAAkC,KACjB;AACjB,IAAA,YAAY,CAAC,KAAK,GAAG,gBAAgB,CAAC,KAAK;AAC3C,IAAA,YAAY,CAAC,OAAO,GAAG,gBAAgB,CAAC,OAAO;IAC/C,IAAI,OAAO,GAAG,YAAY;IAC1B,KAAK,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAE;QAC7D,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC;IACvD;AACA,IAAA,OAAO,OAAO;AAChB,CAAC;AAED;;;;;;AAMG;AACH,MAAM,gBAAgB,GAAG,CASvB,MAAsH,EACtH,OAA6B,KAC4D;IACzF,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,OAAO;AACnE,IAAA,IAAI,UAAU,CAAC,IAAI,KAAK,aAAa,EAAE;;;AAGrC,QAAA,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,IAAI,UAAU,CAAC,QAAQ,KAAK,SAAS,EAAE;YAC5E,MAAM,IAAI,kBAAkB,CAAC,OAAO,EAAE,uBAAuB,EAAE,SAAS,CAAC;QAC3E;QACA,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC;IACrD;AAEA,IAAA,IAAI,YAA2B;AAC/B,IAAA,IAAI;AACF,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CA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