@aztec/stdlib 0.77.1 → 0.78.1
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.
|
@@ -89,10 +89,6 @@ export declare class PrivateVerificationKeyHints {
|
|
|
89
89
|
* The low leaf showing that the address of the contract being called is not in the tree.
|
|
90
90
|
*/
|
|
91
91
|
protocolContractLeaf: ProtocolContractLeafPreimage;
|
|
92
|
-
/**
|
|
93
|
-
* The hash of the ACIR of the function being invoked.
|
|
94
|
-
*/
|
|
95
|
-
acirHash: Fr;
|
|
96
92
|
updatedClassIdHints: UpdatedClassIdHints;
|
|
97
93
|
constructor(
|
|
98
94
|
/**
|
|
@@ -124,17 +120,13 @@ export declare class PrivateVerificationKeyHints {
|
|
|
124
120
|
* The protocol contract being called.
|
|
125
121
|
* The low leaf showing that the address of the contract being called is not in the tree.
|
|
126
122
|
*/
|
|
127
|
-
protocolContractLeaf: ProtocolContractLeafPreimage,
|
|
128
|
-
/**
|
|
129
|
-
* The hash of the ACIR of the function being invoked.
|
|
130
|
-
*/
|
|
131
|
-
acirHash: Fr, updatedClassIdHints: UpdatedClassIdHints);
|
|
123
|
+
protocolContractLeaf: ProtocolContractLeafPreimage, updatedClassIdHints: UpdatedClassIdHints);
|
|
132
124
|
/**
|
|
133
125
|
* Serialize into a field array. Low-level utility.
|
|
134
126
|
* @param fields - Object with fields.
|
|
135
127
|
* @returns The array.
|
|
136
128
|
*/
|
|
137
|
-
static getFields(fields: FieldsOf<PrivateVerificationKeyHints>): readonly [Fr, Fr, PublicKeys, Fr, MembershipWitness<5>, MembershipWitness<3>, ProtocolContractLeafPreimage,
|
|
129
|
+
static getFields(fields: FieldsOf<PrivateVerificationKeyHints>): readonly [Fr, Fr, PublicKeys, Fr, MembershipWitness<5>, MembershipWitness<3>, ProtocolContractLeafPreimage, UpdatedClassIdHints];
|
|
138
130
|
static from(fields: FieldsOf<PrivateVerificationKeyHints>): PrivateVerificationKeyHints;
|
|
139
131
|
/**
|
|
140
132
|
* Serialize this as a buffer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private_call_data.d.ts","sourceRoot":"","sources":["../../src/kernel/private_call_data.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,oBAAoB,EACpB,6BAA6B,EAC7B,uBAAuB,EAExB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAqB,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF;;GAEG;AACH,qBAAa,eAAe;IAExB;;OAEG;IACI,YAAY,EAAE,0BAA0B;IAE/C;;OAEG;IACI,EAAE,EAAE,uBAAuB;IAElC;;OAEG;IACI,oBAAoB,EAAE,2BAA2B;;IAbxD;;OAEG;IACI,YAAY,EAAE,0BAA0B;IAE/C;;OAEG;IACI,EAAE,EAAE,uBAAuB;IAElC;;OAEG;IACI,oBAAoB,EAAE,2BAA2B;IAG1D;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC;IAIlD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,GAAG,eAAe;IAI/D;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,MAAM,CAAC,U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AC,2BAA2B,CAAC;IAa9D,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,2BAA2B,CAAC,GAAG,2BAA2B;IAIvF;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,2BAA2B;CAa9E;AAED,qBAAa,mBAAmB;IAErB,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,uBAAuB,CAAC;IACxE,kBAAkB,EAAE,0BAA0B;IAC9C,oBAAoB,EAAE,mBAAmB;gBAFzC,qBAAqB,EAAE,iBAAiB,CAAC,OAAO,uBAAuB,CAAC,EACxE,kBAAkB,EAAE,0BAA0B,EAC9C,oBAAoB,EAAE,mBAAmB;IAGlD,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC;IAItD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,mBAAmB,CAAC,GAAG,mBAAmB;IAIvE;;;OAGG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,mBAAmB;CAYtE"}
|
|
@@ -61,7 +61,6 @@ export class PrivateVerificationKeyHints {
|
|
|
61
61
|
functionLeafMembershipWitness;
|
|
62
62
|
protocolContractMembershipWitness;
|
|
63
63
|
protocolContractLeaf;
|
|
64
|
-
acirHash;
|
|
65
64
|
updatedClassIdHints;
|
|
66
65
|
constructor(/**
|
|
67
66
|
* Artifact hash of the contract class for this private call.
|
|
@@ -79,9 +78,7 @@ export class PrivateVerificationKeyHints {
|
|
|
79
78
|
* The leaf of the protocol contract tree, of either:
|
|
80
79
|
* The protocol contract being called.
|
|
81
80
|
* The low leaf showing that the address of the contract being called is not in the tree.
|
|
82
|
-
*/ protocolContractLeaf,
|
|
83
|
-
* The hash of the ACIR of the function being invoked.
|
|
84
|
-
*/ acirHash, updatedClassIdHints){
|
|
81
|
+
*/ protocolContractLeaf, updatedClassIdHints){
|
|
85
82
|
this.contractClassArtifactHash = contractClassArtifactHash;
|
|
86
83
|
this.contractClassPublicBytecodeCommitment = contractClassPublicBytecodeCommitment;
|
|
87
84
|
this.publicKeys = publicKeys;
|
|
@@ -89,7 +86,6 @@ export class PrivateVerificationKeyHints {
|
|
|
89
86
|
this.functionLeafMembershipWitness = functionLeafMembershipWitness;
|
|
90
87
|
this.protocolContractMembershipWitness = protocolContractMembershipWitness;
|
|
91
88
|
this.protocolContractLeaf = protocolContractLeaf;
|
|
92
|
-
this.acirHash = acirHash;
|
|
93
89
|
this.updatedClassIdHints = updatedClassIdHints;
|
|
94
90
|
}
|
|
95
91
|
/**
|
|
@@ -105,7 +101,6 @@ export class PrivateVerificationKeyHints {
|
|
|
105
101
|
fields.functionLeafMembershipWitness,
|
|
106
102
|
fields.protocolContractMembershipWitness,
|
|
107
103
|
fields.protocolContractLeaf,
|
|
108
|
-
fields.acirHash,
|
|
109
104
|
fields.updatedClassIdHints
|
|
110
105
|
];
|
|
111
106
|
}
|
|
@@ -124,7 +119,7 @@ export class PrivateVerificationKeyHints {
|
|
|
124
119
|
* @returns The deserialized instance.
|
|
125
120
|
*/ static fromBuffer(buffer) {
|
|
126
121
|
const reader = BufferReader.asReader(buffer);
|
|
127
|
-
return new PrivateVerificationKeyHints(reader.readObject(Fr), reader.readObject(Fr), reader.readObject(PublicKeys), reader.readObject(Fr), reader.readObject(MembershipWitness.deserializer(FUNCTION_TREE_HEIGHT)), reader.readObject(MembershipWitness.deserializer(PROTOCOL_CONTRACT_TREE_HEIGHT)), reader.readObject(ProtocolContractLeafPreimage), reader.readObject(
|
|
122
|
+
return new PrivateVerificationKeyHints(reader.readObject(Fr), reader.readObject(Fr), reader.readObject(PublicKeys), reader.readObject(Fr), reader.readObject(MembershipWitness.deserializer(FUNCTION_TREE_HEIGHT)), reader.readObject(MembershipWitness.deserializer(PROTOCOL_CONTRACT_TREE_HEIGHT)), reader.readObject(ProtocolContractLeafPreimage), reader.readObject(UpdatedClassIdHints));
|
|
128
123
|
}
|
|
129
124
|
}
|
|
130
125
|
export class UpdatedClassIdHints {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/stdlib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"inherits": [
|
|
6
6
|
"../package.common.json",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@aztec/bb.js": "0.
|
|
70
|
-
"@aztec/blob-lib": "0.
|
|
71
|
-
"@aztec/constants": "0.
|
|
72
|
-
"@aztec/ethereum": "0.
|
|
73
|
-
"@aztec/foundation": "0.
|
|
69
|
+
"@aztec/bb.js": "0.78.1",
|
|
70
|
+
"@aztec/blob-lib": "0.78.1",
|
|
71
|
+
"@aztec/constants": "0.78.1",
|
|
72
|
+
"@aztec/ethereum": "0.78.1",
|
|
73
|
+
"@aztec/foundation": "0.78.1",
|
|
74
74
|
"lodash.chunk": "^4.2.0",
|
|
75
75
|
"lodash.isequal": "^4.5.0",
|
|
76
76
|
"lodash.omit": "^4.5.0",
|
|
@@ -12,8 +12,8 @@ The Version Manager helps manage database migrations and version compatibility a
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
16
15
|
import { version } from '@aztec/foundation';
|
|
16
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
17
17
|
|
|
18
18
|
// Define your current database version
|
|
19
19
|
const DB_VERSION = 3;
|
|
@@ -44,7 +44,7 @@ await versionManager.checkVersionAndHandle(
|
|
|
44
44
|
// Unsupported migration path, will fall back to reset
|
|
45
45
|
throw new Error(`Cannot upgrade from ${oldVersion} to ${newVersion}`);
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
},
|
|
48
48
|
);
|
|
49
49
|
|
|
50
50
|
// Get the data directory for your service
|
|
@@ -60,4 +60,4 @@ The database will be reset in the following conditions:
|
|
|
60
60
|
3. Version has changed and no upgrade callback is provided
|
|
61
61
|
4. Upgrade callback throws an error
|
|
62
62
|
|
|
63
|
-
When a reset occurs, the data directory is deleted and recreated, and the reset callback is called to initialize a fresh database.
|
|
63
|
+
When a reset occurs, the data directory is deleted and recreated, and the reset callback is called to initialize a fresh database.
|
|
@@ -104,10 +104,6 @@ export class PrivateVerificationKeyHints {
|
|
|
104
104
|
* The low leaf showing that the address of the contract being called is not in the tree.
|
|
105
105
|
*/
|
|
106
106
|
public protocolContractLeaf: ProtocolContractLeafPreimage,
|
|
107
|
-
/**
|
|
108
|
-
* The hash of the ACIR of the function being invoked.
|
|
109
|
-
*/
|
|
110
|
-
public acirHash: Fr,
|
|
111
107
|
|
|
112
108
|
public updatedClassIdHints: UpdatedClassIdHints,
|
|
113
109
|
) {}
|
|
@@ -126,7 +122,6 @@ export class PrivateVerificationKeyHints {
|
|
|
126
122
|
fields.functionLeafMembershipWitness,
|
|
127
123
|
fields.protocolContractMembershipWitness,
|
|
128
124
|
fields.protocolContractLeaf,
|
|
129
|
-
fields.acirHash,
|
|
130
125
|
fields.updatedClassIdHints,
|
|
131
126
|
] as const;
|
|
132
127
|
}
|
|
@@ -158,7 +153,6 @@ export class PrivateVerificationKeyHints {
|
|
|
158
153
|
reader.readObject(MembershipWitness.deserializer(FUNCTION_TREE_HEIGHT)),
|
|
159
154
|
reader.readObject(MembershipWitness.deserializer(PROTOCOL_CONTRACT_TREE_HEIGHT)),
|
|
160
155
|
reader.readObject(ProtocolContractLeafPreimage),
|
|
161
|
-
reader.readObject(Fr),
|
|
162
156
|
reader.readObject(UpdatedClassIdHints),
|
|
163
157
|
);
|
|
164
158
|
}
|