@aztec/stdlib 3.0.0-nightly.20251015 → 3.0.0-nightly.20251016
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/dest/logs/directional_app_tagging_secret.d.ts +1 -1
- package/dest/logs/directional_app_tagging_secret.js +1 -1
- package/dest/logs/index.d.ts +1 -1
- package/dest/logs/index.d.ts.map +1 -1
- package/dest/logs/index.js +1 -1
- package/dest/logs/{indexed_tagging_secret.d.ts → pre_tag.d.ts} +3 -3
- package/dest/logs/pre_tag.d.ts.map +1 -0
- package/dest/logs/{indexed_tagging_secret.js → pre_tag.js} +1 -1
- package/dest/tx/private_execution_result.d.ts +5 -5
- package/dest/tx/private_execution_result.d.ts.map +1 -1
- package/dest/tx/private_execution_result.js +6 -6
- package/dest/versioning/versioning.d.ts.map +1 -1
- package/dest/versioning/versioning.js +10 -5
- package/package.json +8 -8
- package/src/logs/directional_app_tagging_secret.ts +1 -1
- package/src/logs/index.ts +1 -1
- package/src/logs/{indexed_tagging_secret.ts → pre_tag.ts} +2 -2
- package/src/tx/private_execution_result.ts +5 -5
- package/src/versioning/versioning.ts +10 -5
- package/dest/logs/indexed_tagging_secret.d.ts.map +0 -1
|
@@ -9,7 +9,7 @@ import type { CompleteAddress } from '../contract/complete_address.js';
|
|
|
9
9
|
* address: A→B differs from B→A even with the same participants and app.
|
|
10
10
|
*
|
|
11
11
|
* Note: It's a bit unfortunate that this type resides in `stdlib` as the rest of the tagging functionality resides
|
|
12
|
-
* in `pxe/src/tagging`. We need to use this type in `
|
|
12
|
+
* in `pxe/src/tagging`. We need to use this type in `PreTag` that in turn is used by other types
|
|
13
13
|
* in stdlib hence there doesn't seem to be a good way around this.
|
|
14
14
|
*/
|
|
15
15
|
export declare class DirectionalAppTaggingSecret {
|
|
@@ -9,7 +9,7 @@ import { computeAddressSecret, computePreaddress } from '../keys/derivation.js';
|
|
|
9
9
|
* address: A→B differs from B→A even with the same participants and app.
|
|
10
10
|
*
|
|
11
11
|
* Note: It's a bit unfortunate that this type resides in `stdlib` as the rest of the tagging functionality resides
|
|
12
|
-
* in `pxe/src/tagging`. We need to use this type in `
|
|
12
|
+
* in `pxe/src/tagging`. We need to use this type in `PreTag` that in turn is used by other types
|
|
13
13
|
* in stdlib hence there doesn't seem to be a good way around this.
|
|
14
14
|
*/ export class DirectionalAppTaggingSecret {
|
|
15
15
|
value;
|
package/dest/logs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './log_with_tx_data.js';
|
|
2
2
|
export * from './directional_app_tagging_secret.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './pre_tag.js';
|
|
4
4
|
export * from './contract_class_log.js';
|
|
5
5
|
export * from './public_log.js';
|
|
6
6
|
export * from './private_log.js';
|
package/dest/logs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logs/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logs/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC"}
|
package/dest/logs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './log_with_tx_data.js';
|
|
2
2
|
export * from './directional_app_tagging_secret.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './pre_tag.js';
|
|
4
4
|
export * from './contract_class_log.js';
|
|
5
5
|
export * from './public_log.js';
|
|
6
6
|
export * from './private_log.js';
|
|
@@ -7,11 +7,11 @@ import { type DirectionalAppTaggingSecret } from './directional_app_tagging_secr
|
|
|
7
7
|
* in `pxe/src/tagging`. But this type is used by other types in stdlib hence there doesn't seem to be a good way
|
|
8
8
|
* around this.
|
|
9
9
|
*/
|
|
10
|
-
export type
|
|
10
|
+
export type PreTag = {
|
|
11
11
|
secret: DirectionalAppTaggingSecret;
|
|
12
12
|
index: number;
|
|
13
13
|
};
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const PreTagSchema: z.ZodObject<{
|
|
15
15
|
secret: z.ZodObject<{
|
|
16
16
|
value: z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -31,4 +31,4 @@ export declare const IndexedTaggingSecretSchema: z.ZodObject<{
|
|
|
31
31
|
};
|
|
32
32
|
index: string | number | bigint;
|
|
33
33
|
}>;
|
|
34
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=pre_tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pre_tag.d.ts","sourceRoot":"","sources":["../../src/logs/pre_tag.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,qCAAqC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;EAGvB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { schemas } from '@aztec/foundation/schemas';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { DirectionalAppTaggingSecretSchema } from './directional_app_tagging_secret.js';
|
|
4
|
-
export const
|
|
4
|
+
export const PreTagSchema = z.object({
|
|
5
5
|
secret: DirectionalAppTaggingSecretSchema,
|
|
6
6
|
index: schemas.Integer
|
|
7
7
|
});
|
|
@@ -5,7 +5,7 @@ import { NoteSelector } from '../abi/note_selector.js';
|
|
|
5
5
|
import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inputs.js';
|
|
6
6
|
import type { IsEmpty } from '../kernel/utils/interfaces.js';
|
|
7
7
|
import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
|
|
8
|
-
import { type
|
|
8
|
+
import { type PreTag } from '../logs/pre_tag.js';
|
|
9
9
|
import { Note } from '../note/note.js';
|
|
10
10
|
import { type ZodFor } from '../schemas/index.js';
|
|
11
11
|
import type { UInt32 } from '../types/index.js';
|
|
@@ -123,8 +123,8 @@ export declare class PrivateCallExecutionResult {
|
|
|
123
123
|
offchainEffects: {
|
|
124
124
|
data: Fr[];
|
|
125
125
|
}[];
|
|
126
|
-
/** The
|
|
127
|
-
|
|
126
|
+
/** The pre tags used in this tx to compute tags for private logs */
|
|
127
|
+
preTags: PreTag[];
|
|
128
128
|
/** The nested executions. */
|
|
129
129
|
nestedExecutionResults: PrivateCallExecutionResult[];
|
|
130
130
|
/**
|
|
@@ -155,8 +155,8 @@ export declare class PrivateCallExecutionResult {
|
|
|
155
155
|
offchainEffects: {
|
|
156
156
|
data: Fr[];
|
|
157
157
|
}[],
|
|
158
|
-
/** The
|
|
159
|
-
|
|
158
|
+
/** The pre tags used in this tx to compute tags for private logs */
|
|
159
|
+
preTags: PreTag[],
|
|
160
160
|
/** The nested executions. */
|
|
161
161
|
nestedExecutionResults: PrivateCallExecutionResult[],
|
|
162
162
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_execution_result.d.ts","sourceRoot":"","sources":["../../src/tx/private_execution_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"private_execution_result.d.ts","sourceRoot":"","sources":["../../src/tx/private_execution_result.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,KAAK,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,K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AAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC,CAAA;KAAE;CAC9F"}
|
|
@@ -6,7 +6,7 @@ import { NoteSelector } from '../abi/note_selector.js';
|
|
|
6
6
|
import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inputs.js';
|
|
7
7
|
import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
|
|
8
8
|
import { ContractClassLog } from '../logs/contract_class_log.js';
|
|
9
|
-
import {
|
|
9
|
+
import { PreTagSchema } from '../logs/pre_tag.js';
|
|
10
10
|
import { Note } from '../note/note.js';
|
|
11
11
|
import { mapSchema, schemas } from '../schemas/index.js';
|
|
12
12
|
import { HashedValues } from './hashed_values.js';
|
|
@@ -98,13 +98,13 @@ export class PrivateExecutionResult {
|
|
|
98
98
|
noteHashNullifierCounterMap;
|
|
99
99
|
returnValues;
|
|
100
100
|
offchainEffects;
|
|
101
|
-
|
|
101
|
+
preTags;
|
|
102
102
|
nestedExecutionResults;
|
|
103
103
|
contractClassLogs;
|
|
104
104
|
profileResult;
|
|
105
105
|
constructor(// Needed for prover
|
|
106
106
|
/** The ACIR bytecode. */ acir, /** The verification key. */ vk, /** The partial witness. */ partialWitness, // Needed for the verifier (kernel)
|
|
107
|
-
/** The call stack item. */ publicInputs, /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */ noteHashLeafIndexMap, /** The notes created in the executed function. */ newNotes, /** Mapping of note hash counter to the counter of its nullifier. */ noteHashNullifierCounterMap, /** The raw return values of the executed function. */ returnValues, /** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */ offchainEffects, /** The
|
|
107
|
+
/** The call stack item. */ publicInputs, /** Mapping of note hash to its index in the note hash tree. Used for building hints for note hash read requests. */ noteHashLeafIndexMap, /** The notes created in the executed function. */ newNotes, /** Mapping of note hash counter to the counter of its nullifier. */ noteHashNullifierCounterMap, /** The raw return values of the executed function. */ returnValues, /** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */ offchainEffects, /** The pre tags used in this tx to compute tags for private logs */ preTags, /** The nested executions. */ nestedExecutionResults, /**
|
|
108
108
|
* Contract class logs emitted during execution of this function call.
|
|
109
109
|
* Note: We only need to collect the ContractClassLogFields as preimages for the tx.
|
|
110
110
|
* But keep them as ContractClassLog so that we can verify the log hashes before submitting the tx (TODO).
|
|
@@ -118,7 +118,7 @@ export class PrivateExecutionResult {
|
|
|
118
118
|
this.noteHashNullifierCounterMap = noteHashNullifierCounterMap;
|
|
119
119
|
this.returnValues = returnValues;
|
|
120
120
|
this.offchainEffects = offchainEffects;
|
|
121
|
-
this.
|
|
121
|
+
this.preTags = preTags;
|
|
122
122
|
this.nestedExecutionResults = nestedExecutionResults;
|
|
123
123
|
this.contractClassLogs = contractClassLogs;
|
|
124
124
|
this.profileResult = profileResult;
|
|
@@ -136,13 +136,13 @@ export class PrivateExecutionResult {
|
|
|
136
136
|
offchainEffects: z.array(z.object({
|
|
137
137
|
data: z.array(schemas.Fr)
|
|
138
138
|
})),
|
|
139
|
-
|
|
139
|
+
preTags: z.array(PreTagSchema),
|
|
140
140
|
nestedExecutionResults: z.array(z.lazy(()=>PrivateCallExecutionResult.schema)),
|
|
141
141
|
contractClassLogs: z.array(CountedContractClassLog.schema)
|
|
142
142
|
}).transform(PrivateCallExecutionResult.from);
|
|
143
143
|
}
|
|
144
144
|
static from(fields) {
|
|
145
|
-
return new PrivateCallExecutionResult(fields.acir, fields.vk, fields.partialWitness, fields.publicInputs, fields.noteHashLeafIndexMap, fields.newNotes, fields.noteHashNullifierCounterMap, fields.returnValues, fields.offchainEffects, fields.
|
|
145
|
+
return new PrivateCallExecutionResult(fields.acir, fields.vk, fields.partialWitness, fields.publicInputs, fields.noteHashLeafIndexMap, fields.newNotes, fields.noteHashNullifierCounterMap, fields.returnValues, fields.offchainEffects, fields.preTags, fields.nestedExecutionResults, fields.contractClassLogs);
|
|
146
146
|
}
|
|
147
147
|
static async random(nested = 1) {
|
|
148
148
|
return new PrivateCallExecutionResult(randomBytes(4), randomBytes(4), new Map([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versioning.d.ts","sourceRoot":"","sources":["../../src/versioning/versioning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAGnD,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,8IAA8I;AAC9I,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,EAAE,MAAM,CAAC;IAIlB,eAAe,EAAE,UAAU,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;IAChC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,WAAW,EACnB,uBAAuB,EAAE,MAAM,GAAG,EAAE,EACpC,oBAAoB,EAAE,MAAM,GAAG,EAAE,GAChC,kBAAkB,CAQpB;AAED,qGAAqG;AACrG,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAiB9E;AAED,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAIzD;AAED,iGAAiG;AACjG,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,QA6B/F;AAED,8EAA8E;AAC9E,wBAAgB,qCAAqC,CACnD,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACrC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,QAiBpC;AAED,4EAA4E;AAC5E,w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,CAAC,QAiBpC;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,IAC7D,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM,MAAM,OAAO,CAAC,IAAI,CAAC,mBAc1D;AAED,0FAA0F;AAC1F,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,IACxE,aAAa;IAAE,OAAO,EAAE;QAAE,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;KAAE,CAAA;CAAE,mBAYzF"}
|
|
@@ -67,11 +67,16 @@ export class ComponentsVersionsError extends Error {
|
|
|
67
67
|
}
|
|
68
68
|
/** Returns a Koa middleware that injects the versioning info as headers. */ export function getVersioningMiddleware(versions) {
|
|
69
69
|
return async (ctx, next)=>{
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if
|
|
74
|
-
|
|
70
|
+
try {
|
|
71
|
+
await next();
|
|
72
|
+
} finally{
|
|
73
|
+
// Always add version headers, even if there was an error
|
|
74
|
+
// This allows the client to detect version mismatches before processing other errors
|
|
75
|
+
for(const key in versions){
|
|
76
|
+
const value = versions[key];
|
|
77
|
+
if (value !== undefined) {
|
|
78
|
+
ctx.set(`x-aztec-${key}`, value.toString());
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251016",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@aws-sdk/client-s3": "^3.892.0",
|
|
73
|
-
"@aztec/bb.js": "3.0.0-nightly.
|
|
74
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
75
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
76
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
77
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
78
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
79
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
73
|
+
"@aztec/bb.js": "3.0.0-nightly.20251016",
|
|
74
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251016",
|
|
75
|
+
"@aztec/constants": "3.0.0-nightly.20251016",
|
|
76
|
+
"@aztec/ethereum": "3.0.0-nightly.20251016",
|
|
77
|
+
"@aztec/foundation": "3.0.0-nightly.20251016",
|
|
78
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251016",
|
|
79
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20251016",
|
|
80
80
|
"@google-cloud/storage": "^7.15.0",
|
|
81
81
|
"axios": "^1.12.0",
|
|
82
82
|
"json-stringify-deterministic": "1.0.12",
|
|
@@ -14,7 +14,7 @@ import { computeAddressSecret, computePreaddress } from '../keys/derivation.js';
|
|
|
14
14
|
* address: A→B differs from B→A even with the same participants and app.
|
|
15
15
|
*
|
|
16
16
|
* Note: It's a bit unfortunate that this type resides in `stdlib` as the rest of the tagging functionality resides
|
|
17
|
-
* in `pxe/src/tagging`. We need to use this type in `
|
|
17
|
+
* in `pxe/src/tagging`. We need to use this type in `PreTag` that in turn is used by other types
|
|
18
18
|
* in stdlib hence there doesn't seem to be a good way around this.
|
|
19
19
|
*/
|
|
20
20
|
export class DirectionalAppTaggingSecret {
|
package/src/logs/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './log_with_tx_data.js';
|
|
2
2
|
export * from './directional_app_tagging_secret.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './pre_tag.js';
|
|
4
4
|
export * from './contract_class_log.js';
|
|
5
5
|
export * from './public_log.js';
|
|
6
6
|
export * from './private_log.js';
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
* in `pxe/src/tagging`. But this type is used by other types in stdlib hence there doesn't seem to be a good way
|
|
15
15
|
* around this.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type PreTag = {
|
|
18
18
|
secret: DirectionalAppTaggingSecret;
|
|
19
19
|
index: number;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const PreTagSchema = z.object({
|
|
23
23
|
secret: DirectionalAppTaggingSecretSchema,
|
|
24
24
|
index: schemas.Integer,
|
|
25
25
|
});
|
|
@@ -10,7 +10,7 @@ import { PrivateCircuitPublicInputs } from '../kernel/private_circuit_public_inp
|
|
|
10
10
|
import type { IsEmpty } from '../kernel/utils/interfaces.js';
|
|
11
11
|
import { sortByCounter } from '../kernel/utils/order_and_comparison.js';
|
|
12
12
|
import { ContractClassLog, ContractClassLogFields } from '../logs/contract_class_log.js';
|
|
13
|
-
import { type
|
|
13
|
+
import { type PreTag, PreTagSchema } from '../logs/pre_tag.js';
|
|
14
14
|
import { Note } from '../note/note.js';
|
|
15
15
|
import { type ZodFor, mapSchema, schemas } from '../schemas/index.js';
|
|
16
16
|
import type { UInt32 } from '../types/index.js';
|
|
@@ -136,8 +136,8 @@ export class PrivateCallExecutionResult {
|
|
|
136
136
|
public returnValues: Fr[],
|
|
137
137
|
/** The offchain effects emitted during execution of this function call via the `emit_offchain_effect` oracle. */
|
|
138
138
|
public offchainEffects: { data: Fr[] }[],
|
|
139
|
-
/** The
|
|
140
|
-
public
|
|
139
|
+
/** The pre tags used in this tx to compute tags for private logs */
|
|
140
|
+
public preTags: PreTag[],
|
|
141
141
|
/** The nested executions. */
|
|
142
142
|
public nestedExecutionResults: PrivateCallExecutionResult[],
|
|
143
143
|
/**
|
|
@@ -161,7 +161,7 @@ export class PrivateCallExecutionResult {
|
|
|
161
161
|
noteHashNullifierCounterMap: mapSchema(z.coerce.number(), z.number()),
|
|
162
162
|
returnValues: z.array(schemas.Fr),
|
|
163
163
|
offchainEffects: z.array(z.object({ data: z.array(schemas.Fr) })),
|
|
164
|
-
|
|
164
|
+
preTags: z.array(PreTagSchema),
|
|
165
165
|
nestedExecutionResults: z.array(z.lazy(() => PrivateCallExecutionResult.schema)),
|
|
166
166
|
contractClassLogs: z.array(CountedContractClassLog.schema),
|
|
167
167
|
})
|
|
@@ -179,7 +179,7 @@ export class PrivateCallExecutionResult {
|
|
|
179
179
|
fields.noteHashNullifierCounterMap,
|
|
180
180
|
fields.returnValues,
|
|
181
181
|
fields.offchainEffects,
|
|
182
|
-
fields.
|
|
182
|
+
fields.preTags,
|
|
183
183
|
fields.nestedExecutionResults,
|
|
184
184
|
fields.contractClassLogs,
|
|
185
185
|
);
|
|
@@ -117,11 +117,16 @@ export function validatePartialComponentVersionsMatch(
|
|
|
117
117
|
/** Returns a Koa middleware that injects the versioning info as headers. */
|
|
118
118
|
export function getVersioningMiddleware(versions: Partial<ComponentsVersions>) {
|
|
119
119
|
return async (ctx: Koa.Context, next: () => Promise<void>) => {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if
|
|
124
|
-
|
|
120
|
+
try {
|
|
121
|
+
await next();
|
|
122
|
+
} finally {
|
|
123
|
+
// Always add version headers, even if there was an error
|
|
124
|
+
// This allows the client to detect version mismatches before processing other errors
|
|
125
|
+
for (const key in versions) {
|
|
126
|
+
const value = versions[key as keyof ComponentsVersions];
|
|
127
|
+
if (value !== undefined) {
|
|
128
|
+
ctx.set(`x-aztec-${key}`, value.toString());
|
|
129
|
+
}
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"indexed_tagging_secret.d.ts","sourceRoot":"","sources":["../../src/logs/indexed_tagging_secret.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,qCAAqC,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;EAGrC,CAAC"}
|