@aztec/entrypoints 4.0.0-nightly.20250907 → 4.0.0-nightly.20260107

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.
@@ -1,7 +1,49 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
1
2
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import type { GasSettings } from '@aztec/stdlib/gas';
2
4
  import { TxExecutionRequest } from '@aztec/stdlib/tx';
3
- import type { AuthWitnessProvider, EntrypointInterface, FeeOptions, TxExecutionOptions } from './interfaces.js';
4
- import { ExecutionPayload } from './payload.js';
5
+ import type { ExecutionPayload } from '@aztec/stdlib/tx';
6
+ import type { AuthWitnessProvider, EntrypointInterface } from './interfaces.js';
7
+ /**
8
+ * The mechanism via which an account contract will pay for a transaction in which it gets invoked.
9
+ */
10
+ export declare enum AccountFeePaymentMethodOptions {
11
+ /**
12
+ * Signals that some other contract is in charge of paying the fee, nothing needs to be done.
13
+ */
14
+ EXTERNAL = 0,
15
+ /**
16
+ * Used to make the account contract publicly pay for the transaction with its own fee juice balance,
17
+ * **which it must already have prior to this transaction**.
18
+ *
19
+ * The contract will set itself as the fee payer and end the setup phase.
20
+ */
21
+ PREEXISTING_FEE_JUICE = 1,
22
+ /**
23
+ * Used to make the account contract publicly pay for the transaction with its own fee juice balance
24
+ * **which is being claimed in the same transaction**.
25
+ *
26
+ * The contract will set itself as the fee payer but not end setup phase - this is done by the Fee Juice
27
+ * contract after enqueuing a public call, which unlike most public calls is whitelisted by the nodes
28
+ * to be executable during the setup phase.
29
+ */
30
+ FEE_JUICE_WITH_CLAIM = 2
31
+ }
32
+ /**
33
+ * General options for the tx execution.
34
+ */
35
+ export type DefaultAccountEntrypointOptions = {
36
+ /** Whether the transaction can be cancelled. */
37
+ cancellable?: boolean;
38
+ /**
39
+ * A nonce to inject into the app payload of the transaction. When used with cancellable=true, this nonce will be
40
+ * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
41
+ * but higher fee. The nullifier ensures only one transaction can succeed.
42
+ */
43
+ txNonce?: Fr;
44
+ /** Options that configure how the account contract behaves depending on the fee payment method of the tx */
45
+ feePaymentMethodOptions: AccountFeePaymentMethodOptions;
46
+ };
5
47
  /**
6
48
  * Implementation for an entrypoint interface that follows the default entrypoint signature
7
49
  * for an account, which accepts an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
@@ -12,7 +54,7 @@ export declare class DefaultAccountEntrypoint implements EntrypointInterface {
12
54
  private chainId;
13
55
  private version;
14
56
  constructor(address: AztecAddress, auth: AuthWitnessProvider, chainId?: number, version?: number);
15
- createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
57
+ createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, options: DefaultAccountEntrypointOptions): Promise<TxExecutionRequest>;
16
58
  private getEntrypointAbi;
17
59
  }
18
- //# sourceMappingURL=account_entrypoint.d.ts.map
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudF9lbnRyeXBvaW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWNjb3VudF9lbnRyeXBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUVwRCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNyRCxPQUFPLEVBQTJCLGtCQUFrQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDL0UsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUl6R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;;;;;OAOG;IACH,oBAAoB,IAAI;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,EAAE,CAAC;IACb,4GAA4G;IAC5G,uBAAuB,EAAE,8BAA8B,CAAC;CACzD,CAAC;AAEF;;;GAGG;AACH,qBAAa,wBAAyB,YAAW,mBAAmB;IAEhE,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IAJjB,YACU,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,mBAAmB,EACzB,OAAO,GAAE,MAAyB,EAClC,OAAO,GAAE,MAAwB,EACvC;IAEE,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC,CA8B7B;IAED,OAAO,CAAC,gBAAgB;CA2DzB"}
@@ -1,8 +1,30 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
3
3
  import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
4
4
  import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
5
- import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encoding.js';
5
+ import { EncodedAppEntrypointCalls } from './encoding.js';
6
+ /**
7
+ * The mechanism via which an account contract will pay for a transaction in which it gets invoked.
8
+ */ export var AccountFeePaymentMethodOptions = /*#__PURE__*/ function(AccountFeePaymentMethodOptions) {
9
+ /**
10
+ * Signals that some other contract is in charge of paying the fee, nothing needs to be done.
11
+ */ AccountFeePaymentMethodOptions[AccountFeePaymentMethodOptions["EXTERNAL"] = 0] = "EXTERNAL";
12
+ /**
13
+ * Used to make the account contract publicly pay for the transaction with its own fee juice balance,
14
+ * **which it must already have prior to this transaction**.
15
+ *
16
+ * The contract will set itself as the fee payer and end the setup phase.
17
+ */ AccountFeePaymentMethodOptions[AccountFeePaymentMethodOptions["PREEXISTING_FEE_JUICE"] = 1] = "PREEXISTING_FEE_JUICE";
18
+ /**
19
+ * Used to make the account contract publicly pay for the transaction with its own fee juice balance
20
+ * **which is being claimed in the same transaction**.
21
+ *
22
+ * The contract will set itself as the fee payer but not end setup phase - this is done by the Fee Juice
23
+ * contract after enqueuing a public call, which unlike most public calls is whitelisted by the nodes
24
+ * to be executable during the setup phase.
25
+ */ AccountFeePaymentMethodOptions[AccountFeePaymentMethodOptions["FEE_JUICE_WITH_CLAIM"] = 2] = "FEE_JUICE_WITH_CLAIM";
26
+ return AccountFeePaymentMethodOptions;
27
+ }({});
6
28
  /**
7
29
  * Implementation for an entrypoint interface that follows the default entrypoint signature
8
30
  * for an account, which accepts an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
@@ -17,44 +39,36 @@ import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encodin
17
39
  this.chainId = chainId;
18
40
  this.version = version;
19
41
  }
20
- async createTxExecutionRequest(exec, fee, options) {
42
+ async createTxExecutionRequest(exec, gasSettings, options) {
21
43
  // Initial request with calls, authWitnesses and capsules
22
44
  const { calls, authWitnesses, capsules, extraHashedArgs } = exec;
23
45
  // Global tx options
24
- const { cancellable, txNonce } = options;
46
+ const { cancellable, txNonce, feePaymentMethodOptions } = options;
25
47
  // Encode the calls for the app
26
- const appEncodedCalls = await EncodedCallsForEntrypoint.fromAppExecution(calls, txNonce);
27
- // Get the execution payload for the fee, it includes the calls and potentially authWitnesses
28
- const { calls: feeCalls, authWitnesses: feeAuthwitnesses } = await fee.paymentMethod.getExecutionPayload(fee.gasSettings);
29
- // Encode the calls for the fee
30
- const feePayer = await fee.paymentMethod.getFeePayer(fee.gasSettings);
31
- const isFeePayer = feePayer.equals(this.address);
32
- const feeEncodedCalls = await EncodedCallsForEntrypoint.fromFeeCalls(feeCalls, isFeePayer);
33
- // Obtain the entrypoint hashed args, built from the app and fee encoded calls
48
+ const encodedCalls = await EncodedAppEntrypointCalls.create(calls, txNonce);
49
+ // Obtain the entrypoint hashed args, built from the app encoded calls and global options
34
50
  const abi = this.getEntrypointAbi();
35
51
  const entrypointHashedArgs = await HashedValues.fromArgs(encodeArguments(abi, [
36
- appEncodedCalls,
37
- feeEncodedCalls,
52
+ encodedCalls,
53
+ feePaymentMethodOptions,
38
54
  !!cancellable
39
55
  ]));
40
- // Generate the combined payload auth witness, by signing the hash of the combined payload
41
- const combinedPayloadAuthWitness = await this.auth.createAuthWit(await computeCombinedPayloadHash(appEncodedCalls, feeEncodedCalls));
56
+ // Generate the payload auth witness, by signing the hash of the payload
57
+ const appPayloadAuthwitness = await this.auth.createAuthWit(await encodedCalls.hash());
42
58
  // Assemble the tx request
43
59
  const txRequest = TxExecutionRequest.from({
44
60
  firstCallArgsHash: entrypointHashedArgs.hash,
45
61
  origin: this.address,
46
62
  functionSelector: await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters),
47
- txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
63
+ txContext: new TxContext(this.chainId, this.version, gasSettings),
48
64
  argsOfCalls: [
49
- ...appEncodedCalls.hashedArguments,
50
- ...feeEncodedCalls.hashedArguments,
65
+ ...encodedCalls.hashedArguments,
51
66
  entrypointHashedArgs,
52
67
  ...extraHashedArgs
53
68
  ],
54
69
  authWitnesses: [
55
70
  ...authWitnesses,
56
- ...feeAuthwitnesses,
57
- combinedPayloadAuthWitness
71
+ appPayloadAuthwitness
58
72
  ],
59
73
  capsules,
60
74
  salt: Fr.random()
@@ -66,7 +80,7 @@ import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encodin
66
80
  name: 'entrypoint',
67
81
  isInitializer: false,
68
82
  functionType: 'private',
69
- isInternal: false,
83
+ isOnlySelf: false,
70
84
  isStatic: false,
71
85
  parameters: [
72
86
  {
@@ -79,7 +93,7 @@ import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encodin
79
93
  name: 'function_calls',
80
94
  type: {
81
95
  kind: 'array',
82
- length: 4,
96
+ length: 5,
83
97
  type: {
84
98
  kind: 'struct',
85
99
  path: 'authwit::entrypoint::function_call::FunctionCall',
@@ -129,80 +143,7 @@ import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encodin
129
143
  }
130
144
  },
131
145
  {
132
- name: 'is_static',
133
- type: {
134
- kind: 'boolean'
135
- }
136
- }
137
- ]
138
- }
139
- }
140
- },
141
- {
142
- name: 'tx_nonce',
143
- type: {
144
- kind: 'field'
145
- }
146
- }
147
- ]
148
- },
149
- visibility: 'public'
150
- },
151
- {
152
- name: 'fee_payload',
153
- type: {
154
- kind: 'struct',
155
- path: 'authwit::entrypoint::fee::FeePayload',
156
- fields: [
157
- {
158
- name: 'function_calls',
159
- type: {
160
- kind: 'array',
161
- length: 2,
162
- type: {
163
- kind: 'struct',
164
- path: 'authwit::entrypoint::function_call::FunctionCall',
165
- fields: [
166
- {
167
- name: 'args_hash',
168
- type: {
169
- kind: 'field'
170
- }
171
- },
172
- {
173
- name: 'function_selector',
174
- type: {
175
- kind: 'struct',
176
- path: 'authwit::aztec::protocol_types::abis::function_selector::FunctionSelector',
177
- fields: [
178
- {
179
- name: 'inner',
180
- type: {
181
- kind: 'integer',
182
- sign: 'unsigned',
183
- width: 32
184
- }
185
- }
186
- ]
187
- }
188
- },
189
- {
190
- name: 'target_address',
191
- type: {
192
- kind: 'struct',
193
- path: 'authwit::aztec::protocol_types::address::AztecAddress',
194
- fields: [
195
- {
196
- name: 'inner',
197
- type: {
198
- kind: 'field'
199
- }
200
- }
201
- ]
202
- }
203
- },
204
- {
205
- name: 'is_public',
146
+ name: 'hide_msg_sender',
206
147
  type: {
207
148
  kind: 'boolean'
208
149
  }
@@ -222,17 +163,19 @@ import { EncodedCallsForEntrypoint, computeCombinedPayloadHash } from './encodin
222
163
  type: {
223
164
  kind: 'field'
224
165
  }
225
- },
226
- {
227
- name: 'is_fee_payer',
228
- type: {
229
- kind: 'boolean'
230
- }
231
166
  }
232
167
  ]
233
168
  },
234
169
  visibility: 'public'
235
170
  },
171
+ {
172
+ name: 'fee_payment_method',
173
+ type: {
174
+ kind: 'integer',
175
+ sign: 'unsigned',
176
+ width: 8
177
+ }
178
+ },
236
179
  {
237
180
  name: 'cancellable',
238
181
  type: {
@@ -2,4 +2,4 @@
2
2
  export declare const DEFAULT_CHAIN_ID = 31337;
3
3
  /** Default protocol version to use. */
