@aztec/foundation 0.75.0 → 0.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dest/config/env_var.d.ts +1 -1
  2. package/dest/config/env_var.d.ts.map +1 -1
  3. package/dest/config/index.d.ts.map +1 -1
  4. package/dest/config/index.js +7 -2
  5. package/dest/index.d.ts +0 -1
  6. package/dest/index.d.ts.map +1 -1
  7. package/dest/index.js +1 -2
  8. package/dest/json-rpc/client/fetch.d.ts +6 -1
  9. package/dest/json-rpc/client/fetch.d.ts.map +1 -1
  10. package/dest/json-rpc/client/fetch.js +2 -2
  11. package/dest/json-rpc/client/safe_json_rpc_client.d.ts +14 -1
  12. package/dest/json-rpc/client/safe_json_rpc_client.d.ts.map +1 -1
  13. package/dest/json-rpc/client/safe_json_rpc_client.js +14 -8
  14. package/dest/json-rpc/test/integration.d.ts +4 -2
  15. package/dest/json-rpc/test/integration.d.ts.map +1 -1
  16. package/dest/json-rpc/test/integration.js +10 -7
  17. package/dest/log/log-filters.d.ts.map +1 -1
  18. package/dest/log/log-filters.js +12 -3
  19. package/dest/log/pino-logger.d.ts +1 -1
  20. package/dest/log/pino-logger.d.ts.map +1 -1
  21. package/dest/log/pino-logger.js +10 -3
  22. package/dest/queue/serial_queue.d.ts +1 -1
  23. package/dest/queue/serial_queue.d.ts.map +1 -1
  24. package/dest/queue/serial_queue.js +1 -1
  25. package/dest/serialize/field_reader.d.ts +6 -6
  26. package/dest/serialize/field_reader.d.ts.map +1 -1
  27. package/dest/serialize/field_reader.js +9 -9
  28. package/package.json +2 -3
  29. package/src/config/env_var.ts +5 -1
  30. package/src/config/index.ts +6 -1
  31. package/src/index.ts +0 -1
  32. package/src/json-rpc/client/fetch.ts +2 -2
  33. package/src/json-rpc/client/safe_json_rpc_client.ts +26 -11
  34. package/src/json-rpc/test/integration.ts +17 -6
  35. package/src/log/log-filters.ts +10 -2
  36. package/src/log/pino-logger.ts +15 -3
  37. package/src/queue/serial_queue.ts +1 -1
  38. package/src/serialize/field_reader.ts +9 -9
  39. package/dest/blob/blob.d.ts +0 -154
  40. package/dest/blob/blob.d.ts.map +0 -1
  41. package/dest/blob/blob.js +0 -264
  42. package/dest/blob/encoding.d.ts +0 -53
  43. package/dest/blob/encoding.d.ts.map +0 -1
  44. package/dest/blob/encoding.js +0 -87
  45. package/dest/blob/errors.d.ts +0 -4
  46. package/dest/blob/errors.d.ts.map +0 -1
  47. package/dest/blob/errors.js +0 -7
  48. package/dest/blob/index.d.ts +0 -6
  49. package/dest/blob/index.d.ts.map +0 -1
  50. package/dest/blob/index.js +0 -22
  51. package/dest/blob/interface.d.ts +0 -10
  52. package/dest/blob/interface.d.ts.map +0 -1
  53. package/dest/blob/interface.js +0 -2
  54. package/dest/blob/mocks.d.ts +0 -20
  55. package/dest/blob/mocks.d.ts.map +0 -1
  56. package/dest/blob/mocks.js +0 -42
  57. package/src/blob/blob.ts +0 -311
  58. package/src/blob/encoding.ts +0 -98
  59. package/src/blob/errors.ts +0 -6
  60. package/src/blob/index.ts +0 -22
  61. package/src/blob/interface.ts +0 -11
  62. package/src/blob/mocks.ts +0 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/foundation",
3
- "version": "0.75.0",
3
+ "version": "0.76.0",
4
4
  "type": "module",
5
5
  "main": "./dest/index.js",
6
6
  "types": "./dest/index.d.ts",
