@aztec/stdlib 0.84.0-nightly.20250407 → 0.84.0-nightly.20250408
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/block/in_block.d.ts.map +1 -1
- package/dest/block/l2_block_source.d.ts +4 -5
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +2 -3
- package/dest/interfaces/aztec-node.d.ts +5 -6
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +2 -3
- package/dest/interfaces/pxe.d.ts +5 -7
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +2 -7
- package/dest/tx/index.d.ts +1 -0
- package/dest/tx/index.d.ts.map +1 -1
- package/dest/tx/index.js +1 -0
- package/dest/tx/indexed_tx_effect.d.ts +24 -0
- package/dest/tx/indexed_tx_effect.d.ts.map +1 -0
- package/dest/tx/indexed_tx_effect.js +14 -0
- package/dest/tx/tx_hash.d.ts.map +1 -1
- package/dest/tx/tx_hash.js +1 -4
- package/package.json +6 -6
- package/src/block/in_block.ts +1 -0
- package/src/block/l2_block_source.ts +4 -5
- package/src/interfaces/archiver.ts +2 -3
- package/src/interfaces/aztec-node.ts +7 -6
- package/src/interfaces/pxe.ts +15 -11
- package/src/tx/index.ts +1 -0
- package/src/tx/indexed_tx_effect.ts +17 -0
- package/src/tx/tx_hash.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"in_block.d.ts","sourceRoot":"","sources":["../../src/block/in_block.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"in_block.d.ts","sourceRoot":"","sources":["../../src/block/in_block.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAMpD;AAED,wBAAsB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAMjF;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,UAAU,EAAE,MAAM,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;YAM/D"}
|
|
@@ -4,10 +4,9 @@ import type { EventEmitter } from 'events';
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
6
6
|
import type { BlockHeader } from '../tx/block_header.js';
|
|
7
|
-
import type {
|
|
7
|
+
import type { IndexedTxEffect } from '../tx/indexed_tx_effect.js';
|
|
8
8
|
import type { TxHash } from '../tx/tx_hash.js';
|
|
9
9
|
import type { TxReceipt } from '../tx/tx_receipt.js';
|
|
10
|
-
import type { InBlock } from './in_block.js';
|
|
11
10
|
import type { L2Block } from './l2_block.js';
|
|
12
11
|
import type { PublishedL2Block } from './published_l2_block.js';
|
|
13
12
|
/**
|
|
@@ -58,10 +57,10 @@ export interface L2BlockSource {
|
|
|
58
57
|
getPublishedBlocks(from: number, limit: number, proven?: boolean): Promise<PublishedL2Block[]>;
|
|
59
58
|
/**
|
|
60
59
|
* Gets a tx effect.
|
|
61
|
-
* @param txHash - The hash of
|
|
62
|
-
* @returns The requested tx effect.
|
|
60
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
61
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
63
62
|
*/
|
|
64
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
63
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
65
64
|
/**
|
|
66
65
|
* Gets a receipt of a settled tx.
|
|
67
66
|
* @param txHash - The hash of a tx we try to get the receipt for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"l2_block_source.d.ts","sourceRoot":"","sources":["../../src/block/l2_block_source.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"l2_block_source.d.ts","sourceRoot":"","sources":["../../src/block/l2_block_source.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,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version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/interfaces/archiver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAK9D,OAAO,EAAE,KAAK,aAAa,EAAgB,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,sBAAsB,CAAC;AAK9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAOnF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,mBAAmB,EACvE,OAAO,GAAG,MAAM,CACjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CA6CvD,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { inBlockSchemaFor } from '../block/in_block.js';
|
|
3
2
|
import { L2Block } from '../block/l2_block.js';
|
|
4
3
|
import { L2TipsSchema } from '../block/l2_block_source.js';
|
|
5
4
|
import { PublishedL2BlockSchema } from '../block/published_l2_block.js';
|
|
@@ -10,7 +9,7 @@ import { PrivateLog } from '../logs/private_log.js';
|
|
|
10
9
|
import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
11
10
|
import { optional, schemas } from '../schemas/schemas.js';
|
|
12
11
|
import { BlockHeader } from '../tx/block_header.js';
|
|
13
|
-
import {
|
|
12
|
+
import { indexedTxSchema } from '../tx/indexed_tx_effect.js';
|
|
14
13
|
import { TxHash } from '../tx/tx_hash.js';
|
|
15
14
|
import { TxReceipt } from '../tx/tx_receipt.js';
|
|
16
15
|
import { GetContractClassLogsResponseSchema, GetPublicLogsResponseSchema } from './get_logs_response.js';
|
|
@@ -26,7 +25,7 @@ export const ArchiverApiSchema = {
|
|
|
26
25
|
])).returns(BlockHeader.schema.optional()),
|
|
27
26
|
getBlocks: z.function().args(schemas.Integer, schemas.Integer, optional(z.boolean())).returns(z.array(L2Block.schema)),
|
|
28
27
|
getPublishedBlocks: z.function().args(schemas.Integer, schemas.Integer, optional(z.boolean())).returns(z.array(PublishedL2BlockSchema)),
|
|
29
|
-
getTxEffect: z.function().args(TxHash.schema).returns(
|
|
28
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
30
29
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
31
30
|
getL2SlotNumber: z.function().args().returns(schemas.BigInt),
|
|
32
31
|
getL2EpochNumber: z.function().args().returns(schemas.BigInt),
|
|
@@ -17,8 +17,7 @@ import { type ApiSchemaFor } from '../schemas/schemas.js';
|
|
|
17
17
|
import { MerkleTreeId } from '../trees/merkle_tree_id.js';
|
|
18
18
|
import { NullifierMembershipWitness } from '../trees/nullifier_membership_witness.js';
|
|
19
19
|
import { PublicDataWitness } from '../trees/public_data_witness.js';
|
|
20
|
-
import { BlockHeader, PublicSimulationOutput, Tx, TxHash, TxReceipt, type TxValidationResult } from '../tx/index.js';
|
|
21
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
20
|
+
import { BlockHeader, type IndexedTxEffect, PublicSimulationOutput, Tx, TxHash, TxReceipt, type TxValidationResult } from '../tx/index.js';
|
|
22
21
|
import type { ValidatorsStats } from '../validators/types.js';
|
|
23
22
|
import { type ComponentsVersions } from '../versioning/index.js';
|
|
24
23
|
import { type GetContractClassLogsResponse, type GetPublicLogsResponse } from './get_logs_response.js';
|
|
@@ -237,11 +236,11 @@ export interface AztecNode extends ProverCoordination, Pick<L2BlockSource, 'getB
|
|
|
237
236
|
*/
|
|
238
237
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
239
238
|
/**
|
|
240
|
-
*
|
|
241
|
-
* @param txHash - The hash of
|
|
242
|
-
* @returns The requested tx effect.
|
|
239
|
+
* Gets a tx effect.
|
|
240
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
241
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
243
242
|
*/
|
|
244
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
243
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
245
244
|
/**
|
|
246
245
|
* Method to retrieve pending txs.
|
|
247
246
|
* @returns The pending txs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec-node.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,mBAAmB,EAA6B,MAAM,uCAAuC,CAAC;AAC5G,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,KAAK,OAAO,EAAoB,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAgB,MAAM,6BAA6B,CAAC;AAE5F,OAAO,EACL,KAAK,mBAAmB,EAExB,KAAK,2BAA2B,EAEhC,KAAK,QAAQ,EA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ierMembershipWitness } from '../trees/nullifier_membership_witness.js';
|
|
19
19
|
import { PublicDataWitness } from '../trees/public_data_witness.js';
|
|
20
|
-
import { BlockHeader, PublicSimulationOutput, Tx, TxHash, TxReceipt, TxValidationResultSchema } from '../tx/index.js';
|
|
21
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
20
|
+
import { BlockHeader, PublicSimulationOutput, Tx, TxHash, TxReceipt, TxValidationResultSchema, indexedTxSchema } from '../tx/index.js';
|
|
22
21
|
import { ValidatorsStatsSchema } from '../validators/schemas.js';
|
|
23
22
|
import { getVersioningResponseHandler } from '../versioning/index.js';
|
|
24
23
|
import { GetContractClassLogsResponseSchema, GetPublicLogsResponseSchema } from './get_logs_response.js';
|
|
@@ -63,7 +62,7 @@ export const AztecNodeApiSchema = {
|
|
|
63
62
|
getLogsByTags: z.function().args(z.array(schemas.Fr)).returns(z.array(z.array(TxScopedL2Log.schema))),
|
|
64
63
|
sendTx: z.function().args(Tx.schema).returns(z.void()),
|
|
65
64
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
66
|
-
getTxEffect: z.function().args(TxHash.schema).returns(
|
|
65
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
67
66
|
getPendingTxs: z.function().returns(z.array(Tx.schema)),
|
|
68
67
|
getPendingTxCount: z.function().returns(z.number()),
|
|
69
68
|
getTxByHash: z.function().args(TxHash.schema).returns(Tx.schema.optional()),
|
package/dest/interfaces/pxe.d.ts
CHANGED
|
@@ -7,17 +7,15 @@ import type { AbiDecoded } from '../abi/decoder.js';
|
|
|
7
7
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
8
8
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
9
9
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
10
|
-
import { type InBlock } from '../block/in_block.js';
|
|
11
10
|
import { L2Block } from '../block/l2_block.js';
|
|
12
11
|
import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type NodeInfo, type PartialAddress, type ProtocolContractAddresses } from '../contract/index.js';
|
|
13
12
|
import { GasFees } from '../gas/gas_fees.js';
|
|
14
13
|
import { type LogFilter } from '../logs/log_filter.js';
|
|
15
14
|
import { UniqueNote } from '../note/extended_note.js';
|
|
16
15
|
import { type NotesFilter } from '../note/notes_filter.js';
|
|
17
|
-
import { PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxReceipt, TxSimulationResult } from '../tx/index.js';
|
|
16
|
+
import { type IndexedTxEffect, PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxReceipt, TxSimulationResult } from '../tx/index.js';
|
|
18
17
|
import { TxProfileResult } from '../tx/profiled_tx.js';
|
|
19
18
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
20
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
21
19
|
import { type GetContractClassLogsResponse, type GetPublicLogsResponse } from './get_logs_response.js';
|
|
22
20
|
/**
|
|
23
21
|
* Private eXecution Environment (PXE) runs locally for each user, providing functionality for all the operations
|
|
@@ -157,11 +155,11 @@ export interface PXE {
|
|
|
157
155
|
*/
|
|
158
156
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
159
157
|
/**
|
|
160
|
-
*
|
|
161
|
-
* @param txHash - The hash of
|
|
162
|
-
* @returns The requested tx effect.
|
|
158
|
+
* Gets a tx effect.
|
|
159
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
160
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
163
161
|
*/
|
|
164
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
162
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
165
163
|
/**
|
|
166
164
|
* Gets the storage value at the given contract storage slot.
|
|
167
165
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../src/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,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AgB,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAC3D,qBAAqB,EAAE,OAAO,CAAC;IAC/B,0BAA0B,EAAE,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD,iCAAiC,EAAE,OAAO,CAAC;IAC3C,QAAQ,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACzC;AAmBD,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,GAAG,CAgFvC,CAAC"}
|
package/dest/interfaces/pxe.js
CHANGED
|
@@ -3,7 +3,6 @@ import { SiblingPath } from '@aztec/foundation/trees';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AbiTypeSchema, ContractArtifactSchema } from '../abi/abi.js';
|
|
5
5
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
6
|
-
import { inBlockSchemaFor } from '../block/in_block.js';
|
|
7
6
|
import { L2Block } from '../block/l2_block.js';
|
|
8
7
|
import { CompleteAddress, ContractClassWithIdSchema, ContractInstanceWithAddressSchema, NodeInfoSchema, ProtocolContractAddressesSchema } from '../contract/index.js';
|
|
9
8
|
import { GasFees } from '../gas/gas_fees.js';
|
|
@@ -11,10 +10,9 @@ import { LogFilterSchema } from '../logs/log_filter.js';
|
|
|
11
10
|
import { UniqueNote } from '../note/extended_note.js';
|
|
12
11
|
import { NotesFilterSchema } from '../note/notes_filter.js';
|
|
13
12
|
import { AbiDecodedSchema, optional, schemas } from '../schemas/schemas.js';
|
|
14
|
-
import { PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxReceipt, TxSimulationResult } from '../tx/index.js';
|
|
13
|
+
import { PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxReceipt, TxSimulationResult, indexedTxSchema } from '../tx/index.js';
|
|
15
14
|
import { TxProfileResult } from '../tx/profiled_tx.js';
|
|
16
15
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
17
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
18
16
|
import { GetContractClassLogsResponseSchema, GetPublicLogsResponseSchema } from './get_logs_response.js';
|
|
19
17
|
const EventMetadataDefinitionSchema = z.object({
|
|
20
18
|
eventSelector: schemas.EventSelector,
|
|
@@ -72,10 +70,7 @@ export const PXESchema = {
|
|
|
72
70
|
simulateTx: z.function().args(TxExecutionRequest.schema, z.boolean(), optional(schemas.AztecAddress), optional(z.boolean()), optional(z.boolean()), optional(z.array(schemas.AztecAddress))).returns(TxSimulationResult.schema),
|
|
73
71
|
sendTx: z.function().args(Tx.schema).returns(TxHash.schema),
|
|
74
72
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
75
|
-
getTxEffect: z.function().args(TxHash.schema).returns(
|
|
76
|
-
inBlockSchemaFor(TxEffect.schema),
|
|
77
|
-
z.undefined()
|
|
78
|
-
])),
|
|
73
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
79
74
|
getPublicStorageAt: z.function().args(schemas.AztecAddress, schemas.Fr).returns(schemas.Fr),
|
|
80
75
|
getNotes: z.function().args(NotesFilterSchema).returns(z.array(UniqueNote.schema)),
|
|
81
76
|
getL1ToL2MembershipWitness: z.function().args(schemas.AztecAddress, schemas.Fr, schemas.Fr).returns(z.tuple([
|
package/dest/tx/index.d.ts
CHANGED
package/dest/tx/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tx/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAA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+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
package/dest/tx/index.js
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type InBlock } from '../block/in_block.js';
|
|
2
|
+
import { TxEffect } from './tx_effect.js';
|
|
3
|
+
export type IndexedTxEffect = InBlock<TxEffect> & {
|
|
4
|
+
txIndexInBlock: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function indexedTxSchema(): import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
7
|
+
data: import("@aztec/foundation/schemas").ZodFor<TxEffect>;
|
|
8
|
+
l2BlockNumber: import("zod").ZodPipeline<import("zod").ZodUnion<[import("zod").ZodBigInt, import("zod").ZodNumber, import("zod").ZodString]>, import("zod").ZodNumber>;
|
|
9
|
+
l2BlockHash: import("zod").ZodString;
|
|
10
|
+
}, {
|
|
11
|
+
txIndexInBlock: import("zod").ZodPipeline<import("zod").ZodUnion<[import("zod").ZodBigInt, import("zod").ZodNumber, import("zod").ZodString]>, import("zod").ZodNumber>;
|
|
12
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
13
|
+
data: TxEffect;
|
|
14
|
+
l2BlockNumber: number;
|
|
15
|
+
l2BlockHash: string;
|
|
16
|
+
txIndexInBlock: number;
|
|
17
|
+
}, {
|
|
18
|
+
l2BlockNumber: string | number | bigint;
|
|
19
|
+
l2BlockHash: string;
|
|
20
|
+
txIndexInBlock: string | number | bigint;
|
|
21
|
+
data?: any;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function randomIndexedTxEffect(): Promise<IndexedTxEffect>;
|
|
24
|
+
//# sourceMappingURL=indexed_tx_effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexed_tx_effect.d.ts","sourceRoot":"","sources":["../../src/tx/indexed_tx_effect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAmC,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7E,wBAAgB,eAAe;;;;;;;;;;;;;;;;GAE9B;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,eAAe,CAAC,CAKtE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
2
|
+
import { inBlockSchemaFor, randomInBlock } from '../block/in_block.js';
|
|
3
|
+
import { TxEffect } from './tx_effect.js';
|
|
4
|
+
export function indexedTxSchema() {
|
|
5
|
+
return inBlockSchemaFor(TxEffect.schema).extend({
|
|
6
|
+
txIndexInBlock: schemas.Integer
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export async function randomIndexedTxEffect() {
|
|
10
|
+
return {
|
|
11
|
+
...randomInBlock(await TxEffect.random()),
|
|
12
|
+
txIndexInBlock: Math.floor(Math.random() * 1000)
|
|
13
|
+
};
|
|
14
|
+
}
|
package/dest/tx/tx_hash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx_hash.d.ts","sourceRoot":"","sources":["../../src/tx/tx_hash.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D;;GAEG;AACH,qBAAa,MAAM;IAEf,mGAAmG;aACnF,IAAI,EAAE,EAAE;;IADxB,mGAAmG;IACnF,IAAI,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"tx_hash.d.ts","sourceRoot":"","sources":["../../src/tx/tx_hash.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAI3D;;GAEG;AACH,qBAAa,MAAM;IAEf,mGAAmG;aACnF,IAAI,EAAE,EAAE;;IADxB,mGAAmG;IACnF,IAAI,EAAE,EAAE;IAG1B,MAAM,CAAC,MAAM;IAIb,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,YAAY;IAKnD,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;IAI7B,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM;IAIxB,QAAQ;IAIR,QAAQ;IAIR,QAAQ;IAIf,MAAM;IAIC,MAAM,CAAC,KAAK,EAAE,MAAM;IAI3B,MAAM,KAAK,MAAM,oMAEhB;IAED,MAAM,CAAC,IAAI;IAIX,MAAM,KAAK,IAAI,WAEd;CACF"}
|
package/dest/tx/tx_hash.js
CHANGED
|
@@ -8,10 +8,7 @@ import { schemas } from '../schemas/index.js';
|
|
|
8
8
|
constructor(/** A field representing the tx hash (tx hash is an output of poseidon hash hence it's a field). */ hash){
|
|
9
9
|
this.hash = hash;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
* TxHashes are generated from the first nullifier of a transaction, which is a Fr.
|
|
13
|
-
* @returns A random TxHash.
|
|
14
|
-
*/ static random() {
|
|
11
|
+
static random() {
|
|
15
12
|
return new TxHash(Fr.random());
|
|
16
13
|
}
|
|
17
14
|
static fromBuffer(buffer) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.84.0-nightly.
|
|
3
|
+
"version": "0.84.0-nightly.20250408",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/bb.js": "0.84.0-nightly.
|
|
71
|
-
"@aztec/blob-lib": "0.84.0-nightly.
|
|
72
|
-
"@aztec/constants": "0.84.0-nightly.
|
|
73
|
-
"@aztec/ethereum": "0.84.0-nightly.
|
|
74
|
-
"@aztec/foundation": "0.84.0-nightly.
|
|
70
|
+
"@aztec/bb.js": "0.84.0-nightly.20250408",
|
|
71
|
+
"@aztec/blob-lib": "0.84.0-nightly.20250408",
|
|
72
|
+
"@aztec/constants": "0.84.0-nightly.20250408",
|
|
73
|
+
"@aztec/ethereum": "0.84.0-nightly.20250408",
|
|
74
|
+
"@aztec/foundation": "0.84.0-nightly.20250408",
|
|
75
75
|
"@google-cloud/storage": "^7.15.0",
|
|
76
76
|
"lodash.chunk": "^4.2.0",
|
|
77
77
|
"lodash.isequal": "^4.5.0",
|
package/src/block/in_block.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type ZodTypeAny, z } from 'zod';
|
|
|
5
5
|
import { schemas } from '../schemas/index.js';
|
|
6
6
|
import type { L2Block } from './l2_block.js';
|
|
7
7
|
|
|
8
|
+
// Note: If you expand this type with indexInBlock, then delete `IndexedTxEffect` and use this type instead.
|
|
8
9
|
export type InBlock<T> = {
|
|
9
10
|
l2BlockNumber: number;
|
|
10
11
|
l2BlockHash: string;
|
|
@@ -5,10 +5,9 @@ import { z } from 'zod';
|
|
|
5
5
|
|
|
6
6
|
import type { L1RollupConstants } from '../epoch-helpers/index.js';
|
|
7
7
|
import type { BlockHeader } from '../tx/block_header.js';
|
|
8
|
-
import type {
|
|
8
|
+
import type { IndexedTxEffect } from '../tx/indexed_tx_effect.js';
|
|
9
9
|
import type { TxHash } from '../tx/tx_hash.js';
|
|
10
10
|
import type { TxReceipt } from '../tx/tx_receipt.js';
|
|
11
|
-
import type { InBlock } from './in_block.js';
|
|
12
11
|
import type { L2Block } from './l2_block.js';
|
|
13
12
|
import type { PublishedL2Block } from './published_l2_block.js';
|
|
14
13
|
|
|
@@ -68,10 +67,10 @@ export interface L2BlockSource {
|
|
|
68
67
|
|
|
69
68
|
/**
|
|
70
69
|
* Gets a tx effect.
|
|
71
|
-
* @param txHash - The hash of
|
|
72
|
-
* @returns The requested tx effect.
|
|
70
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
71
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
73
72
|
*/
|
|
74
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
73
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* Gets a receipt of a settled tx.
|
|
@@ -2,7 +2,6 @@ import type { ApiSchemaFor } from '@aztec/foundation/schemas';
|
|
|
2
2
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
import { inBlockSchemaFor } from '../block/in_block.js';
|
|
6
5
|
import { L2Block } from '../block/l2_block.js';
|
|
7
6
|
import { type L2BlockSource, L2TipsSchema } from '../block/l2_block_source.js';
|
|
8
7
|
import { PublishedL2BlockSchema } from '../block/published_l2_block.js';
|
|
@@ -18,7 +17,7 @@ import { TxScopedL2Log } from '../logs/tx_scoped_l2_log.js';
|
|
|
18
17
|
import type { L1ToL2MessageSource } from '../messaging/l1_to_l2_message_source.js';
|
|
19
18
|
import { optional, schemas } from '../schemas/schemas.js';
|
|
20
19
|
import { BlockHeader } from '../tx/block_header.js';
|
|
21
|
-
import {
|
|
20
|
+
import { indexedTxSchema } from '../tx/indexed_tx_effect.js';
|
|
22
21
|
import { TxHash } from '../tx/tx_hash.js';
|
|
23
22
|
import { TxReceipt } from '../tx/tx_receipt.js';
|
|
24
23
|
import { GetContractClassLogsResponseSchema, GetPublicLogsResponseSchema } from './get_logs_response.js';
|
|
@@ -47,7 +46,7 @@ export const ArchiverApiSchema: ApiSchemaFor<ArchiverApi> = {
|
|
|
47
46
|
.function()
|
|
48
47
|
.args(schemas.Integer, schemas.Integer, optional(z.boolean()))
|
|
49
48
|
.returns(z.array(PublishedL2BlockSchema)),
|
|
50
|
-
getTxEffect: z.function().args(TxHash.schema).returns(
|
|
49
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
51
50
|
getSettledTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema.optional()),
|
|
52
51
|
getL2SlotNumber: z.function().args().returns(schemas.BigInt),
|
|
53
52
|
getL2EpochNumber: z.function().args().returns(schemas.BigInt),
|
|
@@ -38,14 +38,15 @@ import { NullifierMembershipWitness } from '../trees/nullifier_membership_witnes
|
|
|
38
38
|
import { PublicDataWitness } from '../trees/public_data_witness.js';
|
|
39
39
|
import {
|
|
40
40
|
BlockHeader,
|
|
41
|
+
type IndexedTxEffect,
|
|
41
42
|
PublicSimulationOutput,
|
|
42
43
|
Tx,
|
|
43
44
|
TxHash,
|
|
44
45
|
TxReceipt,
|
|
45
46
|
type TxValidationResult,
|
|
46
47
|
TxValidationResultSchema,
|
|
48
|
+
indexedTxSchema,
|
|
47
49
|
} from '../tx/index.js';
|
|
48
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
49
50
|
import { ValidatorsStatsSchema } from '../validators/schemas.js';
|
|
50
51
|
import type { ValidatorsStats } from '../validators/types.js';
|
|
51
52
|
import { type ComponentsVersions, getVersioningResponseHandler } from '../versioning/index.js';
|
|
@@ -330,11 +331,11 @@ export interface AztecNode
|
|
|
330
331
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
331
332
|
|
|
332
333
|
/**
|
|
333
|
-
*
|
|
334
|
-
* @param txHash - The hash of
|
|
335
|
-
* @returns The requested tx effect.
|
|
334
|
+
* Gets a tx effect.
|
|
335
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
336
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
336
337
|
*/
|
|
337
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
338
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
338
339
|
|
|
339
340
|
/**
|
|
340
341
|
* Method to retrieve pending txs.
|
|
@@ -516,7 +517,7 @@ export const AztecNodeApiSchema: ApiSchemaFor<AztecNode> = {
|
|
|
516
517
|
|
|
517
518
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
518
519
|
|
|
519
|
-
getTxEffect: z.function().args(TxHash.schema).returns(
|
|
520
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
520
521
|
|
|
521
522
|
getPendingTxs: z.function().returns(z.array(Tx.schema)),
|
|
522
523
|
|
package/src/interfaces/pxe.ts
CHANGED
|
@@ -10,7 +10,6 @@ import type { AbiDecoded } from '../abi/decoder.js';
|
|
|
10
10
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
11
11
|
import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
12
12
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
13
|
-
import { type InBlock, inBlockSchemaFor } from '../block/in_block.js';
|
|
14
13
|
import { L2Block } from '../block/l2_block.js';
|
|
15
14
|
import {
|
|
16
15
|
CompleteAddress,
|
|
@@ -29,10 +28,18 @@ import { type LogFilter, LogFilterSchema } from '../logs/log_filter.js';
|
|
|
29
28
|
import { UniqueNote } from '../note/extended_note.js';
|
|
30
29
|
import { type NotesFilter, NotesFilterSchema } from '../note/notes_filter.js';
|
|
31
30
|
import { AbiDecodedSchema, optional, schemas } from '../schemas/schemas.js';
|
|
32
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
type IndexedTxEffect,
|
|
33
|
+
PrivateExecutionResult,
|
|
34
|
+
Tx,
|
|
35
|
+
TxExecutionRequest,
|
|
36
|
+
TxHash,
|
|
37
|
+
TxReceipt,
|
|
38
|
+
TxSimulationResult,
|
|
39
|
+
indexedTxSchema,
|
|
40
|
+
} from '../tx/index.js';
|
|
33
41
|
import { TxProfileResult } from '../tx/profiled_tx.js';
|
|
34
42
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
35
|
-
import { TxEffect } from '../tx/tx_effect.js';
|
|
36
43
|
import {
|
|
37
44
|
type GetContractClassLogsResponse,
|
|
38
45
|
GetContractClassLogsResponseSchema,
|
|
@@ -202,11 +209,11 @@ export interface PXE {
|
|
|
202
209
|
getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
|
|
203
210
|
|
|
204
211
|
/**
|
|
205
|
-
*
|
|
206
|
-
* @param txHash - The hash of
|
|
207
|
-
* @returns The requested tx effect.
|
|
212
|
+
* Gets a tx effect.
|
|
213
|
+
* @param txHash - The hash of the tx corresponding to the tx effect.
|
|
214
|
+
* @returns The requested tx effect with block info (or undefined if not found).
|
|
208
215
|
*/
|
|
209
|
-
getTxEffect(txHash: TxHash): Promise<
|
|
216
|
+
getTxEffect(txHash: TxHash): Promise<IndexedTxEffect | undefined>;
|
|
210
217
|
|
|
211
218
|
/**
|
|
212
219
|
* Gets the storage value at the given contract storage slot.
|
|
@@ -470,10 +477,7 @@ export const PXESchema: ApiSchemaFor<PXE> = {
|
|
|
470
477
|
.returns(TxSimulationResult.schema),
|
|
471
478
|
sendTx: z.function().args(Tx.schema).returns(TxHash.schema),
|
|
472
479
|
getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
|
|
473
|
-
getTxEffect: z
|
|
474
|
-
.function()
|
|
475
|
-
.args(TxHash.schema)
|
|
476
|
-
.returns(z.union([inBlockSchemaFor(TxEffect.schema), z.undefined()])),
|
|
480
|
+
getTxEffect: z.function().args(TxHash.schema).returns(indexedTxSchema().optional()),
|
|
477
481
|
getPublicStorageAt: z.function().args(schemas.AztecAddress, schemas.Fr).returns(schemas.Fr),
|
|
478
482
|
getNotes: z.function().args(NotesFilterSchema).returns(z.array(UniqueNote.schema)),
|
|
479
483
|
getL1ToL2MembershipWitness: z
|
package/src/tx/index.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { schemas } from '@aztec/foundation/schemas';
|
|
2
|
+
|
|
3
|
+
import { type InBlock, inBlockSchemaFor, randomInBlock } from '../block/in_block.js';
|
|
4
|
+
import { TxEffect } from './tx_effect.js';
|
|
5
|
+
|
|
6
|
+
export type IndexedTxEffect = InBlock<TxEffect> & { txIndexInBlock: number };
|
|
7
|
+
|
|
8
|
+
export function indexedTxSchema() {
|
|
9
|
+
return inBlockSchemaFor(TxEffect.schema).extend({ txIndexInBlock: schemas.Integer });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export async function randomIndexedTxEffect(): Promise<IndexedTxEffect> {
|
|
13
|
+
return {
|
|
14
|
+
...randomInBlock(await TxEffect.random()),
|
|
15
|
+
txIndexInBlock: Math.floor(Math.random() * 1000),
|
|
16
|
+
};
|
|
17
|
+
}
|
package/src/tx/tx_hash.ts
CHANGED