4
4
  export declare const DEFAULT_VERSION = 1;
5
- //# sourceMappingURL=constants.d.ts.map
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLDhGQUE4RjtBQUM5RixlQUFPLE1BQU0sZ0JBQWdCLFFBQVEsQ0FBQztBQUN0Qyx1Q0FBdUM7QUFDdkMsZUFBTyxNQUFNLGVBQWUsSUFBSSxDQUFDIn0=
@@ -1,6 +1,6 @@
1
- import { TxExecutionRequest } from '@aztec/stdlib/tx';
2
- import type { EntrypointInterface, FeeOptions, TxExecutionOptions } from './interfaces.js';
3
- import type { ExecutionPayload } from './payload.js';
1
+ import type { GasSettings } from '@aztec/stdlib/gas';
2
+ import { type ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
3
+ import type { EntrypointInterface } from './interfaces.js';
4
4
  /**
5
5
  * Default implementation of the entrypoint interface. It calls a function on a contract directly
6
6
  */
@@ -8,6 +8,6 @@ export declare class DefaultEntrypoint implements EntrypointInterface {
8
8
  private chainId;
9
9
  private rollupVersion;
10
10
  constructor(chainId: number, rollupVersion: number);
11
- createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
11
+ createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings): Promise<TxExecutionRequest>;
12
12
  }
