@aztec/stdlib 3.0.0-nightly.20251023 → 3.0.0-nightly.20251025
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/index.d.ts +1 -0
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +1 -0
- package/dest/avm/message_pack.d.ts +1 -0
- package/dest/avm/message_pack.d.ts.map +1 -1
- package/dest/avm/message_pack.js +28 -5
- package/dest/block/l2_block_source.d.ts +29 -0
- package/dest/block/l2_block_source.d.ts.map +1 -1
- package/dest/contract/contract_address.d.ts +1 -1
- package/dest/contract/contract_address.js +1 -1
- package/dest/interfaces/archiver.d.ts +1 -1
- package/dest/interfaces/archiver.d.ts.map +1 -1
- package/dest/interfaces/archiver.js +7 -0
- package/dest/interfaces/aztec-node-admin.d.ts +36 -35
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/aztec-node-admin.js +2 -2
- package/dest/interfaces/aztec-node.d.ts +24 -0
- package/dest/interfaces/aztec-node.d.ts.map +1 -1
- package/dest/interfaces/aztec-node.js +4 -0
- package/dest/interfaces/merkle_tree_operations.d.ts +5 -0
- package/dest/interfaces/merkle_tree_operations.d.ts.map +1 -1
- package/dest/interfaces/tx_provider.d.ts +1 -1
- package/dest/interfaces/tx_provider.d.ts.map +1 -1
- package/dest/interfaces/validator.d.ts +96 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +7 -0
- package/dest/note/index.d.ts +1 -1
- package/dest/note/index.d.ts.map +1 -1
- package/dest/note/index.js +1 -1
- package/dest/note/unique_note.d.ts +43 -0
- package/dest/note/unique_note.d.ts.map +1 -0
- package/dest/note/{extended_note.js → unique_note.js} +9 -48
- package/dest/p2p/block_attestation.d.ts +2 -8
- package/dest/p2p/block_attestation.d.ts.map +1 -1
- package/dest/p2p/block_attestation.js +7 -12
- package/dest/p2p/block_proposal.d.ts +2 -7
- package/dest/p2p/block_proposal.d.ts.map +1 -1
- package/dest/p2p/block_proposal.js +7 -11
- package/dest/parity/parity_base_private_inputs.d.ts +2 -2
- package/dest/parity/parity_base_private_inputs.d.ts.map +1 -1
- package/dest/parity/parity_base_private_inputs.js +5 -1
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +3 -3
- package/dest/tests/mocks.d.ts +1 -2
- package/dest/tests/mocks.d.ts.map +1 -1
- package/dest/tests/mocks.js +5 -8
- package/dest/world-state/index.d.ts +2 -0
- package/dest/world-state/index.d.ts.map +1 -0
- package/dest/world-state/index.js +1 -0
- package/dest/world-state/world_state_revision.d.ts +22 -0
- package/dest/world-state/world_state_revision.d.ts.map +1 -0
- package/dest/world-state/world_state_revision.js +21 -0
- package/package.json +10 -9
- package/src/avm/index.ts +1 -0
- package/src/avm/message_pack.ts +25 -1
- package/src/block/l2_block_source.ts +32 -0
- package/src/contract/contract_address.ts +1 -1
- package/src/interfaces/archiver.ts +9 -1
- package/src/interfaces/aztec-node-admin.ts +2 -2
- package/src/interfaces/aztec-node.ts +36 -0
- package/src/interfaces/merkle_tree_operations.ts +6 -0
- package/src/interfaces/tx_provider.ts +1 -0
- package/src/interfaces/validator.ts +15 -1
- package/src/note/index.ts +1 -1
- package/src/note/{extended_note.ts → unique_note.ts} +14 -75
- package/src/p2p/block_attestation.ts +8 -20
- package/src/p2p/block_proposal.ts +5 -13
- package/src/parity/parity_base_private_inputs.ts +8 -6
- package/src/tests/mocks.ts +5 -24
- package/src/world-state/index.ts +1 -0
- package/src/world-state/world_state_revision.ts +21 -0
- package/dest/note/extended_note.d.ts +0 -111
- package/dest/note/extended_note.d.ts.map +0 -1
|
@@ -7,8 +7,7 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
7
7
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
|
|
10
|
-
import {
|
|
11
|
-
import type { UInt32 } from '../types/index.js';
|
|
10
|
+
import type { ZodFor } from '../schemas/index.js';
|
|
12
11
|
import { ConsensusPayload } from './consensus_payload.js';
|
|
13
12
|
import { Gossipable } from './gossipable.js';
|
|
14
13
|
import { SignatureDomainSeparator, getHashedSignaturePayloadEthSignedMessage } from './signature_utils.js';
|
|
@@ -33,9 +32,6 @@ export class BlockAttestation extends Gossipable {
|
|
|
33
32
|
private proposer: EthAddress | undefined;
|
|
34
33
|
|
|
35
34
|
constructor(
|
|
36
|
-
/** The block number of the attestation. */
|
|
37
|
-
public readonly blockNumber: UInt32,
|
|
38
|
-
|
|
39
35
|
/** The payload of the message, and what the signature is over */
|
|
40
36
|
public readonly payload: ConsensusPayload,
|
|
41
37
|
|
|
@@ -51,12 +47,11 @@ export class BlockAttestation extends Gossipable {
|
|
|
51
47
|
static get schema(): ZodFor<BlockAttestation> {
|
|
52
48
|
return z
|
|
53
49
|
.object({
|
|
54
|
-
blockNumber: schemas.UInt32,
|
|
55
50
|
payload: ConsensusPayload.schema,
|
|
56
51
|
signature: Signature.schema,
|
|
57
52
|
proposerSignature: Signature.schema,
|
|
58
53
|
})
|
|
59
|
-
.transform(obj => new BlockAttestation(obj.
|
|
54
|
+
.transform(obj => new BlockAttestation(obj.payload, obj.signature, obj.proposerSignature));
|
|
60
55
|
}
|
|
61
56
|
|
|
62
57
|
override generateP2PMessageIdentifier(): Promise<Buffer32> {
|
|
@@ -90,12 +85,12 @@ export class BlockAttestation extends Gossipable {
|
|
|
90
85
|
* Lazily evaluate and cache the proposer of the block
|
|
91
86
|
* @returns The proposer of the block
|
|
92
87
|
*/
|
|
93
|
-
getProposer(): EthAddress {
|
|
88
|
+
getProposer(): EthAddress | undefined {
|
|
94
89
|
if (!this.proposer) {
|
|
95
90
|
// Recover the proposer from the proposal signature
|
|
96
91
|
const hashed = getHashedSignaturePayloadEthSignedMessage(this.payload, SignatureDomainSeparator.blockProposal);
|
|
97
92
|
// Cache the proposer for later use
|
|
98
|
-
this.proposer = tryRecoverAddress(hashed, this.proposerSignature)
|
|
93
|
+
this.proposer = tryRecoverAddress(hashed, this.proposerSignature);
|
|
99
94
|
}
|
|
100
95
|
|
|
101
96
|
return this.proposer;
|
|
@@ -106,13 +101,12 @@ export class BlockAttestation extends Gossipable {
|
|
|
106
101
|
}
|
|
107
102
|
|
|
108
103
|
toBuffer(): Buffer {
|
|
109
|
-
return serializeToBuffer([this.
|
|
104
|
+
return serializeToBuffer([this.payload, this.signature, this.proposerSignature]);
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
static fromBuffer(buf: Buffer | BufferReader): BlockAttestation {
|
|
113
108
|
const reader = BufferReader.asReader(buf);
|
|
114
109
|
return new BlockAttestation(
|
|
115
|
-
reader.readNumber(),
|
|
116
110
|
reader.readObject(ConsensusPayload),
|
|
117
111
|
reader.readObject(Signature),
|
|
118
112
|
reader.readObject(Signature),
|
|
@@ -120,25 +114,19 @@ export class BlockAttestation extends Gossipable {
|
|
|
120
114
|
}
|
|
121
115
|
|
|
122
116
|
static empty(): BlockAttestation {
|
|
123
|
-
return new BlockAttestation(
|
|
117
|
+
return new BlockAttestation(ConsensusPayload.empty(), Signature.empty(), Signature.empty());
|
|
124
118
|
}
|
|
125
119
|
|
|
126
120
|
static random(): BlockAttestation {
|
|
127
|
-
return new BlockAttestation(
|
|
128
|
-
Math.floor(Math.random() * 1000) + 1,
|
|
129
|
-
ConsensusPayload.random(),
|
|
130
|
-
Signature.random(),
|
|
131
|
-
Signature.random(),
|
|
132
|
-
);
|
|
121
|
+
return new BlockAttestation(ConsensusPayload.random(), Signature.random(), Signature.random());
|
|
133
122
|
}
|
|
134
123
|
|
|
135
124
|
getSize(): number {
|
|
136
|
-
return
|
|
125
|
+
return this.payload.getSize() + this.signature.getSize() + this.proposerSignature.getSize();
|
|
137
126
|
}
|
|
138
127
|
|
|
139
128
|
toInspect() {
|
|
140
129
|
return {
|
|
141
|
-
blockNumber: this.blockNumber,
|
|
142
130
|
payload: this.payload.toInspect(),
|
|
143
131
|
signature: this.signature.toString(),
|
|
144
132
|
proposerSignature: this.proposerSignature.toString(),
|
|
@@ -8,7 +8,6 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
|
8
8
|
import type { L2BlockInfo } from '../block/l2_block_info.js';
|
|
9
9
|
import { TxHash } from '../tx/index.js';
|
|
10
10
|
import { Tx } from '../tx/tx.js';
|
|
11
|
-
import type { UInt32 } from '../types/index.js';
|
|
12
11
|
import { ConsensusPayload } from './consensus_payload.js';
|
|
13
12
|
import { Gossipable } from './gossipable.js';
|
|
14
13
|
import {
|
|
@@ -42,9 +41,6 @@ export class BlockProposal extends Gossipable {
|
|
|
42
41
|
private sender: EthAddress | undefined;
|
|
43
42
|
|
|
44
43
|
constructor(
|
|
45
|
-
/** The number of the block */
|
|
46
|
-
public readonly blockNumber: UInt32,
|
|
47
|
-
|
|
48
44
|
/** The payload of the message, and what the signature is over */
|
|
49
45
|
public readonly payload: ConsensusPayload,
|
|
50
46
|
|
|
@@ -73,9 +69,8 @@ export class BlockProposal extends Gossipable {
|
|
|
73
69
|
return this.payload.header.slotNumber;
|
|
74
70
|
}
|
|
75
71
|
|
|
76
|
-
toBlockInfo(): L2BlockInfo {
|
|
72
|
+
toBlockInfo(): Omit<L2BlockInfo, 'blockNumber'> {
|
|
77
73
|
return {
|
|
78
|
-
blockNumber: this.blockNumber,
|
|
79
74
|
slotNumber: this.slotNumber.toNumber(),
|
|
80
75
|
lastArchive: this.payload.header.lastArchiveRoot,
|
|
81
76
|
timestamp: this.payload.header.timestamp,
|
|
@@ -85,7 +80,6 @@ export class BlockProposal extends Gossipable {
|
|
|
85
80
|
}
|
|
86
81
|
|
|
87
82
|
static async createProposalFromSigner(
|
|
88
|
-
blockNumber: UInt32,
|
|
89
83
|
payload: ConsensusPayload,
|
|
90
84
|
txHashes: TxHash[],
|
|
91
85
|
// Note(md): Provided separately to tx hashes such that this function can be optional
|
|
@@ -95,7 +89,7 @@ export class BlockProposal extends Gossipable {
|
|
|
95
89
|
const hashed = getHashedSignaturePayload(payload, SignatureDomainSeparator.blockProposal);
|
|
96
90
|
const sig = await payloadSigner(hashed);
|
|
97
91
|
|
|
98
|
-
return new BlockProposal(
|
|
92
|
+
return new BlockProposal(payload, sig, txHashes, txs);
|
|
99
93
|
}
|
|
100
94
|
|
|
101
95
|
/**Get Sender
|
|
@@ -117,7 +111,7 @@ export class BlockProposal extends Gossipable {
|
|
|
117
111
|
}
|
|
118
112
|
|
|
119
113
|
toBuffer(): Buffer {
|
|
120
|
-
const buffer: any[] = [this.
|
|
114
|
+
const buffer: any[] = [this.payload, this.signature, this.txHashes.length, this.txHashes];
|
|
121
115
|
if (this.txs) {
|
|
122
116
|
buffer.push(this.txs.length);
|
|
123
117
|
buffer.push(this.txs);
|
|
@@ -128,22 +122,20 @@ export class BlockProposal extends Gossipable {
|
|
|
128
122
|
static fromBuffer(buf: Buffer | BufferReader): BlockProposal {
|
|
129
123
|
const reader = BufferReader.asReader(buf);
|
|
130
124
|
|
|
131
|
-
const blockNumber = reader.readNumber();
|
|
132
125
|
const payload = reader.readObject(ConsensusPayload);
|
|
133
126
|
const sig = reader.readObject(Signature);
|
|
134
127
|
const txHashes = reader.readArray(reader.readNumber(), TxHash);
|
|
135
128
|
|
|
136
129
|
if (!reader.isEmpty()) {
|
|
137
130
|
const txs = reader.readArray(reader.readNumber(), Tx);
|
|
138
|
-
return new BlockProposal(
|
|
131
|
+
return new BlockProposal(payload, sig, txHashes, txs);
|
|
139
132
|
}
|
|
140
133
|
|
|
141
|
-
return new BlockProposal(
|
|
134
|
+
return new BlockProposal(payload, sig, txHashes);
|
|
142
135
|
}
|
|
143
136
|
|
|
144
137
|
getSize(): number {
|
|
145
138
|
return (
|
|
146
|
-
4 /* blockNumber */ +
|
|
147
139
|
this.payload.getSize() +
|
|
148
140
|
this.signature.getSize() +
|
|
149
141
|
4 /* txHashes.length */ +
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_MSGS_PER_BASE_PARITY } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { bufferSchemaFor } from '@aztec/foundation/schemas';
|
|
4
4
|
import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize';
|
|
@@ -12,11 +12,13 @@ export class ParityBasePrivateInputs {
|
|
|
12
12
|
public readonly vkTreeRoot: Fr,
|
|
13
13
|
) {}
|
|
14
14
|
|
|
15
|
-
public static fromSlice(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
public static fromSlice(array: Fr[], index: number, vkTreeRoot: Fr): ParityBasePrivateInputs {
|
|
16
|
+
// Can't use Tuple<Fr, typeof NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP> due to length
|
|
17
|
+
if (array.length !== NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP) {
|
|
18
|
+
throw new Error(
|
|
19
|
+
`Msgs array length must be NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP=${NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP}`,
|
|
20
|
+
);
|
|
21
|
+
}
|
|
20
22
|
const start = index * NUM_MSGS_PER_BASE_PARITY;
|
|
21
23
|
const end = start + NUM_MSGS_PER_BASE_PARITY;
|
|
22
24
|
const msgs = array.slice(start, end);
|
package/src/tests/mocks.ts
CHANGED
|
@@ -24,8 +24,8 @@ import {
|
|
|
24
24
|
PrivateKernelTailCircuitPublicInputs,
|
|
25
25
|
} from '../kernel/private_kernel_tail_circuit_public_inputs.js';
|
|
26
26
|
import { PrivateToPublicAccumulatedDataBuilder } from '../kernel/private_to_public_accumulated_data_builder.js';
|
|
27
|
-
import { ExtendedNote, UniqueNote } from '../note/extended_note.js';
|
|
28
27
|
import { Note } from '../note/note.js';
|
|
28
|
+
import { UniqueNote } from '../note/unique_note.js';
|
|
29
29
|
import { BlockAttestation } from '../p2p/block_attestation.js';
|
|
30
30
|
import { BlockProposal } from '../p2p/block_proposal.js';
|
|
31
31
|
import { ConsensusPayload } from '../p2p/consensus_payload.js';
|
|
@@ -40,22 +40,6 @@ import { makeGas, makeGlobalVariables, makeL2BlockHeader, makePublicCallRequest
|
|
|
40
40
|
|
|
41
41
|
export const randomTxHash = (): TxHash => TxHash.random();
|
|
42
42
|
|
|
43
|
-
export const randomExtendedNote = async ({
|
|
44
|
-
note = Note.random(),
|
|
45
|
-
recipient = undefined,
|
|
46
|
-
contractAddress = undefined,
|
|
47
|
-
txHash = randomTxHash(),
|
|
48
|
-
storageSlot = Fr.random(),
|
|
49
|
-
}: Partial<ExtendedNote> = {}) => {
|
|
50
|
-
return new ExtendedNote(
|
|
51
|
-
note,
|
|
52
|
-
recipient ?? (await AztecAddress.random()),
|
|
53
|
-
contractAddress ?? (await AztecAddress.random()),
|
|
54
|
-
storageSlot,
|
|
55
|
-
txHash,
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
|
|
59
43
|
export const randomUniqueNote = async ({
|
|
60
44
|
note = Note.random(),
|
|
61
45
|
recipient = undefined,
|
|
@@ -286,12 +270,9 @@ export const makeAndSignCommitteeAttestationsAndSigners = (
|
|
|
286
270
|
};
|
|
287
271
|
|
|
288
272
|
export const makeBlockProposal = (options?: MakeConsensusPayloadOptions): BlockProposal => {
|
|
289
|
-
const {
|
|
290
|
-
SignatureDomainSeparator.blockProposal,
|
|
291
|
-
options,
|
|
292
|
-
);
|
|
273
|
+
const { payload, signature } = makeAndSignConsensusPayload(SignatureDomainSeparator.blockProposal, options);
|
|
293
274
|
const txHashes = options?.txHashes ?? [0, 1, 2, 3, 4, 5].map(() => TxHash.random());
|
|
294
|
-
return new BlockProposal(
|
|
275
|
+
return new BlockProposal(payload, signature, txHashes, options?.txs ?? []);
|
|
295
276
|
};
|
|
296
277
|
|
|
297
278
|
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/8028)
|
|
@@ -319,7 +300,7 @@ export const makeBlockAttestation = (options?: MakeConsensusPayloadOptions): Blo
|
|
|
319
300
|
const proposalHash = getHashedSignaturePayloadEthSignedMessage(payload, SignatureDomainSeparator.blockProposal);
|
|
320
301
|
const proposerSignature = proposerSigner.sign(proposalHash);
|
|
321
302
|
|
|
322
|
-
return new BlockAttestation(
|
|
303
|
+
return new BlockAttestation(payload, attestationSignature, proposerSignature);
|
|
323
304
|
};
|
|
324
305
|
|
|
325
306
|
export const makeBlockAttestationFromBlock = (
|
|
@@ -347,7 +328,7 @@ export const makeBlockAttestationFromBlock = (
|
|
|
347
328
|
const proposalSignerToUse = proposerSigner ?? Secp256k1Signer.random();
|
|
348
329
|
const proposerSignature = proposalSignerToUse.sign(proposalHash);
|
|
349
330
|
|
|
350
|
-
return new BlockAttestation(
|
|
331
|
+
return new BlockAttestation(payload, attestationSignature, proposerSignature);
|
|
351
332
|
};
|
|
352
333
|
|
|
353
334
|
export async function randomPublishedL2Block(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './world_state_revision.js';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export class WorldStateRevision {
|
|
4
|
+
constructor(
|
|
5
|
+
public readonly forkId: number,
|
|
6
|
+
public readonly blockNumber: number,
|
|
7
|
+
public readonly includeUncommitted: boolean,
|
|
8
|
+
) {}
|
|
9
|
+
|
|
10
|
+
static empty() {
|
|
11
|
+
return new WorldStateRevision(0, 0, false);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static get schema() {
|
|
15
|
+
return z.object({
|
|
16
|
+
forkId: z.number(),
|
|
17
|
+
blockNumber: z.number(),
|
|
18
|
+
includeUncommitted: z.boolean(),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { AztecAddress } from '../aztec-address/index.js';
|
|
5
|
-
import { type ZodFor } from '../schemas/index.js';
|
|
6
|
-
import { TxHash } from '../tx/tx_hash.js';
|
|
7
|
-
import { Note } from './note.js';
|
|
8
|
-
/**
|
|
9
|
-
* A note with contextual data.
|
|
10
|
-
*/
|
|
11
|
-
export declare class ExtendedNote {
|
|
12
|
-
/** The note as emitted from the Noir contract. */
|
|
13
|
-
note: Note;
|
|
14
|
-
/** The address whose public key was used to encrypt the note. */
|
|
15
|
-
recipient: AztecAddress;
|
|
16
|
-
/** The contract address this note is created in. */
|
|
17
|
-
contractAddress: AztecAddress;
|
|
18
|
-
/** The specific storage location of the note on the contract. */
|
|
19
|
-
storageSlot: Fr;
|
|
20
|
-
/** The hash of the tx the note was created in. */
|
|
21
|
-
txHash: TxHash;
|
|
22
|
-
constructor(
|
|
23
|
-
/** The note as emitted from the Noir contract. */
|
|
24
|
-
note: Note,
|
|
25
|
-
/** The address whose public key was used to encrypt the note. */
|
|
26
|
-
recipient: AztecAddress,
|
|
27
|
-
/** The contract address this note is created in. */
|
|
28
|
-
contractAddress: AztecAddress,
|
|
29
|
-
/** The specific storage location of the note on the contract. */
|
|
30
|
-
storageSlot: Fr,
|
|
31
|
-
/** The hash of the tx the note was created in. */
|
|
32
|
-
txHash: TxHash);
|
|
33
|
-
toBuffer(): Buffer;
|
|
34
|
-
static fromBuffer(buffer: Buffer | BufferReader): ExtendedNote;
|
|
35
|
-
static get schema(): ZodFor<ExtendedNote>;
|
|
36
|
-
toString(): `0x${string}`;
|
|
37
|
-
static fromString(str: string): ExtendedNote;
|
|
38
|
-
static random(): Promise<ExtendedNote>;
|
|
39
|
-
}
|
|
40
|
-
export declare class UniqueNote extends ExtendedNote {
|
|
41
|
-
/** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
|
|
42
|
-
noteNonce: Fr;
|
|
43
|
-
constructor(
|
|
44
|
-
/** The note as emitted from the Noir contract. */
|
|
45
|
-
note: Note,
|
|
46
|
-
/** The recipient whose public key was used to encrypt the note. */
|
|
47
|
-
recipient: AztecAddress,
|
|
48
|
-
/** The contract address this note is created in. */
|
|
49
|
-
contractAddress: AztecAddress,
|
|
50
|
-
/** The specific storage location of the note on the contract. */
|
|
51
|
-
storageSlot: Fr,
|
|
52
|
-
/** The hash of the tx the note was created in. */
|
|
53
|
-
txHash: TxHash,
|
|
54
|
-
/** The nonce that was injected into the note hash preimage in order to guarantee uniqueness. */
|
|
55
|
-
noteNonce: Fr);
|
|
56
|
-
static get schema(): z.ZodEffects<z.ZodObject<{
|
|
57
|
-
note: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer<ArrayBuffer>, string>, z.ZodEffects<z.ZodObject<{
|
|
58
|
-
type: z.ZodLiteral<"Buffer">;
|
|
59
|
-
data: z.ZodArray<z.ZodNumber, "many">;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
type: "Buffer";
|
|
62
|
-
data: number[];
|
|
63
|
-
}, {
|
|
64
|
-
type: "Buffer";
|
|
65
|
-
data: number[];
|
|
66
|
-
}>, Buffer<ArrayBuffer>, {
|
|
67
|
-
type: "Buffer";
|
|
68
|
-
data: number[];
|
|
69
|
-
}>]>, Note, string | {
|
|
70
|
-
type: "Buffer";
|
|
71
|
-
data: number[];
|
|
72
|
-
}>;
|
|
73
|
-
recipient: ZodFor<AztecAddress>;
|
|
74
|
-
contractAddress: ZodFor<AztecAddress>;
|
|
75
|
-
storageSlot: ZodFor<Fr>;
|
|
76
|
-
txHash: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, Buffer<ArrayBuffer>, string>, TxHash, string>;
|
|
77
|
-
noteNonce: ZodFor<Fr>;
|
|
78
|
-
}, "strip", z.ZodTypeAny, {
|
|
79
|
-
storageSlot: Fr;
|
|
80
|
-
contractAddress: AztecAddress;
|
|
81
|
-
recipient: AztecAddress;
|
|
82
|
-
note: Note;
|
|
83
|
-
txHash: TxHash;
|
|
84
|
-
noteNonce: Fr;
|
|
85
|
-
}, {
|
|
86
|
-
note: string | {
|
|
87
|
-
type: "Buffer";
|
|
88
|
-
data: number[];
|
|
89
|
-
};
|
|
90
|
-
txHash: string;
|
|
91
|
-
storageSlot?: any;
|
|
92
|
-
contractAddress?: any;
|
|
93
|
-
recipient?: any;
|
|
94
|
-
noteNonce?: any;
|
|
95
|
-
}>, UniqueNote, {
|
|
96
|
-
note: string | {
|
|
97
|
-
type: "Buffer";
|
|
98
|
-
data: number[];
|
|
99
|
-
};
|
|
100
|
-
txHash: string;
|
|
101
|
-
storageSlot?: any;
|
|
102
|
-
contractAddress?: any;
|
|
103
|
-
recipient?: any;
|
|
104
|
-
noteNonce?: any;
|
|
105
|
-
}>;
|
|
106
|
-
toBuffer(): Buffer;
|
|
107
|
-
static random(): Promise<UniqueNote>;
|
|
108
|
-
static fromBuffer(buffer: Buffer | BufferReader): UniqueNote;
|
|
109
|
-
static fromString(str: string): UniqueNote;
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=extended_note.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extended_note.d.ts","sourceRoot":"","sources":["../../src/note/extended_note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAG9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC;;GAEG;AACH,qBAAa,YAAY;IAErB,kDAAkD;IAC3C,IAAI,EAAE,IAAI;IACjB,iEAAiE;IAC1D,SAAS,EAAE,YAAY;IAC9B,oDAAoD;IAC7C,eAAe,EAAE,YAAY;IACpC,iEAAiE;IAC1D,WAAW,EAAE,EAAE;IACtB,kDAAkD;IAC3C,MAAM,EAAE,MAAM;;IATrB,kDAAkD;IAC3C,IAAI,EAAE,IAAI;IACjB,iEAAiE;IAC1D,SAAS,EAAE,YAAY;IAC9B,oDAAoD;IAC7C,eAAe,EAAE,YAAY;IACpC,iEAAiE;IAC1D,WAAW,EAAE,EAAE;IACtB,kDAAkD;IAC3C,MAAM,EAAE,MAAM;IAGvB,QAAQ,IAAI,MAAM;IAIlB,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAY/C,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,CAYxC;IAED,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,MAAM;WAIhB,MAAM;CASpB;AAED,qBAAa,UAAW,SAAQ,YAAY;IAYxC,gGAAgG;IACzF,SAAS,EAAE,EAAE;;IAXpB,kDAAkD;IAClD,IAAI,EAAE,IAAI;IACV,mEAAmE;IACnE,SAAS,EAAE,YAAY;IACvB,oDAAoD;IACpD,eAAe,EAAE,YAAY;IAC7B,iEAAiE;IACjE,WAAW,EAAE,EAAE;IACf,kDAAkD;IAClD,MAAM,EAAE,MAAM;IACd,gGAAgG;IACzF,SAAS,EAAE,EAAE;IAKtB,WAAoB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAazB;IAEQ,QAAQ,IAAI,MAAM;WAWL,MAAM;WAWZ,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;WAaxC,UAAU,CAAC,GAAG,EAAE,MAAM;CAGvC"}
|