@aztec/stdlib 3.0.0-nightly.20250924 → 3.0.0-nightly.20250926
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/avm/avm_accumulated_data.d.ts +1 -0
- package/dest/avm/avm_accumulated_data.d.ts.map +1 -1
- package/dest/avm/avm_accumulated_data.js +4 -0
- package/dest/avm/index.d.ts +0 -1
- package/dest/avm/index.d.ts.map +1 -1
- package/dest/avm/index.js +0 -1
- package/dest/file-store/factory.d.ts.map +1 -1
- package/dest/file-store/factory.js +18 -0
- package/dest/file-store/s3.d.ts +25 -0
- package/dest/file-store/s3.d.ts.map +1 -0
- package/dest/file-store/s3.js +187 -0
- package/dest/interfaces/aztec-node-admin.d.ts +6 -0
- package/dest/interfaces/aztec-node-admin.d.ts.map +1 -1
- package/dest/interfaces/pxe.d.ts +5 -179
- package/dest/interfaces/pxe.d.ts.map +1 -1
- package/dest/interfaces/pxe.js +2 -59
- package/dest/interfaces/slasher.d.ts +4 -0
- package/dest/interfaces/slasher.d.ts.map +1 -1
- package/dest/interfaces/slasher.js +1 -0
- package/dest/interfaces/validator.d.ts +6 -1
- package/dest/interfaces/validator.d.ts.map +1 -1
- package/dest/interfaces/validator.js +2 -1
- package/dest/rollup/avm_proof_data.d.ts +2 -12
- package/dest/rollup/avm_proof_data.d.ts.map +1 -1
- package/dest/rollup/avm_proof_data.js +0 -24
- package/dest/rollup/base_rollup_hints.d.ts +15 -16
- package/dest/rollup/base_rollup_hints.d.ts.map +1 -1
- package/dest/rollup/base_rollup_hints.js +24 -25
- package/dest/rollup/block_root_rollup_private_inputs.d.ts +13 -13
- package/dest/rollup/block_root_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/block_root_rollup_private_inputs.js +20 -20
- package/dest/rollup/index.d.ts +1 -1
- package/dest/rollup/index.d.ts.map +1 -1
- package/dest/rollup/index.js +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.d.ts.map +1 -1
- package/dest/rollup/public_tx_base_rollup_private_inputs.js +2 -2
- package/dest/rollup/{state_diff_hints.d.ts → tree_snapshot_diff_hints.d.ts} +22 -38
- package/dest/rollup/tree_snapshot_diff_hints.d.ts.map +1 -0
- package/dest/rollup/tree_snapshot_diff_hints.js +75 -0
- package/dest/rollup/tx_rollup_public_inputs.d.ts +4 -4
- package/dest/rollup/tx_rollup_public_inputs.d.ts.map +1 -1
- package/dest/rollup/tx_rollup_public_inputs.js +7 -7
- package/dest/tests/factories.d.ts +4 -4
- package/dest/tests/factories.d.ts.map +1 -1
- package/dest/tests/factories.js +20 -25
- package/package.json +9 -8
- package/src/avm/avm_accumulated_data.ts +10 -0
- package/src/avm/index.ts +0 -1
- package/src/file-store/factory.ts +15 -0
- package/src/file-store/s3.ts +186 -0
- package/src/interfaces/pxe.ts +8 -80
- package/src/interfaces/slasher.ts +2 -0
- package/src/interfaces/validator.ts +5 -1
- package/src/rollup/avm_proof_data.ts +2 -31
- package/src/rollup/base_rollup_hints.ts +20 -21
- package/src/rollup/block_root_rollup_private_inputs.ts +14 -14
- package/src/rollup/index.ts +1 -1
- package/src/rollup/public_tx_base_rollup_private_inputs.ts +3 -2
- package/src/rollup/{state_diff_hints.ts → tree_snapshot_diff_hints.ts} +26 -41
- package/src/rollup/tx_rollup_public_inputs.ts +4 -4
- package/src/tests/factories.ts +25 -37
- package/dest/avm/public_data_hint.d.ts +0 -16
- package/dest/avm/public_data_hint.d.ts.map +0 -1
- package/dest/avm/public_data_hint.js +0 -27
- package/dest/rollup/state_diff_hints.d.ts.map +0 -1
- package/dest/rollup/state_diff_hints.js +0 -85
- package/src/avm/public_data_hint.ts +0 -38
|
@@ -145,6 +145,7 @@ export declare class AvmAccumulatedData {
|
|
|
145
145
|
static empty(): AvmAccumulatedData;
|
|
146
146
|
isEmpty(): boolean;
|
|
147
147
|
[inspect.custom](): string;
|
|
148
|
+
getArrayLengths(): AvmAccumulatedDataArrayLengths;
|
|
148
149
|
}
|
|
149
150
|
/**
|
|
150
151
|
* Represents the lengths of arrays in AVM accumulated data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avm_accumulated_data.d.ts","sourceRoot":"","sources":["../../src/avm/avm_accumulated_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,4CAA4C,EAC7C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,KAAK,KAAK,EAIX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"avm_accumulated_data.d.ts","sourceRoot":"","sources":["../../src/avm/avm_accumulated_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,4CAA4C,EAC7C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,KAAK,KAAK,EAIX,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;A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,CAAC,MAAM,CAAC;IA2BhB,eAAe;CAQhB;AAED;;GAEG;AACH,qBAAa,8BAA8B;IAEvC;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,gBAAgB,EAAE,MAAM;;IAf/B;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,UAAU,EAAE,MAAM;IACzB;;OAEG;IACI,gBAAgB,EAAE,MAAM;IAGjC,MAAM,KAAK,MAAM;;;;;;;;;;;;;;;;;;;;OAYhB;IAED,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY;IAU/C,QAAQ;IAIR,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAU5C,QAAQ,IAAI,EAAE,EAAE;IAIhB,MAAM,CAAC,KAAK;IAIZ,CAAC,OAAO,CAAC,MAAM,CAAC;CAQjB"}
|
|
@@ -7,6 +7,7 @@ import { BufferReader, FieldReader, assertLength, serializeToBuffer, serializeTo
|
|
|
7
7
|
import { bufferToHex, hexToBuffer } from '@aztec/foundation/string';
|
|
8
8
|
import { inspect } from 'util';
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
+
import { countAccumulatedItems } from '../kernel/utils/index.js';
|
|
10
11
|
import { FlatPublicLogs } from '../logs/public_log.js';
|
|
11
12
|
import { ScopedL2ToL1Message } from '../messaging/l2_to_l1_message.js';
|
|
12
13
|
import { PublicDataWrite } from './public_data_write.js';
|
|
@@ -94,6 +95,9 @@ export class AvmAccumulatedData {
|
|
|
94
95
|
publicDataWrites: [${this.publicDataWrites.filter((x)=>!x.isEmpty()).map((h)=>inspect(h)).join(', ')}],
|
|
95
96
|
}`;
|
|
96
97
|
}
|
|
98
|
+
getArrayLengths() {
|
|
99
|
+
return new AvmAccumulatedDataArrayLengths(countAccumulatedItems(this.noteHashes), countAccumulatedItems(this.nullifiers), countAccumulatedItems(this.l2ToL1Msgs), countAccumulatedItems(this.publicDataWrites));
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
102
|
/**
|
|
99
103
|
* Represents the lengths of arrays in AVM accumulated data
|
package/dest/avm/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ export * from './avm_accumulated_data.js';
|
|
|
3
3
|
export * from './avm_circuit_public_inputs.js';
|
|
4
4
|
export * from './revert_code.js';
|
|
5
5
|
export * from './public_data_write.js';
|
|
6
|
-
export * from './public_data_hint.js';
|
|
7
6
|
export * from './public_data_update_request.js';
|
|
8
7
|
export * from './contract_storage_update_request.js';
|
|
9
8
|
export * from './contract_storage_read.js';
|
package/dest/avm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/avm/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/avm/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,0BAA0B,CAAC"}
|
package/dest/avm/index.js
CHANGED
|
@@ -3,7 +3,6 @@ export * from './avm_accumulated_data.js';
|
|
|
3
3
|
export * from './avm_circuit_public_inputs.js';
|
|
4
4
|
export * from './revert_code.js';
|
|
5
5
|
export * from './public_data_write.js';
|
|
6
|
-
export * from './public_data_hint.js';
|
|
7
6
|
export * from './public_data_update_request.js';
|
|
8
7
|
export * from './contract_storage_update_request.js';
|
|
9
8
|
export * from './contract_storage_read.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/file-store/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../src/file-store/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAIlE,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAWnE,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAC3F,wBAAsB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AA6C9F,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC3G,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -2,8 +2,10 @@ import { createLogger } from '@aztec/foundation/log';
|
|
|
2
2
|
import { GoogleCloudFileStore } from './gcs.js';
|
|
3
3
|
import { HttpFileStore } from './http.js';
|
|
4
4
|
import { LocalFileStore } from './local.js';
|
|
5
|
+
import { S3FileStore } from './s3.js';
|
|
5
6
|
const supportedExamples = [
|
|
6
7
|
`gs://bucket-name/path/to/store`,
|
|
8
|
+
`s3://bucket-name/path/to/store`,
|
|
7
9
|
`file:///absolute/local/path/to/store`,
|
|
8
10
|
`https://host/path`
|
|
9
11
|
];
|
|
@@ -30,6 +32,22 @@ export async function createFileStore(config, logger = createLogger('stdlib:file
|
|
|
30
32
|
} catch {
|
|
31
33
|
throw new Error(`Invalid google cloud store definition: '${config}'.`);
|
|
32
34
|
}
|
|
35
|
+
} else if (config.startsWith('s3://')) {
|
|
36
|
+
try {
|
|
37
|
+
const url = new URL(config);
|
|
38
|
+
const bucket = url.host;
|
|
39
|
+
const path = url.pathname.replace(/^\/+/, '');
|
|
40
|
+
const endpoint = url.searchParams.get('endpoint');
|
|
41
|
+
const publicBaseUrl = url.searchParams.get('publicBaseUrl') ?? undefined;
|
|
42
|
+
logger.info(`Creating S3 file store at ${bucket} ${path}`);
|
|
43
|
+
const store = new S3FileStore(bucket, path, {
|
|
44
|
+
endpoint: endpoint ?? undefined,
|
|
45
|
+
publicBaseUrl
|
|
46
|
+
});
|
|
47
|
+
return store;
|
|
48
|
+
} catch {
|
|
49
|
+
throw new Error(`Invalid S3 store definition: '${config}'.`);
|
|
50
|
+
}
|
|
33
51
|
} else {
|
|
34
52
|
throw new Error(`Unknown file store config: '${config}'. Supported values are ${supportedExamples.join(', ')}.`);
|
|
35
53
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Logger } from '@aztec/foundation/log';
|
|
2
|
+
import type { FileStore, FileStoreSaveOptions } from './interface.js';
|
|
3
|
+
export declare class S3FileStore implements FileStore {
|
|
4
|
+
private readonly bucketName;
|
|
5
|
+
private readonly basePath;
|
|
6
|
+
private readonly log;
|
|
7
|
+
private readonly s3;
|
|
8
|
+
private readonly region;
|
|
9
|
+
private readonly endpoint?;
|
|
10
|
+
private readonly publicBaseUrl?;
|
|
11
|
+
constructor(bucketName: string, basePath: string, opts: {
|
|
12
|
+
endpoint?: string;
|
|
13
|
+
publicBaseUrl?: string;
|
|
14
|
+
}, log?: Logger);
|
|
15
|
+
save(path: string, data: Buffer, opts?: FileStoreSaveOptions): Promise<string>;
|
|
16
|
+
upload(destPath: string, srcPath: string, opts?: FileStoreSaveOptions): Promise<string>;
|
|
17
|
+
read(pathOrUrlStr: string): Promise<Buffer>;
|
|
18
|
+
download(pathOrUrlStr: string, destPath: string): Promise<void>;
|
|
19
|
+
exists(pathOrUrlStr: string): Promise<boolean>;
|
|
20
|
+
private extractUserMetadata;
|
|
21
|
+
private buildReturnedUrl;
|
|
22
|
+
private getBucketAndKey;
|
|
23
|
+
private getFullPath;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=s3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../src/file-store/s3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAgBlE,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAMtE,qBAAa,WAAY,YAAW,SAAS;IAOzC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAEzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IATtB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAW;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAS;gBAGrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EACjC,IAAI,EAAE;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,EAClC,GAAG,GAAE,MAA6C;IAiBxD,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAgBlF,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC;IAoB3F,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW3C,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ/D,MAAM,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAe3D,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,eAAe;IA2BvB,OAAO,CAAC,WAAW;CAKpB"}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { GetObjectCommand, HeadObjectCommand, PutObjectCommand, S3Client } from '@aws-sdk/client-s3';
|
|
3
|
+
import { createReadStream, createWriteStream } from 'fs';
|
|
4
|
+
import { mkdir } from 'fs/promises';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
import { finished } from 'stream/promises';
|
|
7
|
+
import { createGzip } from 'zlib';
|
|
8
|
+
function normalizeBasePath(path) {
|
|
9
|
+
return path?.replace(/^\/+|\/+$/g, '') ?? '';
|
|
10
|
+
}
|
|
11
|
+
export class S3FileStore {
|
|
12
|
+
bucketName;
|
|
13
|
+
basePath;
|
|
14
|
+
log;
|
|
15
|
+
s3;
|
|
16
|
+
region;
|
|
17
|
+
endpoint;
|
|
18
|
+
publicBaseUrl;
|
|
19
|
+
constructor(bucketName, basePath, opts, log = createLogger('stdlib:s3-file-store')){
|
|
20
|
+
this.bucketName = bucketName;
|
|
21
|
+
this.basePath = basePath;
|
|
22
|
+
this.log = log;
|
|
23
|
+
this.endpoint = opts.endpoint;
|
|
24
|
+
this.region = this.endpoint ? 'auto' : process.env.AWS_REGION ?? process.env.AWS_DEFAULT_REGION ?? 'us-east-1';
|
|
25
|
+
this.publicBaseUrl = opts.publicBaseUrl;
|
|
26
|
+
const clientOptions = {};
|
|
27
|
+
if (this.endpoint) {
|
|
28
|
+
clientOptions.region = 'auto';
|
|
29
|
+
clientOptions.endpoint = this.endpoint;
|
|
30
|
+
clientOptions.forcePathStyle = true;
|
|
31
|
+
} else {
|
|
32
|
+
clientOptions.region = this.region;
|
|
33
|
+
}
|
|
34
|
+
this.s3 = new S3Client(clientOptions);
|
|
35
|
+
}
|
|
36
|
+
async save(path, data, opts = {}) {
|
|
37
|
+
const key = this.getFullPath(path);
|
|
38
|
+
const shouldCompress = !opts.compress;
|
|
39
|
+
const body = shouldCompress ? (await import('zlib')).gzipSync(data) : data;
|
|
40
|
+
const put = new PutObjectCommand({
|
|
41
|
+
Bucket: this.bucketName,
|
|
42
|
+
Key: key,
|
|
43
|
+
Body: body,
|
|
44
|
+
ContentEncoding: shouldCompress ? 'gzip' : undefined,
|
|
45
|
+
CacheControl: opts.metadata?.['Cache-control'],
|
|
46
|
+
Metadata: this.extractUserMetadata(opts.metadata)
|
|
47
|
+
});
|
|
48
|
+
await this.s3.send(put);
|
|
49
|
+
return this.buildReturnedUrl(key, !!opts.public);
|
|
50
|
+
}
|
|
51
|
+
async upload(destPath, srcPath, opts = {}) {
|
|
52
|
+
const key = this.getFullPath(destPath);
|
|
53
|
+
const shouldCompress = opts.compress !== false; // default true like GCS impl
|
|
54
|
+
await mkdir(dirname(srcPath), {
|
|
55
|
+
recursive: true
|
|
56
|
+
}).catch(()=>undefined);
|
|
57
|
+
const source = createReadStream(srcPath);
|
|
58
|
+
const bodyStream = shouldCompress ? source.pipe(createGzip()) : source;
|
|
59
|
+
const put = new PutObjectCommand({
|
|
60
|
+
Bucket: this.bucketName,
|
|
61
|
+
Key: key,
|
|
62
|
+
Body: bodyStream,
|
|
63
|
+
ContentEncoding: shouldCompress ? 'gzip' : undefined,
|
|
64
|
+
CacheControl: opts.metadata?.['Cache-control'],
|
|
65
|
+
Metadata: this.extractUserMetadata(opts.metadata)
|
|
66
|
+
});
|
|
67
|
+
await this.s3.send(put);
|
|
68
|
+
return this.buildReturnedUrl(key, !!opts.public);
|
|
69
|
+
}
|
|
70
|
+
async read(pathOrUrlStr) {
|
|
71
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
72
|
+
const out = await this.s3.send(new GetObjectCommand({
|
|
73
|
+
Bucket: bucket,
|
|
74
|
+
Key: key
|
|
75
|
+
}));
|
|
76
|
+
const stream = out.Body;
|
|
77
|
+
const chunks = [];
|
|
78
|
+
for await (const chunk of stream){
|
|
79
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
80
|
+
}
|
|
81
|
+
return Buffer.concat(chunks);
|
|
82
|
+
}
|
|
83
|
+
async download(pathOrUrlStr, destPath) {
|
|
84
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
85
|
+
const out = await this.s3.send(new GetObjectCommand({
|
|
86
|
+
Bucket: bucket,
|
|
87
|
+
Key: key
|
|
88
|
+
}));
|
|
89
|
+
await mkdir(dirname(destPath), {
|
|
90
|
+
recursive: true
|
|
91
|
+
});
|
|
92
|
+
const write = createWriteStream(destPath);
|
|
93
|
+
await finished(out.Body.pipe(write));
|
|
94
|
+
}
|
|
95
|
+
async exists(pathOrUrlStr) {
|
|
96
|
+
try {
|
|
97
|
+
const { bucket, key } = this.getBucketAndKey(pathOrUrlStr);
|
|
98
|
+
await this.s3.send(new HeadObjectCommand({
|
|
99
|
+
Bucket: bucket,
|
|
100
|
+
Key: key
|
|
101
|
+
}));
|
|
102
|
+
return true;
|
|
103
|
+
} catch (err) {
|
|
104
|
+
const code = err?.$metadata?.httpStatusCode ?? err?.name ?? err?.Code;
|
|
105
|
+
if (code === 404 || code === 'NotFound' || code === 'NoSuchKey') {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
this.log.warn(`Error checking existence for ${pathOrUrlStr}: ${err?.message ?? String(err)}`);
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
extractUserMetadata(meta) {
|
|
113
|
+
if (!meta) {
|
|
114
|
+
return undefined;
|
|
115
|
+
}
|
|
116
|
+
const { ['Cache-control']: _ignored, ...rest } = meta;
|
|
117
|
+
return Object.keys(rest).length ? rest : undefined;
|
|
118
|
+
}
|
|
119
|
+
buildReturnedUrl(key, makePublic) {
|
|
120
|
+
if (!makePublic) {
|
|
121
|
+
return `s3://${this.bucketName}/${key}`;
|
|
122
|
+
}
|
|
123
|
+
if (this.publicBaseUrl) {
|
|
124
|
+
const base = this.publicBaseUrl.replace(/\/$/, '');
|
|
125
|
+
// key already includes basePath via getFullPath, so do not prefix basePath again
|
|
126
|
+
const full = key.replace(/^\/+/, '');
|
|
127
|
+
return `${base}/${full}`;
|
|
128
|
+
}
|
|
129
|
+
// Try to synthesize a URL from endpoint if available (works for public R2 buckets)
|
|
130
|
+
if (this.endpoint) {
|
|
131
|
+
try {
|
|
132
|
+
const url = new URL(this.endpoint);
|
|
133
|
+
return `https://${this.bucketName}.${url.host}/${key}`;
|
|
134
|
+
} catch {
|
|
135
|
+
// fallthrough
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// Fallback to AWS style URL if region looks valid
|
|
139
|
+
return `https://${this.bucketName}.s3.${this.region}.amazonaws.com/${key}`;
|
|
140
|
+
}
|
|
141
|
+
getBucketAndKey(pathOrUrlStr) {
|
|
142
|
+
if (URL.canParse(pathOrUrlStr)) {
|
|
143
|
+
const url = new URL(pathOrUrlStr);
|
|
144
|
+
if (url.protocol === 's3:') {
|
|
145
|
+
return {
|
|
146
|
+
bucket: url.host,
|
|
147
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
// For https URLs, try to infer virtual-hosted or path-style
|
|
151
|
+
if (url.protocol === 'https:' || url.protocol === 'http:') {
|
|
152
|
+
// If the URL matches the configured publicBaseUrl host, map back to our bucket and key
|
|
153
|
+
if (this.publicBaseUrl && url.host === new URL(this.publicBaseUrl).host) {
|
|
154
|
+
return {
|
|
155
|
+
bucket: this.bucketName,
|
|
156
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
const hostParts = url.host.split('.');
|
|
160
|
+
if (hostParts.length > 3 && (hostParts[1] === 's3' || hostParts[hostParts.length - 2] === 'r2')) {
|
|
161
|
+
// virtual hosted
|
|
162
|
+
return {
|
|
163
|
+
bucket: hostParts[0],
|
|
164
|
+
key: url.pathname.replace(/^\/+/, '')
|
|
165
|
+
};
|
|
166
|
+
} else if (this.endpoint && url.host === new URL(this.endpoint).host) {
|
|
167
|
+
// path-style at custom endpoint
|
|
168
|
+
const [bucket, ...rest] = url.pathname.replace(/^\/+/, '').split('/');
|
|
169
|
+
return {
|
|
170
|
+
bucket,
|
|
171
|
+
key: rest.join('/')
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// Treat as path
|
|
177
|
+
return {
|
|
178
|
+
bucket: this.bucketName,
|
|
179
|
+
key: this.getFullPath(pathOrUrlStr)
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
getFullPath(path) {
|
|
183
|
+
const base = normalizeBasePath(this.basePath);
|
|
184
|
+
const rel = path.replace(/^\/+/, '');
|
|
185
|
+
return base ? join(base, rel) : rel;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -121,6 +121,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
121
121
|
slashMaxPayloadSize: z.ZodNumber;
|
|
122
122
|
slashGracePeriodL2Slots: z.ZodNumber;
|
|
123
123
|
slashBroadcastedInvalidBlockPenalty: z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodBigInt>;
|
|
124
|
+
slashExecuteRoundsLookBack: z.ZodNumber;
|
|
124
125
|
slashSelfAllowed: z.ZodOptional<z.ZodBoolean>;
|
|
125
126
|
}>, {
|
|
126
127
|
validatorAddresses: z.ZodOptional<z.ZodArray<z.ZodType<import("@aztec/foundation/schemas").EthAddress, any, string>, "many">>;
|
|
@@ -129,6 +130,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
129
130
|
attestationPollingIntervalMs: z.ZodNumber;
|
|
130
131
|
validatorReexecute: z.ZodBoolean;
|
|
131
132
|
validatorReexecuteDeadlineMs: z.ZodNumber;
|
|
133
|
+
alwaysReexecuteBlockProposals: z.ZodOptional<z.ZodBoolean>;
|
|
132
134
|
}>, Pick<{
|
|
133
135
|
archiverPollingIntervalMS: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
134
136
|
archiverBatchSize: z.ZodOptional<z.ZodPipeline<z.ZodUnion<[z.ZodBigInt, z.ZodNumber, z.ZodString]>, z.ZodNumber>>;
|
|
@@ -157,6 +159,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
157
159
|
slashMaxPayloadSize: number;
|
|
158
160
|
slashGracePeriodL2Slots: number;
|
|
159
161
|
slashBroadcastedInvalidBlockPenalty: bigint;
|
|
162
|
+
slashExecuteRoundsLookBack: number;
|
|
160
163
|
realProofs: boolean;
|
|
161
164
|
proverTestDelayType: "fixed" | "realistic";
|
|
162
165
|
proverTestDelayMs: number;
|
|
@@ -204,6 +207,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
204
207
|
slashSelfAllowed?: boolean | undefined;
|
|
205
208
|
nodeUrl?: string | undefined;
|
|
206
209
|
validatorAddresses?: import("@aztec/foundation/schemas").EthAddress[] | undefined;
|
|
210
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
207
211
|
}, {
|
|
208
212
|
secondsBeforeInvalidatingBlockAsCommitteeMember: number;
|
|
209
213
|
secondsBeforeInvalidatingBlockAsNonCommitteeMember: number;
|
|
@@ -223,6 +227,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
223
227
|
slashMaxPayloadSize: number;
|
|
224
228
|
slashGracePeriodL2Slots: number;
|
|
225
229
|
slashBroadcastedInvalidBlockPenalty: string | number | bigint;
|
|
230
|
+
slashExecuteRoundsLookBack: number;
|
|
226
231
|
realProofs: boolean;
|
|
227
232
|
proverTestDelayType: "fixed" | "realistic";
|
|
228
233
|
proverTestDelayMs: number;
|
|
@@ -270,6 +275,7 @@ export declare const AztecNodeAdminConfigSchema: z.ZodObject<z.objectUtil.extend
|
|
|
270
275
|
slashSelfAllowed?: boolean | undefined;
|
|
271
276
|
nodeUrl?: string | undefined;
|
|
272
277
|
validatorAddresses?: string[] | undefined;
|
|
278
|
+
alwaysReexecuteBlockProposals?: boolean | undefined;
|
|
273
279
|
}>;
|
|
274
280
|
export declare const AztecNodeAdminApiSchema: ApiSchemaFor<AztecNodeAdmin>;
|
|
275
281
|
export declare function createAztecNodeAdminClient(url: string, versions?: Partial<ComponentsVersions>, fetch?: typeof defaultFetch): AztecNodeAdmin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aztec-node-admin.d.ts","sourceRoot":"","sources":["../../src/interfaces/aztec-node-admin.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,KAAK,OAAO,EAAiB,KAAK,iBAAiB,EAA2B,MAAM,sBAAsB,CAAC;AACpH,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,CAAC,IAAI,CAAC,CAAC;IAE3B,gDAAgD;IAChD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B,2EAA2E;IAC3E,gBAAgB,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAEjD,2DAA2D;IAC3D,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;CACzE;AAED,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,GAC1D,eAAe,GACf,YAAY,GACZ,aAAa,GACb,IAAI,CAAC,sBAAsB,EAAE,2BAA2B,GAAG,+BAA+B,GAAG,mBAAmB,CAAC,GAAG;IAClH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUU,CAAC;AAElD,eAAO,MAAM,uBAAuB,EAAE,YAAY,CAAC,cAAc,CAYhE,CAAC;AAEF,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,GAAE,OAAO,CAAC,kBAAkB,CAAM,EAC1C,KAAK,sBAAe,GACnB,cAAc,CAMhB"}
|
package/dest/interfaces/pxe.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import type { ApiSchemaFor, ZodFor } from '@aztec/foundation/schemas';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { type AbiType, type ContractArtifact } from '../abi/abi.js';
|
|
5
4
|
import type { EventSelector } from '../abi/event_selector.js';
|
|
@@ -7,7 +6,7 @@ import { AuthWitness } from '../auth_witness/auth_witness.js';
|
|
|
7
6
|
import type { AztecAddress } from '../aztec-address/index.js';
|
|
8
7
|
import { CompleteAddress, type ContractClassWithId, type ContractInstanceWithAddress, type PartialAddress, type ProtocolContractAddresses } from '../contract/index.js';
|
|
9
8
|
import { UniqueNote } from '../note/extended_note.js';
|
|
10
|
-
import {
|
|
9
|
+
import type { NotesFilter } from '../note/notes_filter.js';
|
|
11
10
|
import { SimulationOverrides, TxExecutionRequest, TxSimulationResult } from '../tx/index.js';
|
|
12
11
|
import { TxProfileResult, UtilitySimulationResult } from '../tx/profiling.js';
|
|
13
12
|
import { TxProvingResult } from '../tx/proven_tx.js';
|
|
@@ -188,6 +187,10 @@ export interface PXE {
|
|
|
188
187
|
* @returns - The deserialized events.
|
|
189
188
|
*/
|
|
190
189
|
getPrivateEvents<T>(contractAddress: AztecAddress, eventMetadata: EventMetadataDefinition, from: number, numBlocks: number, recipients: AztecAddress[]): Promise<T[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Stops the PXE's job queue.
|
|
192
|
+
*/
|
|
193
|
+
stop(): Promise<void>;
|
|
191
194
|
}
|
|
192
195
|
export type EventMetadataDefinition = {
|
|
193
196
|
eventSelector: EventSelector;
|
|
@@ -229,181 +232,4 @@ export interface ContractClassMetadata {
|
|
|
229
232
|
isContractClassPubliclyRegistered: boolean;
|
|
230
233
|
artifact?: ContractArtifact | undefined;
|
|
231
234
|
}
|
|
232
|
-
export declare const ContractMetadataSchema: z.ZodObject<{
|
|
233
|
-
contractInstance: z.ZodUnion<[z.ZodIntersection<z.ZodObject<{
|
|
234
|
-
version: z.ZodLiteral<1>;
|
|
235
|
-
salt: ZodFor<Fr>;
|
|
236
|
-
deployer: ZodFor<AztecAddress>;
|
|
237
|
-
currentContractClassId: ZodFor<Fr>;
|
|
238
|
-
originalContractClassId: ZodFor<Fr>;
|
|
239
|
-
initializationHash: ZodFor<Fr>;
|
|
240
|
-
publicKeys: z.ZodEffects<z.ZodObject<{
|
|
241
|
-
masterNullifierPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
242
|
-
masterIncomingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
243
|
-
masterOutgoingViewingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
244
|
-
masterTaggingPublicKey: z.ZodType<import("@aztec/foundation/fields").Point, any, string>;
|
|
245
|
-
}, "strip", z.ZodTypeAny, {
|
|
246
|
-
masterNullifierPublicKey: import("@aztec/foundation/fields").Point;
|
|
247
|
-
masterIncomingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
248
|
-
masterOutgoingViewingPublicKey: import("@aztec/foundation/fields").Point;
|
|
249
|
-
masterTaggingPublicKey: import("@aztec/foundation/fields").Point;
|
|
250
|
-
}, {
|
|
251
|
-
masterNullifierPublicKey: string;
|
|
252
|
-
masterIncomingViewingPublicKey: string;
|
|
253
|
-
masterOutgoingViewingPublicKey: string;
|
|
254
|
-
masterTaggingPublicKey: string;
|
|
255
|
-
}>, import("../keys/public_keys.js").PublicKeys, {
|
|
256
|
-
masterNullifierPublicKey: string;
|
|
257
|
-
masterIncomingViewingPublicKey: string;
|
|
258
|
-
masterOutgoingViewingPublicKey: string;
|
|
259
|
-
masterTaggingPublicKey: string;
|
|
260
|
-
}>;
|
|
261
|
-
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
version: 1;
|
|
263
|
-
salt: Fr;
|
|
264
|
-
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
265
|
-
deployer: AztecAddress;
|
|
266
|
-
currentContractClassId: Fr;
|
|
267
|
-
originalContractClassId: Fr;
|
|
268
|
-
initializationHash: Fr;
|
|
269
|
-
}, {
|
|
270
|
-
version: 1;
|
|
271
|
-
publicKeys: {
|
|
272
|
-
masterNullifierPublicKey: string;
|
|
273
|
-
masterIncomingViewingPublicKey: string;
|
|
274
|
-
masterOutgoingViewingPublicKey: string;
|
|
275
|
-
masterTaggingPublicKey: string;
|
|
276
|
-
};
|
|
277
|
-
salt?: any;
|
|
278
|
-
deployer?: any;
|
|
279
|
-
currentContractClassId?: any;
|
|
280
|
-
originalContractClassId?: any;
|
|
281
|
-
initializationHash?: any;
|
|
282
|
-
}>, z.ZodObject<{
|
|
283
|
-
address: ZodFor<AztecAddress>;
|
|
284
|
-
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
address: AztecAddress;
|
|
286
|
-
}, {
|
|
287
|
-
address?: any;
|
|
288
|
-
}>>, z.ZodUndefined]>;
|
|
289
|
-
isContractInitialized: z.ZodBoolean;
|
|
290
|
-
isContractPublished: z.ZodBoolean;
|
|
291
|
-
}, "strip", z.ZodTypeAny, {
|
|
292
|
-
isContractInitialized: boolean;
|
|
293
|
-
isContractPublished: boolean;
|
|
294
|
-
contractInstance?: ({
|
|
295
|
-
version: 1;
|
|
296
|
-
salt: Fr;
|
|
297
|
-
publicKeys: import("../keys/public_keys.js").PublicKeys;
|
|
298
|
-
deployer: AztecAddress;
|
|
299
|
-
currentContractClassId: Fr;
|
|
300
|
-
originalContractClassId: Fr;
|
|
301
|
-
initializationHash: Fr;
|
|
302
|
-
} & {
|
|
303
|
-
address: AztecAddress;
|
|
304
|
-
}) | undefined;
|
|
305
|
-
}, {
|
|
306
|
-
isContractInitialized: boolean;
|
|
307
|
-
isContractPublished: boolean;
|
|
308
|
-
contractInstance?: ({
|
|
309
|
-
version: 1;
|
|
310
|
-
publicKeys: {
|
|
311
|
-
masterNullifierPublicKey: string;
|
|
312
|
-
masterIncomingViewingPublicKey: string;
|
|
313
|
-
masterOutgoingViewingPublicKey: string;
|
|
314
|
-
masterTaggingPublicKey: string;
|
|
315
|
-
};
|
|
316
|
-
salt?: any;
|
|
317
|
-
deployer?: any;
|
|
318
|
-
currentContractClassId?: any;
|
|
319
|
-
originalContractClassId?: any;
|
|
320
|
-
initializationHash?: any;
|
|
321
|
-
} & {
|
|
322
|
-
address?: any;
|
|
323
|
-
}) | undefined;
|
|
324
|
-
}>;
|
|
325
|
-
export declare const ContractClassMetadataSchema: z.ZodObject<{
|
|
326
|
-
contractClass: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
327
|
-
version: z.ZodLiteral<1>;
|
|
328
|
-
artifactHash: z.ZodType<Fr, any, string>;
|
|
329
|
-
privateFunctions: z.ZodArray<z.ZodObject<{
|
|
330
|
-
selector: ZodFor<import("../abi/function_selector.js").FunctionSelector>;
|
|
331
|
-
vkHash: z.ZodType<Fr, any, string>;
|
|
332
|
-
}, "strip", z.ZodTypeAny, {
|
|
333
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
334
|
-
vkHash: Fr;
|
|
335
|
-
}, {
|
|
336
|
-
vkHash: string;
|
|
337
|
-
selector?: any;
|
|
338
|
-
}>, "many">;
|
|
339
|
-
packedBytecode: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Buffer<ArrayBuffer>, string>, z.ZodEffects<z.ZodObject<{
|
|
340
|
-
type: z.ZodLiteral<"Buffer">;
|
|
341
|
-
data: z.ZodArray<z.ZodNumber, "many">;
|
|
342
|
-
}, "strip", z.ZodTypeAny, {
|
|
343
|
-
type: "Buffer";
|
|
344
|
-
data: number[];
|
|
345
|
-
}, {
|
|
346
|
-
type: "Buffer";
|
|
347
|
-
data: number[];
|
|
348
|
-
}>, Buffer<ArrayBuffer>, {
|
|
349
|
-
type: "Buffer";
|
|
350
|
-
data: number[];
|
|
351
|
-
}>]>;
|
|
352
|
-
}, {
|
|
353
|
-
id: z.ZodType<Fr, any, string>;
|
|
354
|
-
}>, "strip", z.ZodTypeAny, {
|
|
355
|
-
version: 1;
|
|
356
|
-
id: Fr;
|
|
357
|
-
artifactHash: Fr;
|
|
358
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
359
|
-
privateFunctions: {
|
|
360
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
361
|
-
vkHash: Fr;
|
|
362
|
-
}[];
|
|
363
|
-
}, {
|
|
364
|
-
version: 1;
|
|
365
|
-
id: string;
|
|
366
|
-
artifactHash: string;
|
|
367
|
-
packedBytecode: string | {
|
|
368
|
-
type: "Buffer";
|
|
369
|
-
data: number[];
|
|
370
|
-
};
|
|
371
|
-
privateFunctions: {
|
|
372
|
-
vkHash: string;
|
|
373
|
-
selector?: any;
|
|
374
|
-
}[];
|
|
375
|
-
}>, z.ZodUndefined]>;
|
|
376
|
-
isContractClassPubliclyRegistered: z.ZodBoolean;
|
|
377
|
-
artifact: z.ZodUnion<[ZodFor<ContractArtifact>, z.ZodUndefined]>;
|
|
378
|
-
}, "strip", z.ZodTypeAny, {
|
|
379
|
-
isContractClassPubliclyRegistered: boolean;
|
|
380
|
-
artifact?: ContractArtifact | undefined;
|
|
381
|
-
contractClass?: {
|
|
382
|
-
version: 1;
|
|
383
|
-
id: Fr;
|
|
384
|
-
artifactHash: Fr;
|
|
385
|
-
packedBytecode: Buffer<ArrayBuffer>;
|
|
386
|
-
privateFunctions: {
|
|
387
|
-
selector: import("../abi/function_selector.js").FunctionSelector;
|
|
388
|
-
vkHash: Fr;
|
|
389
|
-
}[];
|
|
390
|
-
} | undefined;
|
|
391
|
-
}, {
|
|
392
|
-
isContractClassPubliclyRegistered: boolean;
|
|
393
|
-
artifact?: any;
|
|
394
|
-
contractClass?: {
|
|
395
|
-
version: 1;
|
|
396
|
-
id: string;
|
|
397
|
-
artifactHash: string;
|
|
398
|
-
packedBytecode: string | {
|
|
399
|
-
type: "Buffer";
|
|
400
|
-
data: number[];
|
|
401
|
-
};
|
|
402
|
-
privateFunctions: {
|
|
403
|
-
vkHash: string;
|
|
404
|
-
selector?: any;
|
|
405
|
-
}[];
|
|
406
|
-
} | undefined;
|
|
407
|
-
}>;
|
|
408
|
-
export declare const PXESchema: ApiSchemaFor<PXE>;
|
|
409
235
|
//# sourceMappingURL=pxe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../src/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"pxe.d.ts","sourceRoot":"","sources":["../../src/interfaces/pxe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EACL,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD;;;;;GAKG;AACH,MAAM,WAAW,GAAG;IAClB;;;;;;;;;OASG;IACH,eAAe,CAAC,SAAS,EAAE,EAAE,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzF;;;OAGG;IACH,qBAAqB,IAAI,OAAO,CAAC,eAAe,EA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