@aztec/stdlib 3.0.0-nightly.20250908 → 3.0.0-nightly.20250910

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.
Files changed (95) hide show
  1. package/dest/block/proposal/attestations_and_signers.d.ts +48 -0
  2. package/dest/block/proposal/attestations_and_signers.d.ts.map +1 -0
  3. package/dest/block/proposal/attestations_and_signers.js +99 -0
  4. package/dest/block/proposal/index.d.ts +1 -0
  5. package/dest/block/proposal/index.d.ts.map +1 -1
  6. package/dest/block/proposal/index.js +1 -0
  7. package/dest/interfaces/block-builder.d.ts +5 -6
  8. package/dest/interfaces/block-builder.d.ts.map +1 -1
  9. package/dest/interfaces/proving-job.d.ts +24 -24
  10. package/dest/interfaces/proving-job.d.ts.map +1 -1
  11. package/dest/interfaces/proving-job.js +15 -15
  12. package/dest/interfaces/server_circuit_prover.d.ts +4 -8
  13. package/dest/interfaces/server_circuit_prover.d.ts.map +1 -1
  14. package/dest/interfaces/validator.d.ts +3 -0
  15. package/dest/interfaces/validator.d.ts.map +1 -1
  16. package/dest/kernel/private_kernel_prover_output.d.ts +1 -1
  17. package/dest/kernel/private_kernel_prover_output.d.ts.map +1 -1
  18. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts +2 -0
  19. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.d.ts.map +1 -1
  20. package/dest/kernel/private_to_public_kernel_circuit_public_inputs.js +7 -0
  21. package/dest/noir/index.d.ts +9 -0
  22. package/dest/noir/index.d.ts.map +1 -1
  23. package/dest/p2p/signature_utils.d.ts +2 -1
  24. package/dest/p2p/signature_utils.d.ts.map +1 -1
  25. package/dest/p2p/signature_utils.js +1 -0
  26. package/dest/proofs/client_ivc_proof.d.ts +5 -8
  27. package/dest/proofs/client_ivc_proof.d.ts.map +1 -1
  28. package/dest/proofs/client_ivc_proof.js +27 -20
  29. package/dest/proofs/index.d.ts +1 -0
  30. package/dest/proofs/index.d.ts.map +1 -1
  31. package/dest/proofs/index.js +1 -0
  32. package/dest/proofs/proof_data.d.ts +20 -0
  33. package/dest/proofs/proof_data.d.ts.map +1 -0
  34. package/dest/proofs/proof_data.js +22 -0
  35. package/dest/proofs/proving_request_type.d.ts +12 -13
  36. package/dest/proofs/proving_request_type.d.ts.map +1 -1
  37. package/dest/proofs/proving_request_type.js +12 -12
  38. package/dest/rollup/index.d.ts +1 -3
  39. package/dest/rollup/index.d.ts.map +1 -1
  40. package/dest/rollup/index.js +1 -3
  41. package/dest/rollup/private_base_rollup_inputs.d.ts +5 -5
  42. package/dest/rollup/private_base_rollup_inputs.d.ts.map +1 -1
  43. package/dest/rollup/private_base_rollup_inputs.js +7 -9
  44. package/dest/rollup/public_base_rollup_inputs.d.ts +5 -5
  45. package/dest/rollup/public_base_rollup_inputs.d.ts.map +1 -1
  46. package/dest/rollup/public_base_rollup_inputs.js +7 -9
  47. package/dest/rollup/public_tube_private_inputs.d.ts +19 -0
  48. package/dest/rollup/public_tube_private_inputs.d.ts.map +1 -0
  49. package/dest/rollup/public_tube_private_inputs.js +38 -0
  50. package/dest/stats/stats.d.ts +1 -1
  51. package/dest/stats/stats.d.ts.map +1 -1
  52. package/dest/tests/factories.d.ts +4 -1
  53. package/dest/tests/factories.d.ts.map +1 -1
  54. package/dest/tests/factories.js +9 -15
  55. package/dest/tests/mocks.d.ts +2 -0
  56. package/dest/tests/mocks.d.ts.map +1 -1
  57. package/dest/tests/mocks.js +5 -1
  58. package/dest/tx/tx.d.ts +0 -2
  59. package/dest/tx/tx.d.ts.map +1 -1
  60. package/dest/tx/tx.js +2 -3
  61. package/package.json +8 -8
  62. package/src/block/proposal/attestations_and_signers.ts +121 -0
  63. package/src/block/proposal/index.ts +1 -0
  64. package/src/interfaces/block-builder.ts +9 -6
  65. package/src/interfaces/proving-job.ts +19 -14
  66. package/src/interfaces/server_circuit_prover.ts +13 -13
  67. package/src/interfaces/validator.ts +7 -0
  68. package/src/kernel/private_kernel_prover_output.ts +1 -1
  69. package/src/kernel/private_to_public_kernel_circuit_public_inputs.ts +9 -0
  70. package/src/noir/index.ts +9 -0
  71. package/src/p2p/signature_utils.ts +1 -0
  72. package/src/proofs/client_ivc_proof.ts +26 -20
  73. package/src/proofs/index.ts +1 -0
  74. package/src/proofs/proof_data.ts +39 -0
  75. package/src/proofs/proving_request_type.ts +1 -3
  76. package/src/rollup/index.ts +1 -3
  77. package/src/rollup/private_base_rollup_inputs.ts +8 -8
  78. package/src/rollup/public_base_rollup_inputs.ts +5 -8
  79. package/src/rollup/public_tube_private_inputs.ts +46 -0
  80. package/src/stats/stats.ts +2 -2
  81. package/src/tests/factories.ts +20 -23
  82. package/src/tests/mocks.ts +13 -1
  83. package/src/tx/tx.ts +2 -3
  84. package/dest/rollup/private_tube_data.d.ts +0 -15
  85. package/dest/rollup/private_tube_data.d.ts.map +0 -1
  86. package/dest/rollup/private_tube_data.js +0 -25
  87. package/dest/rollup/public_tube_data.d.ts +0 -15
  88. package/dest/rollup/public_tube_data.d.ts.map +0 -1
  89. package/dest/rollup/public_tube_data.js +0 -25
  90. package/dest/rollup/tube_inputs.d.ts +0 -43
  91. package/dest/rollup/tube_inputs.d.ts.map +0 -1
  92. package/dest/rollup/tube_inputs.js +0 -63
  93. package/src/rollup/private_tube_data.ts +0 -35
  94. package/src/rollup/public_tube_data.ts +0 -35
  95. package/src/rollup/tube_inputs.ts +0 -77