@@ -41,7 +41,6 @@
41
41
  "./wasm": "./dest/wasm/index.js",
42
42
  "./worker": "./dest/worker/index.js",
43
43
  "./bigint-buffer": "./dest/bigint-buffer/index.js",
44
- "./blob": "./dest/blob/index.js",
45
44
  "./types": "./dest/types/index.js",
46
45
  "./schemas": "./dest/schemas/index.js",
47
46
  "./url": "./dest/url/index.js",
@@ -104,7 +103,7 @@
104
103
  ]
105
104
  },
106
105
  "dependencies": {
107
- "@aztec/bb.js": "0.75.0",
106
+ "@aztec/bb.js": "0.76.0",
108
107
  "@koa/cors": "^5.0.0",
109
108
  "@noble/curves": "^1.2.0",
110
109
  "bn.js": "^5.2.1",
@@ -42,6 +42,8 @@ export type EnvVar =
42
42
  | 'DATA_DIRECTORY'
43
43
  | 'DATA_STORE_MAP_SIZE_KB'
44
44
  | 'DEBUG'
45
+ | 'DEBUG_P2P_DISABLE_MESSAGE_VALIDATION'
46
+ | 'DEBUG_P2P_DISABLE_COLOCATION_PENALTY'
45
47
  | 'DEPLOY_AZTEC_CONTRACTS_SALT'
46
48
  | 'DEPLOY_AZTEC_CONTRACTS'
47
49
  | 'ENFORCE_FEES'
@@ -78,10 +80,13 @@ export type EnvVar =
78
80
  | 'OUTBOX_CONTRACT_ADDRESS'
79
81
  | 'P2P_BLOCK_CHECK_INTERVAL_MS'
80
82
  | 'P2P_BLOCK_REQUEST_BATCH_SIZE'
83
+ | 'P2P_BOOTSTRAP_NODE_ENR_VERSION_CHECK'
81
84
  | 'P2P_ENABLED'
82
85
  | 'P2P_GOSSIPSUB_D'
83
86
  | 'P2P_GOSSIPSUB_DHI'
84
87
  | 'P2P_GOSSIPSUB_DLO'
88
+ | 'P2P_GOSSIPSUB_DLAZY'
89
+ | 'P2P_GOSSIPSUB_FLOOD_PUBLISH'
85
90
  | 'P2P_GOSSIPSUB_INTERVAL_MS'
86
91
  | 'P2P_GOSSIPSUB_MCACHE_GOSSIP'
87
92
  | 'P2P_GOSSIPSUB_MCACHE_LENGTH'
@@ -90,7 +95,6 @@ export type EnvVar =
90
95
  | 'P2P_GOSSIPSUB_TX_TOPIC_WEIGHT'
91
96
  | 'P2P_L2_QUEUE_SIZE'
92
97
  | 'P2P_MAX_PEERS'
93
- | 'P2P_MIN_PEERS'
94
98
  | 'P2P_PEER_CHECK_INTERVAL_MS'
95
99
  | 'P2P_PEER_PENALTY_VALUES'
96
100
  | 'P2P_QUERY_FOR_IP'
@@ -72,7 +72,12 @@ export function numberConfigHelper(defaultVal: number): Pick<ConfigMapping, 'par
72
72
  */
73
73
  export function bigintConfigHelper(defaultVal?: bigint): Pick<ConfigMapping, 'parseEnv' | 'defaultValue'> {
74
74
  return {
75
- parseEnv: (val: string) => BigInt(val),
75
+ parseEnv: (val: string) => {
76
+ if (val === '') {
77
+ return defaultVal;
78
+ }
79
+ return BigInt(val);
80
+ },
76
81
  defaultValue: defaultVal,
77
82
  };
78
83
  }
package/src/index.ts CHANGED
@@ -3,7 +3,6 @@ export * as abi from './abi/index.js';
3
3
  export * as asyncMap from './async-map/index.js';
4
4
  export * as aztecAddress from './aztec-address/index.js';
5
5
  export * as bigintBuffer from './bigint-buffer/index.js';
6
- export * as blob from './blob/index.js';
7
6
  export * as collection from './collection/index.js';
8
7
  export * as committable from './committable/index.js';
9
8
  export * as crypto from './crypto/index.js';
@@ -23,7 +23,7 @@ export async function defaultFetch(
23
23
  useApiEndpoints: boolean,
24
24
  extraHeaders: Record<string, string> = {},
25
25
  noRetry = false,
26
- ) {
26
+ ): Promise<{ response: any; headers: { get: (header: string) => string | null | undefined } }> {
27
27
  log.debug(format(`JsonRpcClient.fetch`, host, rpcMethod, '->', body));
28
28
  let resp: Response;
29
29
  try {
@@ -64,7 +64,7 @@ export async function defaultFetch(
64
64
  }
65
65
  }
66
66
 
67
- return responseJson;
67
+ return { response: responseJson, headers: resp.headers };
68
68
  }
69
69
 
70
70
  /**
@@ -1,9 +1,20 @@
1
1
  import { format } from 'util';
2
2
 
3
- import { createLogger } from '../../log/pino-logger.js';
3
+ import { type Logger, createLogger } from '../../log/pino-logger.js';
4
4
  import { type ApiSchema, type ApiSchemaFor, schemaHasMethod } from '../../schemas/api.js';
5
5
  import { defaultFetch } from './fetch.js';
6
6
 
7
+ export type SafeJsonRpcClientOptions = {
8
+ useApiEndpoints?: boolean;
9
+ namespaceMethods?: string | false;
10
+ fetch?: typeof defaultFetch;
11
+ log?: Logger;
12
+ onResponse?: (res: {
13
+ response: any;
14
+ headers: { get: (header: string) => string | null | undefined };
15
+ }) => Promise<void>;
16
+ };
17
+
7
18
  /**
8
19
  * Creates a Proxy object that delegates over RPC and validates outputs against a given schema.
9
20
  * The server is expected to be a JsonRpcServer.
@@ -16,11 +27,12 @@ import { defaultFetch } from './fetch.js';
16
27
  export function createSafeJsonRpcClient<T extends object>(
17
28
  host: string,
18
29
  schema: ApiSchemaFor<T>,
19
- useApiEndpoints: boolean = false,
20
- namespaceMethods?: string | false,
21
- fetch = defaultFetch,
22
- log = createLogger('json-rpc:client'),
30
+ config: SafeJsonRpcClientOptions = {},
23
31
  ): T {
32
+ const fetch = config.fetch ?? defaultFetch;
33
+ const log = config.log ?? createLogger('json-rpc:client');
34
+ const { useApiEndpoints = false, namespaceMethods = false } = config;
35
+
24
36
  let id = 0;
25
37
  const request = async (methodName: string, params: any[]): Promise<any> => {
26
38
  if (!schemaHasMethod(schema, methodName)) {
@@ -30,17 +42,20 @@ export function createSafeJsonRpcClient<T extends object>(
30
42
  const body = { jsonrpc: '2.0', id: id++, method, params };
31
43
 
32
44
  log.debug(format(`request`, method, params));
33
- const res = await fetch(host, method, body, useApiEndpoints);
34
- log.debug(format(`result`, method, res));
45
+ const { response, headers } = await fetch(host, method, body, useApiEndpoints);
46
+ log.debug(format(`result`, method, response));
35
47
 
36
- if (res.error) {
37
- throw res.error;
48
+ if (config.onResponse) {
49
+ await config.onResponse({ response, headers });
50
+ }
51
+ if (response.error) {
52
+ throw response.error;
38
53
  }
39
54
  // TODO(palla/schemas): Find a better way to handle null responses (JSON.stringify(null) is string "null").
40
- if ([null, undefined, 'null', 'undefined'].includes(res.result)) {
55
+ if ([null, undefined, 'null', 'undefined'].includes(response.result)) {
41
56
  return;
42
57
  }
43
- return (schema as ApiSchema)[methodName].returnType().parseAsync(res.result);
58
+ return (schema as ApiSchema)[methodName].returnType().parseAsync(response.result);
44
59
  };
45
60
 
46
61
  const proxy: any = {};
@@ -2,23 +2,34 @@ import type http from 'http';
2
2
 
3
3
  import { type ApiSchemaFor } from '../../schemas/api.js';
4
4
  import { makeFetch } from '../client/fetch.js';
5
- import { createSafeJsonRpcClient } from '../client/safe_json_rpc_client.js';
6
- import { startHttpRpcServer } from '../server/safe_json_rpc_server.js';
7
- import { type SafeJsonRpcServer, createSafeJsonRpcServer } from '../server/safe_json_rpc_server.js';
5
+ import { type SafeJsonRpcClientOptions, createSafeJsonRpcClient } from '../client/safe_json_rpc_client.js';
6
+ import {
7
+ type SafeJsonRpcServer,
8
+ type SafeJsonRpcServerOptions,
9
+ createSafeJsonRpcServer,
10
+ startHttpRpcServer,
11
+ } from '../server/safe_json_rpc_server.js';
8
12
 
9
13
  export type JsonRpcTestContext<T extends object> = {
10
14
  server: SafeJsonRpcServer;
11
15
  client: T;
12
16
  httpServer: http.Server & { port: number };
17
+ url: string;
13
18
  };
14
19
 
15
20
  export async function createJsonRpcTestSetup<T extends object>(
16
21
  handler: T,
17
22
  schema: ApiSchemaFor<T>,
23
+ serverOptions: Partial<SafeJsonRpcServerOptions> = {},
24
+ clientOptions: SafeJsonRpcClientOptions = {},
18
25
  ): Promise<JsonRpcTestContext<T>> {
19
- const server = createSafeJsonRpcServer<T>(handler, schema);
26
+ const server = createSafeJsonRpcServer<T>(handler, schema, serverOptions);
20
27
  const httpServer = await startHttpRpcServer(server, { host: '127.0.0.1' });
21
28
  const noRetryFetch = makeFetch([], true);
22
- const client = createSafeJsonRpcClient<T>(`http://127.0.0.1:${httpServer.port}`, schema, false, false, noRetryFetch);
23
- return { server, client, httpServer };
29
+ const url = `http://127.0.0.1:${httpServer.port}`;
30
+ const client = createSafeJsonRpcClient<T>(url, schema, {
31
+ fetch: noRetryFetch,
32
+ ...clientOptions,
33
+ });
34
+ return { server, client, httpServer, url };
24
35
  }
@@ -4,8 +4,16 @@ export type LogFilters = [string, LogLevel][];
4
4
 
5
5
  export function getLogLevelFromFilters(filters: LogFilters, module: string): LogLevel | undefined {
6
6
  for (const [filterModule, level] of filters) {
7
- if (module.startsWith(filterModule)) {
8
- return level as LogLevel;
7
+ try {
8
+ const regex = new RegExp(filterModule);
9
+ if (regex.test(module)) {
10
+ return level as LogLevel;
11
+ }
12
+ } catch {
13
+ // If regex is invalid, fall back to startsWith check
14
+ if (module.startsWith(filterModule)) {
15
+ return level as LogLevel;
16
+ }
9
17
  }
10
18
  }
11
19
  return undefined;
@@ -11,14 +11,23 @@ import { getLogLevelFromFilters, parseEnv } from './log-filters.js';
11
11
  import { type LogLevel } from './log-levels.js';
12
12
  import { type LogData, type LogFn } from './log_fn.js';
13
13
 
14
- export function createLogger(module: string): Logger {
14
+ export function createLogger(module: string, fixedTerms = {}): Logger {
15
15
  module = logNameHandlers.reduce((moduleName, handler) => handler(moduleName), module.replace(/^aztec:/, ''));
16
16
  const pinoLogger = logger.child({ module }, { level: getLogLevelFromFilters(logFilters, module) });
17
17
 
18
+ // Only perform copy of data if fixed terms are provided
19
+ const hasFixedTerms = Object.keys(fixedTerms).length > 0;
20
+
18
21
  // We check manually for isLevelEnabled to avoid calling processLogData unnecessarily.
19
22
  // Note that isLevelEnabled is missing from the browser version of pino.
20
23
  const logFn = (level: LogLevel, msg: string, data?: unknown) =>
21
- isLevelEnabled(pinoLogger, level) && pinoLogger[level](processLogData((data as LogData) ?? {}), msg);
24
+ isLevelEnabled(pinoLogger, level) &&
25
+ pinoLogger[level](
26
+ hasFixedTerms
27
+ ? processLogData({ ...fixedTerms, ...(data ?? {}) } as LogData)
28
+ : processLogData((data as LogData) ?? {}),
29
+ msg,
30
+ );
22
31
 
23
32
  return {
24
33
  silent: () => {},
@@ -149,7 +158,10 @@ function makeLogger() {
149
158
  if (!isNode) {
150
159
  // We are on the browser.
151
160
  return pino({ ...pinoOpts, browser: { asObject: false } });
152
- } else if (process.env.JEST_WORKER_ID) {
161
+ }
162
+ // If running in a child process then cancel this if statement section by uncommenting below
163
+ // else if (false) {
164
+ else if (process.env.JEST_WORKER_ID) {
153
165
  // We are on jest, so we need sync logging and stream to stderr.
154
166
  // We expect jest/setup.mjs to kick in later and replace set up a pretty logger,
155
167
  // but if for some reason it doesn't, at least we're covered with a default logger.
@@ -61,7 +61,7 @@ export class SerialQueue {
61
61
  * @param fn - The function to enqueue.
62
62
  * @returns A resolution promise. Rejects if the function does, or if the function could not be enqueued.
63
63
  */
64
- public put<T>(fn: () => Promise<T>): Promise<T> {
64
+ public put<T>(fn: () => T | Promise<T>): Promise<Awaited<T>> {
65
65
  return new Promise((resolve, reject) => {
66
66
  const accepted = this.queue.put(async () => {
67
67
  try {
@@ -34,6 +34,15 @@ export class FieldReader {
34
34
  return new FieldReader(fields);
35
35
  }
36
36
 
37
+ /**
38
+ * Returns the current cursor position.
39
+ *
40
+ * @returns The current cursor position.
41
+ */
42
+ public get cursor() {
43
+ return this.index;
44
+ }
45
+
37
46
  /**
38
47
  * Skips the next n fields.
39
48
  *
@@ -46,15 +55,6 @@ export class FieldReader {
46
55
  this.index += n;
47
56
  }
48
57
 
49
- /**
50
- * Returns the current cursor position.
51
- *
52
- * @returns The current cursor position.
53
- */
54
- public get cursor() {
55
- return this.index;
56
- }
57
-
58
58
  /**
59
59
  * Reads a single field from the array.
60
60
  *
@@ -1,154 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import cKzg from 'c-kzg';
4
- import type { Blob as BlobBuffer } from 'c-kzg';
5
- import { Fr } from '../fields/index.js';
6
- import { BufferReader } from '../serialize/index.js';
7
- import { type BlobJson } from './interface.js';
8
- export declare const VERSIONED_HASH_VERSION_KZG = 1;
9
- /**
10
- * A class to create, manage, and prove EVM blobs.
11
- */
12
- export declare class Blob {
13
- /** The blob to be broadcast on L1 in bytes form. */
14
- readonly data: BlobBuffer;
15
- /** The hash of all tx effects inside the blob. Used in generating the challenge z and proving that we have included all required effects. */
16
- readonly fieldsHash: Fr;
17
- /** Challenge point z (= H(H(tx_effects), kzgCommmitment). Used such that p(z) = y. */
18
- readonly challengeZ: Fr;
19
- /** Evaluation y = p(z), where p() is the blob polynomial. BLS12 field element, rep. as BigNum in nr, bigint in ts. */
20
- readonly evaluationY: Buffer;
21
- /** Commitment to the blob C. Used in compressed BLS12 point format (48 bytes). */
22
- readonly commitment: Buffer;
23
- /** KZG opening proof for y = p(z). The commitment to quotient polynomial Q, used in compressed BLS12 point format (48 bytes). */
24
- readonly proof: Buffer;
25
- constructor(
26
- /** The blob to be broadcast on L1 in bytes form. */
27
- data: BlobBuffer,
28
- /** The hash of all tx effects inside the blob. Used in generating the challenge z and proving that we have included all required effects. */
29
- fieldsHash: Fr,
30
- /** Challenge point z (= H(H(tx_effects), kzgCommmitment). Used such that p(z) = y. */
31
- challengeZ: Fr,
32
- /** Evaluation y = p(z), where p() is the blob polynomial. BLS12 field element, rep. as BigNum in nr, bigint in ts. */
33
- evaluationY: Buffer,
34
- /** Commitment to the blob C. Used in compressed BLS12 point format (48 bytes). */
35
- commitment: Buffer,
36
- /** KZG opening proof for y = p(z). The commitment to quotient polynomial Q, used in compressed BLS12 point format (48 bytes). */
37
- proof: Buffer);
38
- /**
39
- * The encoded version of the blob will determine the end of the blob based on the transaction encoding.
40
- * This is required when the fieldsHash of a blob will contain trailing zeros.
41
- *
42
- * See `./encoding.ts` for more details.
43
- *
44
- * This method is used to create a Blob from a buffer.
45
- * @param blob - The buffer to create the Blob from.
46
- * @param multiBlobFieldsHash - The fields hash to use for the Blob.
47
- * @returns A Blob created from the buffer.
48
- *
49
- * @throws If unable to deserialize the blob.
50
- */
51
- static fromEncodedBlobBuffer(blob: BlobBuffer, multiBlobFieldsHash?: Fr): Promise<Blob>;
52
- /**
53
- * Create a Blob from an array of fields.
54
- *
55
- * @param fields - The array of fields to create the Blob from.
56
- * @param multiBlobFieldsHash - The fields hash to use for the Blob.
57
- * @returns A Blob created from the array of fields.
58
- */
59
- static fromFields(fields: Fr[], multiBlobFieldsHash?: Fr): Promise<Blob>;
60
- /**
61
- * Create a Blob from a JSON object.
62
- *
63
- * Blobs will be in this form when requested from the blob sink, or from
64
- * the beacon chain via `getBlobSidecars`
65
- * https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Beacon/getBlobSidecars
66
- *
67
- * @dev WARNING: by default json deals with encoded buffers
68
- *
69
- * @param json - The JSON object to create the Blob from.
70
- * @returns A Blob created from the JSON object.
71
- */
72
- static fromJson(json: BlobJson): Promise<Blob>;
73
- /**
74
- * Get the JSON representation of the blob.
75
- *
76
- * @dev WARNING: by default json deals with encoded buffers
77
- * @param index - optional - The index of the blob in the block.
78
- * @returns The JSON representation of the blob.
79
- */
80
- toJson(index?: number): BlobJson;
81
- /**
82
- * Get the fields from the blob.
83
- *
84
- * @dev WARNING: this method does not take into account trailing zeros
85
- *
86
- * @returns The fields from the blob.
87
- */
88
- toFields(): Fr[];
89
- /**
90
- * Get the encoded fields from the blob.
91
- *
92
- * @dev This method takes into account trailing zeros
93
- *
94
- * @returns The encoded fields from the blob.
95
- *
96
- * @throws If unable to deserialize the blob.
97
- */
98
- toEncodedFields(): Fr[];
99
- /**
100
- * Get the commitment fields from the blob.
101
- *
102
- * The 48-byte commitment is encoded into two field elements:
103
- * +------------------+------------------+
104
- * | Field Element 1 | Field Element 2 |
105
- * | [bytes 0-31] | [bytes 32-47] |
106
- * +------------------+------------------+
107
- * | 32 bytes | 16 bytes |
108
- * +------------------+------------------+
109
- * @returns The commitment fields from the blob.
110
- */
111
- commitmentToFields(): [Fr, Fr];
112
- getEthVersionedBlobHash(): Buffer;
113
- static getEthVersionedBlobHash(commitment: Buffer): Buffer;
114
- /**
115
- * Get the buffer representation of the ENTIRE blob.
116
- *
117
- * @dev WARNING: this buffer contains all metadata aswell as the data itself
118
- *
119
- * @returns The buffer representation of the blob.
120
- */
121
- toBuffer(): Buffer;
122
- /**
123
- * Create a Blob from a buffer.
124
- *
125
- * @dev WARNING: this method contains all metadata aswell as the data itself
126
- *
127
- * @param buf - The buffer to create the Blob from.
128
- * @returns A Blob created from the buffer.
129
- */
130
- static fromBuffer(buf: Buffer | BufferReader): Blob;
131
- /**
132
- * Get the size of the blob in bytes
133
- */
134
- getSize(): number;
135
- /**
136
- * Returns a proof of opening of the blob to verify on L1 using the point evaluation precompile:
137
- *
138
- * input[:32] - versioned_hash
139
- * input[32:64] - z
140
- * input[64:96] - y
141
- * input[96:144] - commitment C
142
- * input[144:192] - proof (a commitment to the quotient polynomial q(X))
143
- *
144
- * See https://eips.ethereum.org/EIPS/eip-4844#point-evaluation-precompile
145
- */
146
- getEthBlobEvaluationInputs(): `0x${string}`;
147
- static getEthBlobEvaluationInputs(blobs: Blob[]): `0x${string}`;
148
- static getViemKzgInstance(): {
149
- blobToKzgCommitment: typeof cKzg.blobToKzgCommitment;
150
- computeBlobKzgProof: typeof cKzg.computeBlobKzgProof;
151
- };
152
- static getBlobs(fields: Fr[]): Promise<Blob[]>;
153
- }
154
- //# sourceMappingURL=blob.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../../src/blob/blob.ts"],"names":[],"mappings":";;AACA,OAAO,IAAI,MAAM,OAAO,CAAC;AACzB,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAqB,MAAM,uBAAuB,CAAC;AAGxE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C,eAAO,MAAM,0BAA0B,IAAO,CAAC;AAE/C;;GAEG;AACH,qBAAa,IAAI;IAEb,oDAAoD;aACpC,IAAI,EAAE,UAAU;IAChC,6IAA6I;aAC7H,UAAU,EAAE,EAAE;IAC9B,sFAAsF;aACtE,UAAU,EAAE,EAAE;IAC9B,sHAAsH;aACtG,WAAW,EAAE,MAAM;IACnC,kFAAkF;aAClE,UAAU,EAAE,MAAM;IAClC,iIAAiI;aACjH,KAAK,EAAE,MAAM;;IAX7B,oDAAoD;IACpC,IAAI,EAAE,UAAU;IAChC,6IAA6I;IAC7H,UAAU,EAAE,EAAE;IAC9B,sFAAsF;IACtE,UAAU,EAAE,EAAE;IAC9B,sHAAsH;IACtG,WAAW,EAAE,MAAM;IACnC,kFAAkF;IAClE,UAAU,EAAE,MAAM;IAClC,iIAAiI;IACjH,KAAK,EAAE,MAAM;IAG/B;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,qBAAqB,CAAC,IAAI,EAAE,UAAU,EAAE,mBAAmB,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAWvF;;;;;;OAMG;WACU,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,mBAAmB,CAAC,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAuB9E;;;;;;;;;;;OAWG;WACU,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAepD;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ;IAWhC;;;;;;OAMG;IACH,QAAQ,IAAI,EAAE,EAAE;IAIhB;;;;;;;;OAQG;IACH,eAAe,IAAI,EAAE,EAAE;IAUvB;;;;;;;;;;;OAWG;IACH,kBAAkB,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;IAK9B,uBAAuB,IAAI,MAAM;IAMjC,MAAM,CAAC,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAM1D;;;;;;OAMG;IACH,QAAQ,IAAI,MAAM;IAiBlB;;;;;;;OAOG;IACH,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAYnD;;OAEG;IACH,OAAO;IAIP;;;;;;;;;;OAUG;IACH,0BAA0B,IAAI,KAAK,MAAM,EAAE;IAW3C,MAAM,CAAC,0BAA0B,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,MAAM,EAAE;IAmB/D,MAAM,CAAC,kBAAkB;;;;WASZ,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAUrD"}