@aztec/entrypoints 0.0.1-commit.d431d1c → 0.0.1-commit.db765a8

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.
@@ -61,7 +61,16 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
61
61
  const { authWitnesses, capsules, extraHashedArgs, feePayer } = exec;
62
62
  const callData = await this.#buildEntrypointCallData(exec, options);
63
63
  // Build the entrypoint function call
64
- const entrypointCall = new FunctionCall(callData.abi.name, this.address, callData.functionSelector, callData.abi.functionType, false, callData.abi.isStatic, callData.encodedArgs, callData.abi.returnTypes);
64
+ const entrypointCall = FunctionCall.from({
65
+ name: callData.abi.name,
66
+ to: this.address,
67
+ selector: callData.functionSelector,
68
+ type: callData.abi.functionType,
69
+ hideMsgSender: false,
70
+ isStatic: callData.abi.isStatic,
71
+ args: callData.encodedArgs,
72
+ returnTypes: callData.abi.returnTypes
73
+ });
65
74
  return new ExecutionPayload([
66
75
  entrypointCall
67
76
  ], [
@@ -33,7 +33,16 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
33
33
  async wrapExecutionPayload(exec, _options) {
34
34
  const { authWitnesses, capsules, extraHashedArgs } = exec;
35
35
  const callData = await this.#buildEntrypointCallData(exec);
36
- const entrypointCall = new FunctionCall(callData.abi.name, this.address, callData.functionSelector, callData.abi.functionType, false, callData.abi.isStatic, callData.encodedArgs, callData.abi.returnTypes);
36
+ const entrypointCall = FunctionCall.from({
37
+ name: callData.abi.name,
38
+ to: this.address,
39
+ selector: callData.functionSelector,
40
+ type: callData.abi.functionType,
41
+ hideMsgSender: false,
42
+ isStatic: callData.abi.isStatic,
43
+ args: callData.encodedArgs,
44
+ returnTypes: callData.abi.returnTypes
45
+ });
37
46
  return new ExecutionPayload([
38
47
  entrypointCall
39
48
  ], authWitnesses, capsules, [
@@ -37,7 +37,7 @@ export declare class EncodedAppEntrypointCalls implements EncodedCalls {
37
37
  /** The hashed args for the call, ready to be injected in the execution cache */
38
38
  hashedArguments: HashedValues[];
39
39
  /** The index of the generator to use for hashing */
40
- generatorIndex: number;
40
+ domainSeparator: number;
41
41
  /**
42
42
  * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
43
43
  * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
@@ -50,7 +50,7 @@ export declare class EncodedAppEntrypointCalls implements EncodedCalls {
50
50
  /** The hashed args for the call, ready to be injected in the execution cache */
51
51
  hashedArguments: HashedValues[],
52
52
  /** The index of the generator to use for hashing */
53
- generatorIndex: number,
53
+ domainSeparator: number,
54
54
  /**
55
55
  * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
56
56
  * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
@@ -85,4 +85,4 @@ export declare class EncodedAppEntrypointCalls implements EncodedCalls {
85
85
  }
86
86
  /** Encodes FunctionCalls for execution, following Noir's convention */
87
87
  export declare function encode(calls: FunctionCall[]): Promise<EncodedCalls>;
88
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5jb2RpbmcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9lbmNvZGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDekQsT0FBTyxFQUFFLFlBQVksRUFBZ0IsTUFBTSxtQkFBbUIsQ0FBQztBQUMvRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFJaEQsZUFBTyxNQUFNLGFBQWEsSUFBSSxDQUFDO0FBRS9CLG9EQUFvRDtBQUNwRCxNQUFNLE1BQU0sbUJBQW1CLEdBQUc7SUFDaEMsbUNBQW1DO0lBQ25DL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AAC,YAAY,CAAC,CAwBzE"}
package/dest/encoding.js CHANGED
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex } from '@aztec/constants';
1
+ import { DomainSeparator } from '@aztec/constants';
2
2
  import { padArrayEnd } from '@aztec/foundation/collection';
3
3
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
@@ -14,9 +14,9 @@ export const APP_MAX_CALLS = 5;
14
14
  * */ export class EncodedAppEntrypointCalls {
15
15
  encodedFunctionCalls;
16
16
  hashedArguments;
17
- generatorIndex;
17
+ domainSeparator;
18
18
  tx_nonce;
19
- constructor(/** Function calls in the expected format (Noir's convention) */ encodedFunctionCalls, /** The hashed args for the call, ready to be injected in the execution cache */ hashedArguments, /** The index of the generator to use for hashing */ generatorIndex, /**
19
+ constructor(/** Function calls in the expected format (Noir's convention) */ encodedFunctionCalls, /** The hashed args for the call, ready to be injected in the execution cache */ hashedArguments, /** The index of the generator to use for hashing */ domainSeparator, /**
20
20
  * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
21
21
  * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
22
22
  * but higher fee. The nullifier ensures only one transaction can succeed.
@@ -24,7 +24,7 @@ export const APP_MAX_CALLS = 5;
24
24
  tx_nonce){
25
25
  this.encodedFunctionCalls = encodedFunctionCalls;
26
26
  this.hashedArguments = hashedArguments;
27
- this.generatorIndex = generatorIndex;
27
+ this.domainSeparator = domainSeparator;
28
28
  this.tx_nonce = tx_nonce;
29
29
  }
30
30
  /* eslint-disable camelcase */ /**
@@ -46,7 +46,7 @@ export const APP_MAX_CALLS = 5;
46
46
  * Hashes the payload
47
47
  * @returns The hash of the payload
48
48
  */ hash() {
49
- return poseidon2HashWithSeparator(this.toFields(), this.generatorIndex);
49
+ return poseidon2HashWithSeparator(this.toFields(), this.domainSeparator);
50
50
  }
51
51
  /** Serializes the function calls to an array of fields. */ functionCallsToFields() {
52
52
  return this.encodedFunctionCalls.flatMap((call)=>[
@@ -70,7 +70,7 @@ export const APP_MAX_CALLS = 5;
70
70
  }
71
71
  const paddedCalls = padArrayEnd(functionCalls, FunctionCall.empty(), APP_MAX_CALLS);
72
72
  const encoded = await encode(paddedCalls);
73
- return new EncodedAppEntrypointCalls(encoded.encodedFunctionCalls, encoded.hashedArguments, GeneratorIndex.SIGNATURE_PAYLOAD, txNonce);
73
+ return new EncodedAppEntrypointCalls(encoded.encodedFunctionCalls, encoded.hashedArguments, DomainSeparator.SIGNATURE_PAYLOAD, txNonce);
74
74
  }
75
75
  }
76
76
  /** Encodes FunctionCalls for execution, following Noir's convention */ export async function encode(calls) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aztec/entrypoints",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/entrypoints",
4
4
  "description": "Implementation of sample contract entrypoints for the Aztec Network",
5
- "version": "0.0.1-commit.d431d1c",
5
+ "version": "0.0.1-commit.db765a8",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  "./account": "./dest/account_entrypoint.js",
@@ -67,10 +67,10 @@
67
67
  ]
68
68
  },
69
69
  "dependencies": {
70
- "@aztec/constants": "0.0.1-commit.d431d1c",
71
- "@aztec/foundation": "0.0.1-commit.d431d1c",
72
- "@aztec/protocol-contracts": "0.0.1-commit.d431d1c",
73
- "@aztec/stdlib": "0.0.1-commit.d431d1c",
70
+ "@aztec/constants": "0.0.1-commit.db765a8",
71
+ "@aztec/foundation": "0.0.1-commit.db765a8",
72
+ "@aztec/protocol-contracts": "0.0.1-commit.db765a8",
73
+ "@aztec/stdlib": "0.0.1-commit.db765a8",
74
74
  "tslib": "^2.4.0",
75
75
  "zod": "^3.23.8"
76
76
  },
@@ -90,16 +90,16 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
90
90
  const callData = await this.#buildEntrypointCallData(exec, options);
91
91
 
92
92
  // Build the entrypoint function call
93
- const entrypointCall = new FunctionCall(
94
- callData.abi.name,
95
- this.address,
96
- callData.functionSelector,
97
- callData.abi.functionType,
98
- false,
99
- callData.abi.isStatic,
100
- callData.encodedArgs,
101
- callData.abi.returnTypes,
102
- );
93
+ const entrypointCall = FunctionCall.from({
94
+ name: callData.abi.name,
95
+ to: this.address,
96
+ selector: callData.functionSelector,
97
+ type: callData.abi.functionType,
98
+ hideMsgSender: false,
99
+ isStatic: callData.abi.isStatic,
100
+ args: callData.encodedArgs,
101
+ returnTypes: callData.abi.returnTypes,
102
+ });
103
103
 
104
104
  return new ExecutionPayload(
105
105
  [entrypointCall],
@@ -40,16 +40,16 @@ export class DefaultMultiCallEntrypoint implements EntrypointInterface {
40
40
  async wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload> {
41
41
  const { authWitnesses, capsules, extraHashedArgs } = exec;
42
42
  const callData = await this.#buildEntrypointCallData(exec);
43
- const entrypointCall = new FunctionCall(
44
- callData.abi.name,
45
- this.address,
46
- callData.functionSelector,
47
- callData.abi.functionType,
48
- false,
49
- callData.abi.isStatic,
50
- callData.encodedArgs,
51
- callData.abi.returnTypes,
52
- );
43
+ const entrypointCall = FunctionCall.from({
44
+ name: callData.abi.name,
45
+ to: this.address,
46
+ selector: callData.functionSelector,
47
+ type: callData.abi.functionType,
48
+ hideMsgSender: false,
49
+ isStatic: callData.abi.isStatic,
50
+ args: callData.encodedArgs,
51
+ returnTypes: callData.abi.returnTypes,
52
+ });
53
53
 
54
54
  return new ExecutionPayload(
55
55
  [entrypointCall],
package/src/encoding.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GeneratorIndex } from '@aztec/constants';
1
+ import { DomainSeparator } from '@aztec/constants';
2
2
  import { padArrayEnd } from '@aztec/foundation/collection';
3
3
  import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
@@ -47,7 +47,7 @@ export class EncodedAppEntrypointCalls implements EncodedCalls {
47
47
  /** The hashed args for the call, ready to be injected in the execution cache */
48
48
  public hashedArguments: HashedValues[],
49
49
  /** The index of the generator to use for hashing */
50
- public generatorIndex: number,
50
+ public domainSeparator: number,
51
51
  /**
52
52
  * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
53
53
  * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
@@ -80,7 +80,7 @@ export class EncodedAppEntrypointCalls implements EncodedCalls {
80
80
  * @returns The hash of the payload
81
81
  */
82
82
  hash() {
83
- return poseidon2HashWithSeparator(this.toFields(), this.generatorIndex);
83
+ return poseidon2HashWithSeparator(this.toFields(), this.domainSeparator);
84
84
  }
85
85
 
86
86
  /** Serializes the function calls to an array of fields. */
@@ -114,7 +114,7 @@ export class EncodedAppEntrypointCalls implements EncodedCalls {
114
114
  return new EncodedAppEntrypointCalls(
115
115
  encoded.encodedFunctionCalls,
116
116
  encoded.hashedArguments,
117
- GeneratorIndex.SIGNATURE_PAYLOAD,
117
+ DomainSeparator.SIGNATURE_PAYLOAD,
118
118
  txNonce,
119
119
  );
120
120
  }