@@ -1,15 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader } from '@aztec/foundation/serialize';
3
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export declare class PublicTubeData {
7
- publicInputs: PrivateToPublicKernelCircuitPublicInputs;
8
- proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>;
9
- vkData: VkData;
10
- constructor(publicInputs: PrivateToPublicKernelCircuitPublicInputs, proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>, vkData: VkData);
11
- static empty(): PublicTubeData;
12
- static fromBuffer(buffer: Buffer | BufferReader): PublicTubeData;
13
- toBuffer(): Buffer<ArrayBufferLike>;
14
- }
15
- //# sourceMappingURL=public_tube_data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public_tube_data.d.ts","sourceRoot":"","sources":["../../src/rollup/public_tube_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yCAAyC,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EAAE,wCAAwC,EAAE,MAAM,6DAA6D,CAAC;AACvH,OAAO,EAAE,cAAc,EAA2B,MAAM,8BAA8B,CAAC;AACvF,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,cAAc;IAEhB,YAAY,EAAE,wCAAwC;IACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC;IACvE,MAAM,EAAE,MAAM;gBAFd,YAAY,EAAE,wCAAwC,EACtD,KAAK,EAAE,cAAc,CAAC,OAAO,yCAAyC,CAAC,EACvE,MAAM,EAAE,MAAM;IAGvB,MAAM,CAAC,KAAK;IAQZ,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAS/C,QAAQ;CAGT"}
@@ -1,25 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
4
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
5
- import { VkData } from '../vks/index.js';
6
- export class PublicTubeData {
7
- publicInputs;
8
- proof;
9
- vkData;
10
- constructor(publicInputs, proof, vkData){
11
- this.publicInputs = publicInputs;
12
- this.proof = proof;
13
- this.vkData = vkData;
14
- }
15
- static empty() {
16
- return new PublicTubeData(PrivateToPublicKernelCircuitPublicInputs.empty(), makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), VkData.empty());
17
- }
18
- static fromBuffer(buffer) {
19
- const reader = BufferReader.asReader(buffer);
20
- return new PublicTubeData(reader.readObject(PrivateToPublicKernelCircuitPublicInputs), RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH), reader.readObject(VkData));
21
- }
22
- toBuffer() {
23
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
24
- }
25
- }
@@ -1,43 +0,0 @@
1
- import { BufferReader } from '@aztec/foundation/serialize';
2
- import type { FieldsOf } from '@aztec/foundation/types';
3
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
4
- /**
5
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
6
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
7
- */
8
- export declare class TubeInputs {
9
- usePublicTailVk: boolean;
10
- clientIVCData: ClientIvcProof;
11
- constructor(usePublicTailVk: boolean, clientIVCData: ClientIvcProof);
12
- static from(fields: FieldsOf<TubeInputs>): TubeInputs;
13
- static getFields(fields: FieldsOf<TubeInputs>): readonly [boolean, ClientIvcProof];
14
- /**
15
- * Serializes the inputs to a buffer.
16
- * @returns The inputs serialized to a buffer.
17
- */
18
- toBuffer(): Buffer<ArrayBufferLike>;
19
- /**
20
- * Serializes the inputs to a hex string.
21
- * @returns The instance serialized to a hex string.
22
- */
23
- toString(): `0x${string}`;
24
- /**
25
- * Deserializes the inputs from a buffer.
26
- * @param buffer - The buffer to deserialize from.
27
- * @returns A new TubeInputs instance.
28
- */
29
- static fromBuffer(buffer: Buffer | BufferReader): TubeInputs;
30
- isEmpty(): boolean;
31
- /**
32
- * Deserializes the inputs from a hex string.
33
- * @param str - A hex string to deserialize from.
34
- * @returns A new TubeInputs instance.
35
- */
36
- static fromString(str: string): TubeInputs;
37
- static empty(): TubeInputs;
38
- /** Returns a hex representation for JSON serialization. */
39
- toJSON(): Buffer<ArrayBufferLike>;
40
- /** Creates an instance from a hex string. */
41
- static get schema(): import("zod").ZodType<TubeInputs, any, string>;
42
- }
43
- //# sourceMappingURL=tube_inputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tube_inputs.d.ts","sourceRoot":"","sources":["../../src/rollup/tube_inputs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAE9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;GAGG;AACH,qBAAa,UAAU;IAEZ,eAAe,EAAE,OAAO;IACxB,aAAa,EAAE,cAAc;gBAD7B,eAAe,EAAE,OAAO,EACxB,aAAa,EAAE,cAAc;IAGtC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,UAAU;IAIrD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,UAAU,CAAC;IAI7C;;;OAGG;IACH,QAAQ;IAIR;;;OAGG;IACH,QAAQ;IAIR;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU;IAK5D,OAAO,IAAI,OAAO;IAGlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM,CAAC,KAAK;IAIZ,2DAA2D;IAC3D,MAAM;IAIN,6CAA6C;IAC7C,MAAM,KAAK,MAAM,mDAEhB;CACF"}
@@ -1,63 +0,0 @@
1
- import { bufferSchemaFor } from '@aztec/foundation/schemas';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
- import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
4
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
5
- /**
6
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
7
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
8
- */ export class TubeInputs {
9
- usePublicTailVk;
10
- clientIVCData;
11
- constructor(usePublicTailVk, clientIVCData){
12
- this.usePublicTailVk = usePublicTailVk;
13
- this.clientIVCData = clientIVCData;
14
- }
15
- static from(fields) {
16
- return new TubeInputs(...TubeInputs.getFields(fields));
17
- }
18
- static getFields(fields) {
19
- return [
20
- fields.usePublicTailVk,
21
- fields.clientIVCData
22
- ];
23
- }
24
- /**
25
- * Serializes the inputs to a buffer.
26
- * @returns The inputs serialized to a buffer.
27
- */ toBuffer() {
28
- return serializeToBuffer(...TubeInputs.getFields(this));
29
- }
30
- /**
31
- * Serializes the inputs to a hex string.
32
- * @returns The instance serialized to a hex string.
33
- */ toString() {
34
- return bufferToHex(this.toBuffer());
35
- }
36
- /**
37
- * Deserializes the inputs from a buffer.
38
- * @param buffer - The buffer to deserialize from.
39
- * @returns A new TubeInputs instance.
40
- */ static fromBuffer(buffer) {
41
- const reader = BufferReader.asReader(buffer);
42
- return new TubeInputs(reader.readBoolean(), reader.readObject(ClientIvcProof));
43
- }
44
- isEmpty() {
45
- return this.clientIVCData.isEmpty();
46
- }
47
- /**
48
- * Deserializes the inputs from a hex string.
49
- * @param str - A hex string to deserialize from.
50
- * @returns A new TubeInputs instance.
51
- */ static fromString(str) {
52
- return TubeInputs.fromBuffer(hexToBuffer(str));
53
- }
54
- static empty() {
55
- return new TubeInputs(false, ClientIvcProof.empty());
56
- }
57
- /** Returns a hex representation for JSON serialization. */ toJSON() {
58
- return this.toBuffer();
59
- }
60
- /** Creates an instance from a hex string. */ static get schema() {
61
- return bufferSchemaFor(TubeInputs);
62
- }
63
- }
@@ -1,35 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
-
4
- import { PrivateToRollupKernelCircuitPublicInputs } from '../kernel/private_to_rollup_kernel_circuit_public_inputs.js';
5
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
6
- import { VkData } from '../vks/index.js';
7
-
8
- export class PrivateTubeData {
9
- constructor(
10
- public publicInputs: PrivateToRollupKernelCircuitPublicInputs,
11
- public proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
12
- public vkData: VkData,
13
- ) {}
14
-
15
- static empty() {
16
- return new PrivateTubeData(
17
- PrivateToRollupKernelCircuitPublicInputs.empty(),
18
- makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
19
- VkData.empty(),
20
- );
21
- }
22
-
23
- static fromBuffer(buffer: Buffer | BufferReader) {
24
- const reader = BufferReader.asReader(buffer);
25
- return new PrivateTubeData(
26
- reader.readObject(PrivateToRollupKernelCircuitPublicInputs),
27
- RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
28
- reader.readObject(VkData),
29
- );
30
- }
31
-
32
- toBuffer() {
33
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
34
- }
35
- }
@@ -1,35 +0,0 @@
1
- import { NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH } from '@aztec/constants';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
-
4
- import { PrivateToPublicKernelCircuitPublicInputs } from '../kernel/private_to_public_kernel_circuit_public_inputs.js';
5
- import { RecursiveProof, makeEmptyRecursiveProof } from '../proofs/recursive_proof.js';
6
- import { VkData } from '../vks/index.js';
7
-
8
- export class PublicTubeData {
9
- constructor(
10
- public publicInputs: PrivateToPublicKernelCircuitPublicInputs,
11
- public proof: RecursiveProof<typeof NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH>,
12
- public vkData: VkData,
13
- ) {}
14
-
15
- static empty() {
16
- return new PublicTubeData(
17
- PrivateToPublicKernelCircuitPublicInputs.empty(),
18
- makeEmptyRecursiveProof(NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
19
- VkData.empty(),
20
- );
21
- }
22
-
23
- static fromBuffer(buffer: Buffer | BufferReader) {
24
- const reader = BufferReader.asReader(buffer);
25
- return new PublicTubeData(
26
- reader.readObject(PrivateToPublicKernelCircuitPublicInputs),
27
- RecursiveProof.fromBuffer(reader, NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH),
28
- reader.readObject(VkData),
29
- );
30
- }
31
-
32
- toBuffer() {
33
- return serializeToBuffer(this.publicInputs, this.proof, this.vkData);
34
- }
35
- }
@@ -1,77 +0,0 @@
1
- import { bufferSchemaFor } from '@aztec/foundation/schemas';
2
- import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
3
- import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
4
- import type { FieldsOf } from '@aztec/foundation/types';
5
-
6
- import { ClientIvcProof } from '../proofs/client_ivc_proof.js';
7
-
8
- /**
9
- * Inputs for the tube circuit, which turns a client IVC proof folding stack into an ultrahonk proof.
10
- * 'usePublicTailVk' signifies if we should prove this with the public or private kernel tail client IVC VKs.
11
- */
12
- export class TubeInputs {
13
- constructor(
14
- public usePublicTailVk: boolean,
15
- public clientIVCData: ClientIvcProof,
16
- ) {}
17
-
18
- static from(fields: FieldsOf<TubeInputs>): TubeInputs {
19
- return new TubeInputs(...TubeInputs.getFields(fields));
20
- }
21
-
22
- static getFields(fields: FieldsOf<TubeInputs>) {
23
- return [fields.usePublicTailVk, fields.clientIVCData] as const;
24
- }
25
-
26
- /**
27
- * Serializes the inputs to a buffer.
28
- * @returns The inputs serialized to a buffer.
29
- */
30
- toBuffer() {
31
- return serializeToBuffer(...TubeInputs.getFields(this));
32
- }
33
-
34
- /**
35
- * Serializes the inputs to a hex string.
36
- * @returns The instance serialized to a hex string.
37
- */
38
- toString() {
39
- return bufferToHex(this.toBuffer());
40
- }
41
-
42
- /**
43
- * Deserializes the inputs from a buffer.
44
- * @param buffer - The buffer to deserialize from.
45
- * @returns A new TubeInputs instance.
46
- */
47
- static fromBuffer(buffer: Buffer | BufferReader): TubeInputs {
48
- const reader = BufferReader.asReader(buffer);
49
- return new TubeInputs(reader.readBoolean(), reader.readObject(ClientIvcProof));
50
- }
51
-
52
- isEmpty(): boolean {
53
- return this.clientIVCData.isEmpty();
54
- }
55
- /**
56
- * Deserializes the inputs from a hex string.
57
- * @param str - A hex string to deserialize from.
58
- * @returns A new TubeInputs instance.
59
- */
60
- static fromString(str: string) {
61
- return TubeInputs.fromBuffer(hexToBuffer(str));
62
- }
63
-
64
- static empty() {
65
- return new TubeInputs(false, ClientIvcProof.empty());
66
- }
67
-
68
- /** Returns a hex representation for JSON serialization. */
69
- toJSON() {
70
- return this.toBuffer();
71
- }
72
-
73
- /** Creates an instance from a hex string. */
74
- static get schema() {
75
- return bufferSchemaFor(TubeInputs);
76
- }
77
- }