@aztec/stdlib 3.0.0-nightly.20251104 → 3.0.0-nightly.20251105
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/avm/avm.d.ts +2202 -250
- package/dest/avm/avm.d.ts.map +1 -1
- package/dest/avm/avm.js +93 -14
- package/dest/avm/avm_accumulated_data.d.ts +7 -7
- package/dest/avm/avm_circuit_public_inputs.d.ts +27 -27
- package/dest/avm/avm_proving_request.d.ts +667 -118
- package/dest/avm/avm_proving_request.d.ts.map +1 -1
- package/dest/contract/contract_deployment_data.d.ts +111 -0
- package/dest/contract/contract_deployment_data.d.ts.map +1 -0
- package/dest/contract/contract_deployment_data.js +87 -0
- package/dest/contract/index.d.ts +1 -0
- package/dest/contract/index.d.ts.map +1 -1
- package/dest/contract/index.js +1 -0
- package/dest/contract/interfaces/contract_class.d.ts +16 -16
- package/dest/contract/private_function_membership_proof.d.ts +1 -1
- package/dest/contract/private_function_membership_proof.js +1 -1
- package/dest/hash/hash.d.ts +9 -1
- package/dest/hash/hash.d.ts.map +1 -1
- package/dest/hash/hash.js +11 -1
- package/dest/interfaces/get_logs_response.d.ts +1 -1
- package/dest/interfaces/merkle_tree_operations.d.ts +2 -2
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/proving-job.d.ts +667 -118
- package/dest/interfaces/proving-job.d.ts.map +1 -1
- package/dest/kernel/private_to_avm_accumulated_data.d.ts +7 -7
- package/dest/logs/extended_public_log.d.ts +1 -1
- package/dest/messaging/l2_to_l1_message.d.ts +20 -20
- package/dest/slashing/types.d.ts +1 -1
- package/dest/snapshots/types.d.ts +4 -4
- package/dest/tests/factories.d.ts +11 -2
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +24 -8
- package/dest/world-state/world_state_revision.d.ts +33 -1
- package/dest/world-state/world_state_revision.d.ts.map +1 -1
- package/dest/world-state/world_state_revision.js +24 -1
- package/dest/zkpassport/index.d.ts +1 -3
- package/dest/zkpassport/index.d.ts.map +1 -1
- package/dest/zkpassport/index.js +5 -10
- package/package.json +8 -8
- package/src/avm/avm.ts +100 -3
- package/src/contract/contract_deployment_data.ts +108 -0
- package/src/contract/index.ts +1 -0
- package/src/contract/private_function_membership_proof.ts +1 -1
- package/src/hash/hash.ts +13 -2
- package/src/interfaces/merkle_tree_operations.ts +2 -2
- package/src/tests/factories.ts +29 -3
- package/src/world-state/world_state_revision.ts +47 -5
- package/src/zkpassport/index.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_proving_request.d.ts","sourceRoot":"","sources":["../../src/avm/avm_proving_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"avm_proving_request.d.ts","sourceRoot":"","sources":["../../src/avm/avm_proving_request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ContractClassLog, PrivateLog } from '@aztec/stdlib/logs';
|
|
2
|
+
import type { Tx } from '@aztec/stdlib/tx';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/**
|
|
5
|
+
* Class containing contract class logs and private logs which are both
|
|
6
|
+
* relevant for contract registrations and deployments.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ContractDeploymentData {
|
|
9
|
+
readonly contractClassLogs: ContractClassLog[];
|
|
10
|
+
readonly privateLogs: PrivateLog[];
|
|
11
|
+
constructor(contractClassLogs: ContractClassLog[], privateLogs: PrivateLog[]);
|
|
12
|
+
getContractClassLogs(): ContractClassLog[];
|
|
13
|
+
getPrivateLogs(): PrivateLog[];
|
|
14
|
+
static from(args: {
|
|
15
|
+
contractClassLogs: ContractClassLog[];
|
|
16
|
+
privateLogs: PrivateLog[];
|
|
17
|
+
}): ContractDeploymentData;
|
|
18
|
+
static empty(): ContractDeploymentData;
|
|
19
|
+
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
20
|
+
contractClassLogs: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
21
|
+
contractAddress: import("@aztec/foundation/schemas").ZodFor<import("../aztec-address/index.js").AztecAddress>;
|
|
22
|
+
fields: z.ZodEffects<z.ZodObject<{
|
|
23
|
+
fields: z.ZodEffects<z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, "many">, import("@aztec/foundation/schemas").Fr[], string[]>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
fields: import("@aztec/foundation/schemas").Fr[];
|
|
26
|
+
}, {
|
|
27
|
+
fields: string[];
|
|
28
|
+
}>, import("@aztec/stdlib/logs").ContractClassLogFields, {
|
|
29
|
+
fields: string[];
|
|
30
|
+
}>;
|
|
31
|
+
emittedLength: z.ZodNumber;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
fields: import("@aztec/stdlib/logs").ContractClassLogFields;
|
|
34
|
+
contractAddress: import("../aztec-address/index.js").AztecAddress;
|
|
35
|
+
emittedLength: number;
|
|
36
|
+
}, {
|
|
37
|
+
fields: {
|
|
38
|
+
fields: string[];
|
|
39
|
+
};
|
|
40
|
+
emittedLength: number;
|
|
41
|
+
contractAddress?: any;
|
|
42
|
+
}>, ContractClassLog, {
|
|
43
|
+
fields: {
|
|
44
|
+
fields: string[];
|
|
45
|
+
};
|
|
46
|
+
emittedLength: number;
|
|
47
|
+
contractAddress?: any;
|
|
48
|
+
}>, "many">;
|
|
49
|
+
privateLogs: z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
50
|
+
fields: z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, "many">;
|
|
51
|
+
emittedLength: z.ZodNumber;
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
|
+
fields: import("@aztec/foundation/schemas").Fr[];
|
|
54
|
+
emittedLength: number;
|
|
55
|
+
}, {
|
|
56
|
+
fields: string[];
|
|
57
|
+
emittedLength: number;
|
|
58
|
+
}>, PrivateLog, {
|
|
59
|
+
fields: string[];
|
|
60
|
+
emittedLength: number;
|
|
61
|
+
}>, "many">;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
privateLogs: PrivateLog[];
|
|
64
|
+
contractClassLogs: ContractClassLog[];
|
|
65
|
+
}, {
|
|
66
|
+
privateLogs: {
|
|
67
|
+
fields: string[];
|
|
68
|
+
emittedLength: number;
|
|
69
|
+
}[];
|
|
70
|
+
contractClassLogs: {
|
|
71
|
+
fields: {
|
|
72
|
+
fields: string[];
|
|
73
|
+
};
|
|
74
|
+
emittedLength: number;
|
|
75
|
+
contractAddress?: any;
|
|
76
|
+
}[];
|
|
77
|
+
}>, ContractDeploymentData, {
|
|
78
|
+
privateLogs: {
|
|
79
|
+
fields: string[];
|
|
80
|
+
emittedLength: number;
|
|
81
|
+
}[];
|
|
82
|
+
contractClassLogs: {
|
|
83
|
+
fields: {
|
|
84
|
+
fields: string[];
|
|
85
|
+
};
|
|
86
|
+
emittedLength: number;
|
|
87
|
+
contractAddress?: any;
|
|
88
|
+
}[];
|
|
89
|
+
}>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Class containing both revertible and non-revertible registration/deployment data.
|
|
93
|
+
*/
|
|
94
|
+
export declare class AllContractDeploymentData {
|
|
95
|
+
readonly nonRevertibleContractDeploymentData: ContractDeploymentData;
|
|
96
|
+
readonly revertibleContractDeploymentData: ContractDeploymentData;
|
|
97
|
+
constructor(nonRevertibleContractDeploymentData: ContractDeploymentData, revertibleContractDeploymentData: ContractDeploymentData);
|
|
98
|
+
getNonRevertibleContractDeploymentData(): ContractDeploymentData;
|
|
99
|
+
getRevertibleContractDeploymentData(): ContractDeploymentData;
|
|
100
|
+
/**
|
|
101
|
+
* Extracts all contract registration/deployment data from a tx separated by revertibility.
|
|
102
|
+
* This includes contract class logs and private logs.
|
|
103
|
+
*
|
|
104
|
+
* This method handles both private-only transactions and transactions with public calls,
|
|
105
|
+
* properly splitting logs between revertible and non-revertible categories.
|
|
106
|
+
* @param tx - The transaction to extract data from
|
|
107
|
+
* @returns The extracted deployment data separated by revertibility
|
|
108
|
+
*/
|
|
109
|
+
static fromTx(tx: Tx): AllContractDeploymentData;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=contract_deployment_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract_deployment_data.d.ts","sourceRoot":"","sources":["../../src/contract/contract_deployment_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,qBAAa,sBAAsB;aAEf,iBAAiB,EAAE,gBAAgB,EAAE;aACrC,WAAW,EAAE,UAAU,EAAE;gBADzB,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,WAAW,EAAE,UAAU,EAAE;IAGpC,oBAAoB,IAAI,gBAAgB,EAAE;IAI1C,cAAc,IAAI,UAAU,EAAE;WAIvB,IAAI,CAAC,IAAI,EAAE;QAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;QAAC,WAAW,EAAE,UAAU,EAAE,CAAA;KAAE;WAI/E,KAAK,IAAI,sBAAsB;IAI7C,WAAkB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAOvB;CACF;AAED;;GAEG;AACH,qBAAa,yBAAyB;aAElB,mCAAmC,EAAE,sBAAsB;aAC3D,gCAAgC,EAAE,sBAAsB;gBADxD,mCAAmC,EAAE,sBAAsB,EAC3D,gCAAgC,EAAE,sBAAsB;IAGnE,sCAAsC,IAAI,sBAAsB;IAIhE,mCAAmC,IAAI,sBAAsB;IAIpE;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,GAAG,yBAAyB;CAwCjD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ContractClassLog, PrivateLog } from '@aztec/stdlib/logs';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* Class containing contract class logs and private logs which are both
|
|
5
|
+
* relevant for contract registrations and deployments.
|
|
6
|
+
*/ export class ContractDeploymentData {
|
|
7
|
+
contractClassLogs;
|
|
8
|
+
privateLogs;
|
|
9
|
+
constructor(contractClassLogs, privateLogs){
|
|
10
|
+
this.contractClassLogs = contractClassLogs;
|
|
11
|
+
this.privateLogs = privateLogs;
|
|
12
|
+
}
|
|
13
|
+
getContractClassLogs() {
|
|
14
|
+
return this.contractClassLogs;
|
|
15
|
+
}
|
|
16
|
+
getPrivateLogs() {
|
|
17
|
+
return this.privateLogs;
|
|
18
|
+
}
|
|
19
|
+
static from(args) {
|
|
20
|
+
return new ContractDeploymentData(args.contractClassLogs, args.privateLogs);
|
|
21
|
+
}
|
|
22
|
+
static empty() {
|
|
23
|
+
return new ContractDeploymentData([], []);
|
|
24
|
+
}
|
|
25
|
+
static get schema() {
|
|
26
|
+
return z.object({
|
|
27
|
+
contractClassLogs: z.array(ContractClassLog.schema),
|
|
28
|
+
privateLogs: z.array(PrivateLog.schema)
|
|
29
|
+
}).transform(ContractDeploymentData.from);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Class containing both revertible and non-revertible registration/deployment data.
|
|
34
|
+
*/ export class AllContractDeploymentData {
|
|
35
|
+
nonRevertibleContractDeploymentData;
|
|
36
|
+
revertibleContractDeploymentData;
|
|
37
|
+
constructor(nonRevertibleContractDeploymentData, revertibleContractDeploymentData){
|
|
38
|
+
this.nonRevertibleContractDeploymentData = nonRevertibleContractDeploymentData;
|
|
39
|
+
this.revertibleContractDeploymentData = revertibleContractDeploymentData;
|
|
40
|
+
}
|
|
41
|
+
getNonRevertibleContractDeploymentData() {
|
|
42
|
+
return this.nonRevertibleContractDeploymentData;
|
|
43
|
+
}
|
|
44
|
+
getRevertibleContractDeploymentData() {
|
|
45
|
+
return this.revertibleContractDeploymentData;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Extracts all contract registration/deployment data from a tx separated by revertibility.
|
|
49
|
+
* This includes contract class logs and private logs.
|
|
50
|
+
*
|
|
51
|
+
* This method handles both private-only transactions and transactions with public calls,
|
|
52
|
+
* properly splitting logs between revertible and non-revertible categories.
|
|
53
|
+
* @param tx - The transaction to extract data from
|
|
54
|
+
* @returns The extracted deployment data separated by revertibility
|
|
55
|
+
*/ static fromTx(tx) {
|
|
56
|
+
const hasPublicCalls = !!tx.data.forPublic;
|
|
57
|
+
// Extract contract class logs from the tx
|
|
58
|
+
const allClassLogs = tx.getContractClassLogs();
|
|
59
|
+
let nonRevertibleClassLogs;
|
|
60
|
+
let revertibleClassLogs;
|
|
61
|
+
if (hasPublicCalls) {
|
|
62
|
+
// Transactions with public calls can have both revertible and non-revertible contract class logs
|
|
63
|
+
// Split the logs up here based on revertibility
|
|
64
|
+
nonRevertibleClassLogs = tx.getSplitContractClassLogs(/*revertible=*/ false);
|
|
65
|
+
revertibleClassLogs = tx.getSplitContractClassLogs(/*revertible=*/ true);
|
|
66
|
+
} else {
|
|
67
|
+
// Private-only tx: all logs are non-revertible
|
|
68
|
+
nonRevertibleClassLogs = allClassLogs;
|
|
69
|
+
revertibleClassLogs = [];
|
|
70
|
+
}
|
|
71
|
+
// Extract contract instance logs from the transaction's private logs
|
|
72
|
+
let nonRevertibleInstanceLogs;
|
|
73
|
+
let revertibleInstanceLogs;
|
|
74
|
+
if (hasPublicCalls) {
|
|
75
|
+
// Transactions with public calls can have both revertible and non-revertible contract instance logs
|
|
76
|
+
// Split the logs up here based on revertibility
|
|
77
|
+
nonRevertibleInstanceLogs = tx.data.forPublic.nonRevertibleAccumulatedData.privateLogs.filter((l)=>!l.isEmpty());
|
|
78
|
+
revertibleInstanceLogs = tx.data.forPublic.revertibleAccumulatedData.privateLogs.filter((l)=>!l.isEmpty());
|
|
79
|
+
} else {
|
|
80
|
+
// Private-only tx: use logs from the `forRollup` member of the tx
|
|
81
|
+
// For private-only txs, all logs are non-revertible
|
|
82
|
+
nonRevertibleInstanceLogs = tx.data.forRollup.end.privateLogs.filter((l)=>!l.isEmpty());
|
|
83
|
+
revertibleInstanceLogs = [];
|
|
84
|
+
}
|
|
85
|
+
return new AllContractDeploymentData(new ContractDeploymentData(nonRevertibleClassLogs, nonRevertibleInstanceLogs), new ContractDeploymentData(revertibleClassLogs, revertibleInstanceLogs));
|
|
86
|
+
}
|
|
87
|
+
}
|
package/dest/contract/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './contract_address.js';
|
|
|
3
3
|
export * from './contract_class.js';
|
|
4
4
|
export * from './contract_class_metadata.js';
|
|
5
5
|
export * from './contract_class_id.js';
|
|
6
|
+
export * from './contract_deployment_data.js';
|
|
6
7
|
export * from './contract_instance.js';
|
|
7
8
|
export * from './contract_metadata.js';
|
|
8
9
|
export * from './contract_instance_update.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contract/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
package/dest/contract/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from './contract_address.js';
|
|
|
3
3
|
export * from './contract_class.js';
|
|
4
4
|
export * from './contract_class_metadata.js';
|
|
5
5
|
export * from './contract_class_id.js';
|
|
6
|
+
export * from './contract_deployment_data.js';
|
|
6
7
|
export * from './contract_instance.js';
|
|
7
8
|
export * from './contract_metadata.js';
|
|
8
9
|
export * from './contract_instance_update.js';
|
|
@@ -92,22 +92,22 @@ export declare const ContractClassSchema: z.ZodObject<{
|
|
|
92
92
|
}, "strip", z.ZodTypeAny, {
|
|
93
93
|
version: 1;
|
|
94
94
|
artifactHash: Fr;
|
|
95
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
96
95
|
privateFunctions: {
|
|
97
96
|
selector: FunctionSelector;
|
|
98
97
|
vkHash: Fr;
|
|
99
98
|
}[];
|
|
99
|
+
packedBytecode: Buffer<ArrayBuffer>;
|
|
100
100
|
}, {
|
|
101
101
|
version: 1;
|
|
102
102
|
artifactHash: string;
|
|
103
|
-
packedBytecode: string | {
|
|
104
|
-
type: "Buffer";
|
|
105
|
-
data: number[];
|
|
106
|
-
};
|
|
107
103
|
privateFunctions: {
|
|
108
104
|
vkHash: string;
|
|
109
105
|
selector?: any;
|
|
110
106
|
}[];
|
|
107
|
+
packedBytecode: string | {
|
|
108
|
+
type: "Buffer";
|
|
109
|
+
data: number[];
|
|
110
|
+
};
|
|
111
111
|
}>;
|
|
112
112
|
/** Commitments to fields of a contract class. */
|
|
113
113
|
interface ContractClassCommitments {
|
|
@@ -150,25 +150,25 @@ export declare const ContractClassWithIdSchema: z.ZodObject<{
|
|
|
150
150
|
id: z.ZodType<Fr, any, string>;
|
|
151
151
|
}, "strip", z.ZodTypeAny, {
|
|
152
152
|
version: 1;
|
|
153
|
-
id: Fr;
|
|
154
153
|
artifactHash: Fr;
|
|
155
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
156
154
|
privateFunctions: {
|
|
157
155
|
selector: FunctionSelector;
|
|
158
156
|
vkHash: Fr;
|
|
159
157
|
}[];
|
|
158
|
+
packedBytecode: Buffer<ArrayBuffer>;
|
|
159
|
+
id: Fr;
|
|
160
160
|
}, {
|
|
161
161
|
version: 1;
|
|
162
|
-
id: string;
|
|
163
162
|
artifactHash: string;
|
|
164
|
-
packedBytecode: string | {
|
|
165
|
-
type: "Buffer";
|
|
166
|
-
data: number[];
|
|
167
|
-
};
|
|
168
163
|
privateFunctions: {
|
|
169
164
|
vkHash: string;
|
|
170
165
|
selector?: any;
|
|
171
166
|
}[];
|
|
167
|
+
packedBytecode: string | {
|
|
168
|
+
type: "Buffer";
|
|
169
|
+
data: number[];
|
|
170
|
+
};
|
|
171
|
+
id: string;
|
|
172
172
|
}>;
|
|
173
173
|
/** A contract class with public bytecode information, and optional private and utility functions. */
|
|
174
174
|
export type ContractClassPublic = {
|
|
@@ -279,8 +279,6 @@ export declare const ContractClassPublicSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
279
279
|
privateFunctionsArtifactTreeRoot: string;
|
|
280
280
|
}>>, "many">;
|
|
281
281
|
}, "strip", z.ZodTypeAny, {
|
|
282
|
-
id: Fr;
|
|
283
|
-
privateFunctionsRoot: Fr;
|
|
284
282
|
privateFunctions: ({
|
|
285
283
|
selector: FunctionSelector;
|
|
286
284
|
vkHash: Fr;
|
|
@@ -295,6 +293,8 @@ export declare const ContractClassPublicSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
295
293
|
artifactTreeSiblingPath: Fr[];
|
|
296
294
|
artifactTreeLeafIndex: number;
|
|
297
295
|
})[];
|
|
296
|
+
id: Fr;
|
|
297
|
+
privateFunctionsRoot: Fr;
|
|
298
298
|
utilityFunctions: ({
|
|
299
299
|
bytecode: Buffer<ArrayBuffer>;
|
|
300
300
|
selector: FunctionSelector;
|
|
@@ -306,8 +306,6 @@ export declare const ContractClassPublicSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
306
306
|
privateFunctionsArtifactTreeRoot: Fr;
|
|
307
307
|
})[];
|
|
308
308
|
}, {
|
|
309
|
-
id: string;
|
|
310
|
-
privateFunctionsRoot: string;
|
|
311
309
|
privateFunctions: ({
|
|
312
310
|
vkHash: string;
|
|
313
311
|
selector?: any;
|
|
@@ -325,6 +323,8 @@ export declare const ContractClassPublicSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
325
323
|
artifactTreeSiblingPath: string[];
|
|
326
324
|
artifactTreeLeafIndex: string | number | bigint;
|
|
327
325
|
})[];
|
|
326
|
+
id: string;
|
|
327
|
+
privateFunctionsRoot: string;
|
|
328
328
|
utilityFunctions: ({
|
|
329
329
|
bytecode: string | {
|
|
330
330
|
type: "Buffer";
|
|
@@ -17,7 +17,7 @@ export declare function createPrivateFunctionMembershipProof(selector: FunctionS
|
|
|
17
17
|
* // Compute function leaf and assert it belongs to the private functions tree
|
|
18
18
|
* function_leaf = pedersen([selector as Field, vk_hash], GENERATOR__FUNCTION_LEAF)
|
|
19
19
|
* computed_private_function_tree_root = compute_root(function_leaf, private_function_tree_sibling_path)
|
|
20
|
-
* assert computed_private_function_tree_root == contract_class.
|
|
20
|
+
* assert computed_private_function_tree_root == contract_class.private_functions_root
|
|
21
21
|
*
|
|
22
22
|
* // Compute artifact leaf and assert it belongs to the artifact
|
|
23
23
|
* artifact_function_leaf = sha256(selector, metadata_hash, sha256(bytecode))
|
|
@@ -72,7 +72,7 @@ import { computePrivateFunctionLeaf, computePrivateFunctionsTree } from './priva
|
|
|
72
72
|
* // Compute function leaf and assert it belongs to the private functions tree
|
|
73
73
|
* function_leaf = pedersen([selector as Field, vk_hash], GENERATOR__FUNCTION_LEAF)
|
|
74
74
|
* computed_private_function_tree_root = compute_root(function_leaf, private_function_tree_sibling_path)
|
|
75
|
-
* assert computed_private_function_tree_root == contract_class.
|
|
75
|
+
* assert computed_private_function_tree_root == contract_class.private_functions_root
|
|
76
76
|
*
|
|
77
77
|
* // Compute artifact leaf and assert it belongs to the artifact
|
|
78
78
|
* artifact_function_leaf = sha256(selector, metadata_hash, sha256(bytecode))
|
package/dest/hash/hash.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import
|
|
3
|
+
import { AztecAddress } from '../aztec-address/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Computes a hash of a given verification key.
|
|
6
6
|
* @param keyAsFields - The verification key as fields.
|
|
@@ -37,6 +37,14 @@ export declare function computeUniqueNoteHash(noteNonce: Fr, siloedNoteHash: Fr)
|
|
|
37
37
|
* @returns A siloed nullifier.
|
|
38
38
|
*/
|
|
39
39
|
export declare function siloNullifier(contract: AztecAddress, innerNullifier: Fr): Promise<Fr>;
|
|
40
|
+
/**
|
|
41
|
+
* Computes the protocol nullifier, which is the hash of the initial tx request siloed with the null msg sender address.
|
|
42
|
+
* @param txRequestHash - The hash of the initial tx request.
|
|
43
|
+
* @returns The siloed value of the protocol nullifier.
|
|
44
|
+
*
|
|
45
|
+
* @dev Must match the implementation in noir-protocol-circuits/crates/types/src/hash.nr > compute_protocol_nullifier
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeProtocolNullifier(txRequestHash: Fr): Promise<Fr>;
|
|
40
48
|
/**
|
|
41
49
|
* Computes a siloed private log tag, given the contract address and the unsiloed tag.
|
|
42
50
|
* A siloed private log tag effectively namespaces a log to a specific contract.
|
package/dest/hash/hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash/hash.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/hash/hash.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC,CAG3D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,aAAa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AW,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,eAMtG;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,EACb,OAAO,GACR,EAAE;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,EAAE,UAAU,CAAC;IACxB,OAAO,EAAE,EAAE,CAAC;IACZ,aAAa,EAAE,EAAE,CAAC;IAClB,OAAO,EAAE,EAAE,CAAC;CACb,MAEA"}
|
package/dest/hash/hash.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { GeneratorIndex } from '@aztec/constants';
|
|
1
|
+
import { GeneratorIndex, NULL_MSG_SENDER_CONTRACT_ADDRESS } from '@aztec/constants';
|
|
2
2
|
import { poseidon2Hash, poseidon2HashWithSeparator, sha256ToField } from '@aztec/foundation/crypto';
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import { AztecAddress } from '../aztec-address/index.js';
|
|
4
5
|
/**
|
|
5
6
|
* Computes a hash of a given verification key.
|
|
6
7
|
* @param keyAsFields - The verification key as fields.
|
|
@@ -55,6 +56,15 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
55
56
|
innerNullifier
|
|
56
57
|
], GeneratorIndex.OUTER_NULLIFIER);
|
|
57
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Computes the protocol nullifier, which is the hash of the initial tx request siloed with the null msg sender address.
|
|
61
|
+
* @param txRequestHash - The hash of the initial tx request.
|
|
62
|
+
* @returns The siloed value of the protocol nullifier.
|
|
63
|
+
*
|
|
64
|
+
* @dev Must match the implementation in noir-protocol-circuits/crates/types/src/hash.nr > compute_protocol_nullifier
|
|
65
|
+
*/ export function computeProtocolNullifier(txRequestHash) {
|
|
66
|
+
return siloNullifier(AztecAddress.fromBigInt(NULL_MSG_SENDER_CONTRACT_ADDRESS), txRequestHash);
|
|
67
|
+
}
|
|
58
68
|
/**
|
|
59
69
|
* Computes a siloed private log tag, given the contract address and the unsiloed tag.
|
|
60
70
|
* A siloed private log tag effectively namespaces a log to a specific contract.
|
|
@@ -38,8 +38,8 @@ export declare const GetPublicLogsResponseSchema: z.ZodObject<{
|
|
|
38
38
|
}>;
|
|
39
39
|
log: ZodFor<import("../logs/public_log.js").PublicLog>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
log: import("../logs/public_log.js").PublicLog;
|
|
42
41
|
id: import("../logs/log_id.js").LogId;
|
|
42
|
+
log: import("../logs/public_log.js").PublicLog;
|
|
43
43
|
}, {
|
|
44
44
|
id: {
|
|
45
45
|
blockNumber: string | number | bigint;
|
|
@@ -5,7 +5,7 @@ import type { NullifierLeaf } from '../trees/nullifier_leaf.js';
|
|
|
5
5
|
import type { PublicDataTreeLeaf } from '../trees/public_data_leaf.js';
|
|
6
6
|
import type { BlockHeader } from '../tx/block_header.js';
|
|
7
7
|
import type { StateReference } from '../tx/state_reference.js';
|
|
8
|
-
import type { WorldStateRevision } from '../world-state/world_state_revision.js';
|
|
8
|
+
import type { WorldStateRevision, WorldStateRevisionWithHandle } from '../world-state/world_state_revision.js';
|
|
9
9
|
/**
|
|
10
10
|
* Type alias for the nullifier tree ID.
|
|
11
11
|
*/
|
|
@@ -119,7 +119,7 @@ export interface MerkleTreeReadOperations {
|
|
|
119
119
|
/**
|
|
120
120
|
* Gets the current revision.
|
|
121
121
|
*/
|
|
122
|
-
getRevision(): WorldStateRevision;
|
|
122
|
+
getRevision(): WorldStateRevision | WorldStateRevisionWithHandle;
|
|
123
123
|
/**
|
|
124
124
|
* Gets sibling path for a leaf.
|
|
125
125
|
* @param treeId - The tree to be queried for a sibling path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merkle_tree_operations.d.ts","sourceRoot":"","sources":["../../src/interfaces/merkle_tree_operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO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