13
- //# sourceMappingURL=default_entrypoint.d.ts.map
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdF9lbnRyeXBvaW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZGVmYXVsdF9lbnRyeXBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxLQUFLLGdCQUFnQixFQUEyQixrQkFBa0IsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXRHLE9BQU8sS0FBSyxFQUFFLG1CQUFtQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFM0Q7O0dBRUc7QUFDSCxxQkFBYSxpQkFBa0IsWUFBVyxtQkFBbUI7SUFFekQsT0FBTyxDQUFDLE9BQU87SUFDZixPQUFPLENBQUMsYUFBYTtJQUZ2QixZQUNVLE9BQU8sRUFBRSxNQUFNLEVBQ2YsYUFBYSxFQUFFLE1BQU0sRUFDM0I7SUFFRSx3QkFBd0IsQ0FBQyxJQUFJLEVBQUUsZ0JBQWdCLEVBQUUsV0FBVyxFQUFFLFdBQVcsR0FBRyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0EyQjVHO0NBQ0YifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"default_entrypoint.d.ts","sourceRoot":"","sources":["../src/default_entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD;;GAEG;AACH,qBAAa,iBAAkB,YAAW,mBAAmB;IAEzD,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,aAAa;gBADb,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM;IAGzB,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,kBAAkB,CAAC;CA+B/B"}
1
+ {"version":3,"file":"default_entrypoint.d.ts","sourceRoot":"","sources":["../src/default_entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,KAAK,gBAAgB,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;GAEG;AACH,qBAAa,iBAAkB,YAAW,mBAAmB;IAEzD,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,aAAa;IAFvB,YACU,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EAC3B;IAEE,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2B5G;CACF"}
@@ -9,10 +9,7 @@ import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
9
9
  this.chainId = chainId;
10
10
  this.rollupVersion = rollupVersion;
11
11
  }
