@aztec/stdlib 3.0.0-nightly.20250914 → 3.0.0-nightly.20250916

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.
@@ -5,6 +5,14 @@ import { type ContractArtifact, type FunctionAbi } from '../abi/index.js';
5
5
  import { AztecAddress } from '../aztec-address/index.js';
6
6
  import { PublicKeys } from '../keys/public_keys.js';
7
7
  import type { ContractInstance, ContractInstanceWithAddress } from './interfaces/contract_instance.js';
8
+ export type ContractInstantiationData = {
9
+ constructorArtifact?: FunctionAbi | string;
10
+ constructorArgs?: any[];
11
+ skipArgsDecoding?: boolean;
12
+ salt: Fr;
13
+ publicKeys?: PublicKeys;
14
+ deployer?: AztecAddress;
15
+ };
8
16
  export declare class SerializableContractInstance {
9
17
  readonly version: 1;
10
18
  readonly salt: Fr;
@@ -27,12 +35,5 @@ export declare class SerializableContractInstance {
27
35
  * @param opts - Options for the contract's instantiation.
28
36
  * @returns - The contract instance
29
37
  */
30
- export declare function getContractInstanceFromInstantiationParams(artifact: ContractArtifact, opts: {
31
- constructorArtifact?: FunctionAbi | string;
32
- constructorArgs?: any[];
33
- skipArgsDecoding?: boolean;
34
- salt?: Fr;
35
- publicKeys?: PublicKeys;
36
- deployer?: AztecAddress;
37
- }): Promise<ContractInstanceWithAddress>;
38
+ export declare function getContractInstanceFromInstantiationParams(artifact: ContractArtifact, opts: ContractInstantiationData): Promise<ContractInstanceWithAddress>;
38
39
  //# sourceMappingURL=contract_instance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract_instance.d.ts","sourceRoot":"","sources":["../../src/contract/contract_instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAiC,MAAM,6BAA6B,CAAC;AAC1F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EACL,KAAK,gBAAgB,EACrB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AalE,MAAM,CAAC,OAAO;CAWf;AAED;;;;;GAKG;AACH,wBAAsB,0CAA0C,CAC9D,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,2BAA2B,CAAC,CAyBtC"}
@@ -77,7 +77,6 @@ export class SerializableContractInstance {
77
77
  * @returns - The contract instance
78
78
  */ export async function getContractInstanceFromInstantiationParams(artifact, opts) {
79
79
  const args = opts.constructorArgs ?? [];
80
- const salt = opts.salt ?? Fr.random();
81
80
  const constructorArtifact = getConstructorArtifact(artifact, opts.constructorArtifact);
82
81
  const deployer = opts.deployer ?? AztecAddress.ZERO;
83
82
  const contractClass = await getContractClassFromArtifact(artifact);
@@ -88,7 +87,7 @@ export class SerializableContractInstance {
88
87
  originalContractClassId: contractClass.id,
89
88
  initializationHash,
90
89
  publicKeys,
91
- salt,
90
+ salt: opts.salt,
92
91
  deployer,
93
92
  version: 1
94
93
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/stdlib",
3
- "version": "3.0.0-nightly.20250914",
3
+ "version": "3.0.0-nightly.20250916",
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": "3.0.0-nightly.20250914",
73
- "@aztec/blob-lib": "3.0.0-nightly.20250914",
74
- "@aztec/constants": "3.0.0-nightly.20250914",
75
- "@aztec/ethereum": "3.0.0-nightly.20250914",
76
- "@aztec/foundation": "3.0.0-nightly.20250914",
77
- "@aztec/l1-artifacts": "3.0.0-nightly.20250914",
78
- "@aztec/noir-noirc_abi": "3.0.0-nightly.20250914",
72
+ "@aztec/bb.js": "3.0.0-nightly.20250916",
73
+ "@aztec/blob-lib": "3.0.0-nightly.20250916",
74
+ "@aztec/constants": "3.0.0-nightly.20250916",
75
+ "@aztec/ethereum": "3.0.0-nightly.20250916",
76
+ "@aztec/foundation": "3.0.0-nightly.20250916",
77
+ "@aztec/l1-artifacts": "3.0.0-nightly.20250916",
78
+ "@aztec/noir-noirc_abi": "3.0.0-nightly.20250916",
79
79
  "@google-cloud/storage": "^7.15.0",
80
80
  "axios": "^1.9.0",
81
81
  "json-stringify-deterministic": "1.0.12",
@@ -22,6 +22,15 @@ import type { ContractInstance, ContractInstanceWithAddress } from './interfaces
22
22
 
23
23
  const VERSION = 1 as const;
24
24
 
25
+ export type ContractInstantiationData = {
26
+ constructorArtifact?: FunctionAbi | string;
27
+ constructorArgs?: any[];
28
+ skipArgsDecoding?: boolean;
29
+ salt: Fr;
30
+ publicKeys?: PublicKeys;
31
+ deployer?: AztecAddress;
32
+ };
33
+
25
34
  export class SerializableContractInstance {
26
35
  public readonly version = VERSION;
27
36
  public readonly salt: Fr;
@@ -107,17 +116,9 @@ export class SerializableContractInstance {
107
116
  */
108
117
  export async function getContractInstanceFromInstantiationParams(
109
118
  artifact: ContractArtifact,
110
- opts: {
111
- constructorArtifact?: FunctionAbi | string;
112
- constructorArgs?: any[];
113
- skipArgsDecoding?: boolean;
114
- salt?: Fr;
115
- publicKeys?: PublicKeys;
116
- deployer?: AztecAddress;
117
- },
119
+ opts: ContractInstantiationData,
118
120
  ): Promise<ContractInstanceWithAddress> {
119
121
  const args = opts.constructorArgs ?? [];
120
- const salt = opts.salt ?? Fr.random();
121
122
  const constructorArtifact = getConstructorArtifact(artifact, opts.constructorArtifact);
122
123
  const deployer = opts.deployer ?? AztecAddress.ZERO;
123
124
  const contractClass = await getContractClassFromArtifact(artifact);
@@ -135,7 +136,7 @@ export async function getContractInstanceFromInstantiationParams(
135
136
  originalContractClassId: contractClass.id,
136
137
  initializationHash,
137
138
  publicKeys,
138
- salt,
139
+ salt: opts.salt,
139
140
  deployer,
140
141
  version: 1,
141
142
  };