@aztec/stdlib 2.0.0-rc.29 → 2.0.0-rc.30

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.
@@ -6,7 +6,7 @@ export type ViemZkPassportProofParams = {
6
6
  publicInputs: `0x${string}`[];
7
7
  committedInputs: `0x${string}`;
8
8
  committedInputCounts: bigint[];
9
- validityPeriodInDays: bigint;
9
+ validityPeriodInSeconds: bigint;
10
10
  domain: string;
11
11
  scope: string;
12
12
  devMode: boolean;
@@ -18,10 +18,10 @@ export declare class ZkPassportProofParams {
18
18
  publicInputs: Fr[];
19
19
  committedInputs: Buffer;
20
20
  committedInputCounts: bigint[];
21
- validityPeriodInDays: bigint;
21
+ validityPeriodInSeconds: bigint;
22
22
  domain: string;
23
23
  scope: string;
24
- constructor(devMode: boolean, vkeyHash: Buffer32, proof: Buffer, publicInputs: Fr[], committedInputs: Buffer, committedInputCounts: bigint[], validityPeriodInDays: bigint, domain: string, scope: string);
24
+ constructor(devMode: boolean, vkeyHash: Buffer32, proof: Buffer, publicInputs: Fr[], committedInputs: Buffer, committedInputCounts: bigint[], validityPeriodInSeconds: bigint, domain: string, scope: string);
25
25
  toBuffer(): Buffer<ArrayBufferLike>;
26
26
  static random(): ZkPassportProofParams;
27
27
  static fromBuffer(buffer: Buffer): ZkPassportProofParams;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zkpassport/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,KAAK,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;IAC9B,eAAe,EAAE,KAAK,MAAM,EAAE,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,CAAC;IAC/B,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,uBAAuB,EAAE,MAAM,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAIF,qBAAa,qBAAqB;IAEvB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,MAAM;IACb,YAAY,EAAE,EAAE,EAAE;IAClB,eAAe,EAAE,MAAM;IACvB,oBAAoB,EAAE,MAAM,EAAE;IAC9B,uBAAuB,EAAE,MAAM;IAC/B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;gBARb,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,EAAE,EAAE,EAClB,eAAe,EAAE,MAAM,EACvB,oBAAoB,EAAE,MAAM,EAAE,EAC9B,uBAAuB,EAAE,MAAM,EAC/B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM;IAGtB,QAAQ;IAkBR,MAAM,CAAC,MAAM;IAqBb,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM;IAehC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,yBAAyB;IAcjD,MAAM,IAAI,yBAAyB;CAapC"}
@@ -12,17 +12,17 @@ export class ZkPassportProofParams {
12
12
  publicInputs;
13
13
  committedInputs;
14
14
  committedInputCounts;
15
- validityPeriodInDays;
15
+ validityPeriodInSeconds;
16
16
  domain;
17
17
  scope;
18
- constructor(devMode, vkeyHash, proof, publicInputs, committedInputs, committedInputCounts, validityPeriodInDays, domain, scope){
18
+ constructor(devMode, vkeyHash, proof, publicInputs, committedInputs, committedInputCounts, validityPeriodInSeconds, domain, scope){
19
19
  this.devMode = devMode;
20
20
  this.vkeyHash = vkeyHash;
21
21
  this.proof = proof;
22
22
  this.publicInputs = publicInputs;
23
23
  this.committedInputs = committedInputs;
24
24
  this.committedInputCounts = committedInputCounts;
25
- this.validityPeriodInDays = validityPeriodInDays;
25
+ this.validityPeriodInSeconds = validityPeriodInSeconds;
26
26
  this.domain = domain;
27
27
  this.scope = scope;
28
28
  }
@@ -38,7 +38,7 @@ export class ZkPassportProofParams {
38
38
  this.committedInputs,
39
39
  this.committedInputCounts.length,
40
40
  this.committedInputCounts,
41
- this.validityPeriodInDays,
41
+ this.validityPeriodInSeconds,
42
42
  this.domain,
43
43
  this.scope
44
44
  ]);
@@ -56,14 +56,14 @@ export class ZkPassportProofParams {
56
56
  const publicInputs = Array.from({
57
57
  length: Number(publicInputsCount)
58
58
  }, ()=>Fr.random());
59
- return new ZkPassportProofParams(false, Buffer32.random(), randomBytes(1024), publicInputs, committedInputs, committedInputCounts, BigInt(100), 'sequencer.alpha-testnet.aztec.network', 'personhood');
59
+ return new ZkPassportProofParams(false, Buffer32.random(), randomBytes(1024), publicInputs, committedInputs, committedInputCounts, BigInt(100 * 60 * 60 * 24), 'sequencer.alpha-testnet.aztec.network', 'personhood');
60
60
  }
61
61
  static fromBuffer(buffer) {
62
62
  const reader = BufferReader.asReader(buffer);
63
63
  return new ZkPassportProofParams(reader.readBoolean(), reader.readObject(Buffer32), reader.readBuffer(), reader.readVector(Fr), reader.readBuffer(), reader.readUint256Vector(), reader.readUInt256(), reader.readString(), reader.readString());
64
64
  }
65
65
  static fromViem(params) {
66
- return new ZkPassportProofParams(params.devMode, Buffer32.fromString(params.vkeyHash), Buffer.from(withoutHexPrefix(params.proof), 'hex'), params.publicInputs.map((input)=>Fr.fromString(input)), Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'), params.committedInputCounts, params.validityPeriodInDays, params.domain, params.scope);
66
+ return new ZkPassportProofParams(params.devMode, Buffer32.fromString(params.vkeyHash), Buffer.from(withoutHexPrefix(params.proof), 'hex'), params.publicInputs.map((input)=>Fr.fromString(input)), Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'), params.committedInputCounts, params.validityPeriodInSeconds, params.domain, params.scope);
67
67
  }
68
68
  toViem() {
69
69
  return {
@@ -73,7 +73,7 @@ export class ZkPassportProofParams {
73
73
  publicInputs: this.publicInputs.map((input)=>input.toString()),
74
74
  committedInputs: `0x${this.committedInputs.toString('hex')}`,
75
75
  committedInputCounts: this.committedInputCounts,
76
- validityPeriodInDays: this.validityPeriodInDays,
76
+ validityPeriodInSeconds: this.validityPeriodInSeconds,
77
77
  domain: this.domain,
78
78
  scope: this.scope
79
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/stdlib",
3
- "version": "2.0.0-rc.29",
3
+ "version": "2.0.0-rc.30",
4
4
  "type": "module",
5
5
  "inherits": [
6
6
  "../package.common.json",
@@ -69,13 +69,13 @@
69
69
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
70
70
  },
71
71
  "dependencies": {
72
- "@aztec/bb.js": "2.0.0-rc.29",
73
- "@aztec/blob-lib": "2.0.0-rc.29",
74
- "@aztec/constants": "2.0.0-rc.29",
75
- "@aztec/ethereum": "2.0.0-rc.29",
76
- "@aztec/foundation": "2.0.0-rc.29",
77
- "@aztec/l1-artifacts": "2.0.0-rc.29",
78
- "@aztec/noir-noirc_abi": "2.0.0-rc.29",
72
+ "@aztec/bb.js": "2.0.0-rc.30",
73
+ "@aztec/blob-lib": "2.0.0-rc.30",
74
+ "@aztec/constants": "2.0.0-rc.30",
75
+ "@aztec/ethereum": "2.0.0-rc.30",
76
+ "@aztec/foundation": "2.0.0-rc.30",
77
+ "@aztec/l1-artifacts": "2.0.0-rc.30",
78
+ "@aztec/noir-noirc_abi": "2.0.0-rc.30",
79
79
  "@google-cloud/storage": "^7.15.0",
80
80
  "axios": "^1.9.0",
81
81
  "json-stringify-deterministic": "1.0.12",
@@ -10,7 +10,7 @@ export type ViemZkPassportProofParams = {
10
10
  publicInputs: `0x${string}`[];
11
11
  committedInputs: `0x${string}`;
12
12
  committedInputCounts: bigint[];
13
- validityPeriodInDays: bigint;
13
+ validityPeriodInSeconds: bigint;
14
14
  domain: string;
15
15
  scope: string;
16
16
  devMode: boolean;
@@ -26,7 +26,7 @@ export class ZkPassportProofParams {
26
26
  public publicInputs: Fr[],
27
27
  public committedInputs: Buffer,
28
28
  public committedInputCounts: bigint[],
29
- public validityPeriodInDays: bigint,
29
+ public validityPeriodInSeconds: bigint,
30
30
  public domain: string,
31
31
  public scope: string,
32
32
  ) {}
@@ -43,7 +43,7 @@ export class ZkPassportProofParams {
43
43
  this.committedInputs,
44
44
  this.committedInputCounts.length,
45
45
  this.committedInputCounts,
46
- this.validityPeriodInDays,
46
+ this.validityPeriodInSeconds,
47
47
  this.domain,
48
48
  this.scope,
49
49
  ]);
@@ -64,7 +64,7 @@ export class ZkPassportProofParams {
64
64
  publicInputs,
65
65
  committedInputs,
66
66
  committedInputCounts,
67
- BigInt(100),
67
+ BigInt(100 * 60 * 60 * 24),
68
68
  'sequencer.alpha-testnet.aztec.network',
69
69
  'personhood',
70
70
  );
@@ -93,7 +93,7 @@ export class ZkPassportProofParams {
93
93
  params.publicInputs.map(input => Fr.fromString(input)),
94
94
  Buffer.from(withoutHexPrefix(params.committedInputs), 'hex'),
95
95
  params.committedInputCounts,
96
- params.validityPeriodInDays,
96
+ params.validityPeriodInSeconds,
97
97
  params.domain,
98
98
  params.scope,
99
99
  );
@@ -107,7 +107,7 @@ export class ZkPassportProofParams {
107
107
  publicInputs: this.publicInputs.map(input => input.toString()),
108
108
  committedInputs: `0x${this.committedInputs.toString('hex')}`,
109
109
  committedInputCounts: this.committedInputCounts,
110
- validityPeriodInDays: this.validityPeriodInDays,
110
+ validityPeriodInSeconds: this.validityPeriodInSeconds,
111
111
  domain: this.domain,
112
112
  scope: this.scope,
113
113
  };