12
- async createTxExecutionRequest(exec, fee, options) {
13
- if (options.txNonce || options.cancellable !== undefined) {
14
- throw new Error('TxExecutionOptions are not supported in DefaultEntrypoint');
15
- }
12
+ async createTxExecutionRequest(exec, gasSettings) {
16
13
  // Initial request with calls, authWitnesses and capsules
17
14
  const { calls, authWitnesses, capsules, extraHashedArgs } = exec;
18
15
  if (calls.length > 1) {
@@ -27,7 +24,7 @@ import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
27
24
  throw new Error('Public entrypoints are not allowed');
28
25
  }
29
26
  // Assemble the tx request
30
- return new TxExecutionRequest(call.to, call.selector, hashedArguments[0].hash, new TxContext(this.chainId, this.rollupVersion, fee.gasSettings), [
27
+ return new TxExecutionRequest(call.to, call.selector, hashedArguments[0].hash, new TxContext(this.chainId, this.rollupVersion, gasSettings), [
31
28
  ...hashedArguments,
32
29
  ...extraHashedArgs
33
30
  ], authWitnesses, capsules);
@@ -1,7 +1,8 @@
1
1
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
2
+ import type { GasSettings } from '@aztec/stdlib/gas';
2
3
  import { TxExecutionRequest } from '@aztec/stdlib/tx';
3
- import type { EntrypointInterface, FeeOptions } from './interfaces.js';
4
- import type { ExecutionPayload } from './payload.js';
4
+ import type { ExecutionPayload } from '@aztec/stdlib/tx';
5
+ import type { EntrypointInterface } from './interfaces.js';
5
6
  /**
6
7
  * Implementation for an entrypoint interface that can execute multiple function calls in a single transaction
7
8
  */
@@ -10,7 +11,7 @@ export declare class DefaultMultiCallEntrypoint implements EntrypointInterface {
10
11
  private version;
11
12
  private address;
12
13
  constructor(chainId: number, version: number, address?: AztecAddress);
13
- createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions): Promise<TxExecutionRequest>;
14
+ createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings): Promise<TxExecutionRequest>;
14
15
  private getEntrypointAbi;
15
16
  }
16
- //# sourceMappingURL=default_multi_call_entrypoint.d.ts.map
17
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdF9tdWx0aV9jYWxsX2VudHJ5cG9pbnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWZhdWx0X211bHRpX2NhbGxfZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10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qBAAa,0BAA2B,YAAW,mBAAmB;IAElE,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;gBAFP,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,YAA0D;IAGvE,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAkCpG,OAAO,CAAC,gBAAgB;CAwDzB"}
1
+ {"version":3,"file":"default_multi_call_entrypoint.d.ts","sourceRoot":"","sources":["../src/default_multi_call_entrypoint.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D;;GAEG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IAElE,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IAHjB,YACU,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,YAA0D,EACzE;IAEE,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwB5G;IAED,OAAO,CAAC,gBAAgB;CAyDzB"}
@@ -1,8 +1,8 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import { ProtocolContractAddress } from '@aztec/protocol-contracts';
3
3
  import { FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
4
4
  import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
5
- import { EncodedCallsForEntrypoint } from './encoding.js';
5
+ import { EncodedAppEntrypointCalls } from './encoding.js';
6
6
  /**
7
7
  * Implementation for an entrypoint interface that can execute multiple function calls in a single transaction
8
8
  */ export class DefaultMultiCallEntrypoint {
@@ -14,14 +14,11 @@ import { EncodedCallsForEntrypoint } from './encoding.js';
14
14
  this.version = version;
15
15
  this.address = address;
16
16
  }
17
- async createTxExecutionRequest(exec, fee) {
17
+ async createTxExecutionRequest(exec, gasSettings) {
18
18
  // Initial request with calls, authWitnesses and capsules
19
19
  const { calls, authWitnesses, capsules, extraHashedArgs } = exec;
20
- // Get the execution payload for the fee, it includes the calls and potentially authWitnesses
21
- const { calls: feeCalls, authWitnesses: feeAuthwitnesses, extraHashedArgs: feeExtraHashedArgs } = await fee.paymentMethod.getExecutionPayload(fee.gasSettings);
22
- // Encode the calls, including the fee calls
23
- // (since this entrypoint does not distinguish between app and fee calls)
24
- const encodedCalls = await EncodedCallsForEntrypoint.fromAppExecution(calls.concat(feeCalls));
20
+ // Encode the calls for the app
21
+ const encodedCalls = await EncodedAppEntrypointCalls.create(calls);
25
22
  // Obtain the entrypoint hashed args, built from the encoded calls
26
23
  const abi = this.getEntrypointAbi();
27
24
  const entrypointHashedArgs = await HashedValues.fromArgs(encodeArguments(abi, [
@@ -32,17 +29,13 @@ import { EncodedCallsForEntrypoint } from './encoding.js';
32
29
  firstCallArgsHash: entrypointHashedArgs.hash,
33
30
  origin: this.address,
34
31
  functionSelector: await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters),
35
- txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
32
+ txContext: new TxContext(this.chainId, this.version, gasSettings),
36
33
  argsOfCalls: [
37
34
  ...encodedCalls.hashedArguments,
38
35
  entrypointHashedArgs,
39
- ...extraHashedArgs,
40
- ...feeExtraHashedArgs
41
- ],
42
- authWitnesses: [
43
- ...feeAuthwitnesses,
44
- ...authWitnesses
36
+ ...extraHashedArgs
45
37
  ],
38
+ authWitnesses,
46
39
  capsules,
47
40
  salt: Fr.random()
48
41
  });
@@ -53,7 +46,7 @@ import { EncodedCallsForEntrypoint } from './encoding.js';
53
46
  name: 'entrypoint',
54
47
  isInitializer: false,
55
48
  functionType: 'private',
56
- isInternal: false,
49
+ isOnlySelf: false,
57
50
  isStatic: false,
58
51
  parameters: [
59
52
  {
@@ -66,7 +59,7 @@ import { EncodedCallsForEntrypoint } from './encoding.js';
66
59
  name: 'function_calls',
67
60
  type: {
68
61
  kind: 'array',
69
- length: 4,
62
+ length: 5,
70
63
  type: {
71
64
  kind: 'struct',
72
65
  path: 'authwit::entrypoint::function_call::FunctionCall',
@@ -115,6 +108,12 @@ import { EncodedCallsForEntrypoint } from './encoding.js';
115
108
  kind: 'boolean'
116
109
  }
117
110
  },
111
+ {
112
+ name: 'hide_msg_sender',
113
+ type: {
114
+ kind: 'boolean'
115
+ }
116
+ },
118
117
  {
119
118
  name: 'is_static',
120
119
  type: {
@@ -1,9 +1,8 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
2
  import type { Tuple } from '@aztec/foundation/serialize';
3
3
  import { FunctionCall } from '@aztec/stdlib/abi';
4
4
  import { HashedValues } from '@aztec/stdlib/tx';
5
- declare const APP_MAX_CALLS = 4;
6
- declare const FEE_MAX_CALLS = 2;
5
+ declare const APP_MAX_CALLS = 5;
7
6
  /** Encoded function call for an Aztec entrypoint */
8
7
  export type EncodedFunctionCall = {
9
8
  /** Arguments hash for the call. */
@@ -15,6 +14,8 @@ export type EncodedFunctionCall = {
15
14
  target_address: Fr;
16
15
  /** Whether the function is public or private */
17
16
  is_public: boolean;
17
+ /** Only applicable for enqueued public function calls. Whether the msg_sender will be set to "null". */
18
+ hide_msg_sender: boolean;
18
19
  /** Whether the function can alter state */
19
20
  is_static: boolean;
20
21
  };
@@ -30,18 +31,10 @@ export type EncodedCalls = {
30
31
  * This utility class helps in creating the payload for the entrypoint by taking into
31
32
  * account how the calls are encoded and hashed.
32
33
  * */
33
- export declare abstract class EncodedCallsForEntrypoint implements EncodedCalls {
34
- /** Function calls in the expected format (Noir's convention) */
34
+ export declare class EncodedAppEntrypointCalls implements EncodedCalls {
35
35
  encodedFunctionCalls: EncodedFunctionCall[];
36
- /** The hashed args for the call, ready to be injected in the execution cache */
37
36
  hashedArguments: HashedValues[];
38
- /** The index of the generator to use for hashing */
39
37
  generatorIndex: number;
40
- /**
41
- * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
42
- * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
43
- * but higher fee. The nullifier ensures only one transaction can succeed.
44
- */
45
38
  tx_nonce: Fr;
46
39
  constructor(
47
40
  /** Function calls in the expected format (Noir's convention) */
@@ -65,7 +58,7 @@ export declare abstract class EncodedCallsForEntrypoint implements EncodedCalls
65
58
  * Serializes the payload to an array of fields
66
59
  * @returns The fields of the payload
67
60
  */
68
- abstract toFields(): Fr[];
61
+ toFields(): Fr[];
69
62
  /**
70
63
  * Hashes the payload
71
64
  * @returns The hash of the payload
@@ -73,12 +66,6 @@ export declare abstract class EncodedCallsForEntrypoint implements EncodedCalls
73
66
  hash(): Promise<Fr>;
74
67
  /** Serializes the function calls to an array of fields. */
75
68
  protected functionCallsToFields(): Fr[];
76
- /**
77
- * Encodes a set of function calls for a dapp entrypoint
78
- * @param functionCalls - The function calls to execute
79
- * @returns The encoded calls
80
- */
81
- static fromFunctionCalls(functionCalls: FunctionCall[]): Promise<EncodedAppEntrypointCalls>;
82
69
  /**
83
70
  * Encodes the functions for the app-portion of a transaction from a set of function calls and a nonce
84
71
  * @param functionCalls - The function calls to execute
@@ -86,36 +73,9 @@ export declare abstract class EncodedCallsForEntrypoint implements EncodedCalls
86
73
  * nonce can be replaced by submitting a new one with a higher fee.
87
74
  * @returns The encoded calls
88
75
  */
89
- static fromAppExecution(functionCalls: FunctionCall[] | Tuple<FunctionCall, typeof APP_MAX_CALLS>, txNonce?: Fr): Promise<EncodedAppEntrypointCalls>;
90
- /**
91
- * Creates an encoded set of functions to pay the fee for a transaction
92
- * @param functionCalls - The calls generated by the payment method
93
- * @param isFeePayer - Whether the sender should be appointed as fee payer
94
- * @returns The encoded calls
95
- */
96
- static fromFeeCalls(functionCalls: FunctionCall[] | Tuple<FunctionCall, typeof FEE_MAX_CALLS>, isFeePayer: boolean): Promise<EncodedFeeEntrypointCalls>;
76
+ static create(functionCalls: FunctionCall[] | Tuple<FunctionCall, typeof APP_MAX_CALLS>, txNonce?: Fr): Promise<EncodedAppEntrypointCalls>;
97
77
  }
98
- /** Encoded calls for app phase execution. */
99
- export declare class EncodedAppEntrypointCalls extends EncodedCallsForEntrypoint {
100
- constructor(encodedFunctionCalls: EncodedFunctionCall[], hashedArguments: HashedValues[], generatorIndex: number, txNonce: Fr);
101
- toFields(): Fr[];
102
- }
103
- /** Encoded calls for fee payment */
104
- export declare class EncodedFeeEntrypointCalls extends EncodedCallsForEntrypoint {
105
- #private;
106
- constructor(encodedFunctionCalls: EncodedFunctionCall[], hashedArguments: HashedValues[], generatorIndex: number, txNonce: Fr, isFeePayer: boolean);
107
- toFields(): Fr[];
108
- /** Whether the sender should be appointed as fee payer. */
109
- get is_fee_payer(): boolean;
110
- }
111
- /**
112
- * Computes a hash of a combined set of app and fee calls.
113
- * @param appCalls - A set of app calls.
114
- * @param feeCalls - A set of calls used to pay fees.
115
- * @returns A hash of a combined call set.
116
- */
117
- export declare function computeCombinedPayloadHash(appPayload: EncodedAppEntrypointCalls, feePayload: EncodedFeeEntrypointCalls): Promise<Fr>;
118
78
  /** Encodes FunctionCalls for execution, following Noir's convention */
119
79
  export declare function encode(calls: FunctionCall[]): Promise<EncodedCalls>;
120
80
  export {};
121
- //# sourceMappingURL=encoding.d.ts.map
81
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5jb2RpbmcuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2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