@aztec/entrypoints 5.0.0-patched.20260318 → 5.0.0-private.20260318
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.
- package/dest/account_entrypoint.d.ts +2 -2
- package/dest/account_entrypoint.d.ts.map +1 -1
- package/dest/account_entrypoint.js +5 -9
- package/dest/default_entrypoint.d.ts +2 -2
- package/dest/default_entrypoint.d.ts.map +1 -1
- package/dest/default_entrypoint.js +1 -1
- package/dest/default_multi_call_entrypoint.d.ts +2 -2
- package/dest/default_multi_call_entrypoint.d.ts.map +1 -1
- package/dest/default_multi_call_entrypoint.js +1 -1
- package/dest/interfaces.d.ts +2 -3
- package/dest/interfaces.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/account_entrypoint.ts +4 -13
- package/src/default_entrypoint.ts +1 -1
- package/src/default_multi_call_entrypoint.ts +1 -1
- package/src/interfaces.ts +1 -2
|
@@ -53,7 +53,7 @@ export declare class DefaultAccountEntrypoint implements EntrypointInterface {
|
|
|
53
53
|
private auth;
|
|
54
54
|
constructor(address: AztecAddress, auth: AuthWitnessProvider);
|
|
55
55
|
createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, chainInfo: ChainInfo, options: DefaultAccountEntrypointOptions): Promise<TxExecutionRequest>;
|
|
56
|
-
wrapExecutionPayload(exec: ExecutionPayload,
|
|
56
|
+
wrapExecutionPayload(exec: ExecutionPayload, options: DefaultAccountEntrypointOptions): Promise<ExecutionPayload>;
|
|
57
57
|
private getEntrypointAbi;
|
|
58
58
|
}
|
|
59
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
59
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudF9lbnRyeXBvaW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWNjb3VudF9lbnRyeXBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3Mi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xFQUFFLFNBQVMsRUFDcEIsT0FBTyxFQUFFLCtCQUErQixHQUN2QyxPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0FnQjdCO0lBRUssb0JBQW9CLENBQ3hCLElBQUksRUFBRSxnQkFBZ0IsRUFDdEIsT0FBTyxFQUFFLCtCQUErQixHQUN2QyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0F1QjNCO0lBZ0NELE9BQU8sQ0FBQyxnQkFBZ0I7Q0EyRHpCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account_entrypoint.d.ts","sourceRoot":"","sources":["../src/account_entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"account_entrypoint.d.ts","sourceRoot":"","sources":["../src/account_entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGjG,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3F;;GAEG;AACH,oBAAY,8BAA8B;IACxC;;OAEG;IACH,QAAQ,IAAI;IACZ;;;;;OAKG;IACH,qBAAqB,IAAI;IACzB;;;;;;;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;IAFd,YACU,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,mBAAmB,EAC/B;IAEE,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,kBAAkB,CAAC,CAgB7B;IAEK,oBAAoB,CACxB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,+BAA+B,GACvC,OAAO,CAAC,gBAAgB,CAAC,CAuB3B;IAgCD,OAAO,CAAC,gBAAgB;CA2DzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { FunctionCall, FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
|
|
3
|
-
import { computeOuterAuthWitHash } from '@aztec/stdlib/auth-witness';
|
|
4
3
|
import { ExecutionPayload, HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
5
4
|
import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
6
5
|
/**
|
|
@@ -37,7 +36,7 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
|
37
36
|
}
|
|
38
37
|
async createTxExecutionRequest(exec, gasSettings, chainInfo, options) {
|
|
39
38
|
const { authWitnesses, capsules, extraHashedArgs } = exec;
|
|
40
|
-
const callData = await this.#buildEntrypointCallData(exec,
|
|
39
|
+
const callData = await this.#buildEntrypointCallData(exec, options);
|
|
41
40
|
const entrypointHashedArgs = await HashedValues.fromArgs(callData.encodedArgs);
|
|
42
41
|
const txRequest = TxExecutionRequest.from({
|
|
43
42
|
firstCallArgsHash: entrypointHashedArgs.hash,
|
|
@@ -58,9 +57,9 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
|
58
57
|
});
|
|
59
58
|
return txRequest;
|
|
60
59
|
}
|
|
61
|
-
async wrapExecutionPayload(exec,
|
|
60
|
+
async wrapExecutionPayload(exec, options) {
|
|
62
61
|
const { authWitnesses, capsules, extraHashedArgs, feePayer } = exec;
|
|
63
|
-
const callData = await this.#buildEntrypointCallData(exec,
|
|
62
|
+
const callData = await this.#buildEntrypointCallData(exec, options);
|
|
64
63
|
// Build the entrypoint function call
|
|
65
64
|
const entrypointCall = FunctionCall.from({
|
|
66
65
|
name: callData.abi.name,
|
|
@@ -86,10 +85,9 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
|
86
85
|
* Builds the shared data needed for both creating a tx execution request and wrapping an execution payload.
|
|
87
86
|
* This includes encoding calls, building entrypoint arguments, and creating the authwitness.
|
|
88
87
|
* @param exec - The execution payload containing calls to encode
|
|
89
|
-
* @param chainInfo - Chain information (chainId and version) for replay protection
|
|
90
88
|
* @param options - Account entrypoint options including tx nonce and fee payment method
|
|
91
89
|
* @returns Encoded call data, ABI, function selector, and auth witness
|
|
92
|
-
*/ async #buildEntrypointCallData(exec,
|
|
90
|
+
*/ async #buildEntrypointCallData(exec, options) {
|
|
93
91
|
const { calls } = exec;
|
|
94
92
|
const { cancellable, txNonce, feePaymentMethodOptions } = options;
|
|
95
93
|
const encodedCalls = await EncodedAppEntrypointCalls.create(calls, txNonce);
|
|
@@ -101,9 +99,7 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
|
101
99
|
];
|
|
102
100
|
const encodedArgs = encodeArguments(abi, args);
|
|
103
101
|
const functionSelector = await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters);
|
|
104
|
-
const
|
|
105
|
-
const messageHash = await computeOuterAuthWitHash(this.address, chainInfo.chainId, chainInfo.version, payloadHash);
|
|
106
|
-
const payloadAuthWitness = await this.auth.createAuthWit(messageHash);
|
|
102
|
+
const payloadAuthWitness = await this.auth.createAuthWit(await encodedCalls.hash());
|
|
107
103
|
return {
|
|
108
104
|
encodedCalls,
|
|
109
105
|
abi,
|
|
@@ -6,6 +6,6 @@ import type { ChainInfo, EntrypointInterface } from './interfaces.js';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare class DefaultEntrypoint implements EntrypointInterface {
|
|
8
8
|
createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, chainInfo: ChainInfo): Promise<TxExecutionRequest>;
|
|
9
|
-
wrapExecutionPayload(exec: ExecutionPayload,
|
|
9
|
+
wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload>;
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdF9lbnRyeXBvaW50LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZGVmYXVsdF9lbnRyeXBvaW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxnQkFBZ0IsRUFBMkIsa0JBQWtCLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVqRyxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV0RTs7R0FFRztBQUNILHFCQUFhLGlCQUFrQixZQUFXLG1CQUFtQjtJQUNyRCx3QkFBd0IsQ0FDNUIsSUFBSSxFQUFFLGdCQUFnQixFQUN0QixXQUFXLEVBQUUsV0FBVyxFQUN4QixTQUFTLEVBQUUsU0FBUyxHQUNuQixPQUFPLENBQUMsa0JBQWtCLENBQUMsQ0EyQjdCO0lBRUssb0JBQW9CLENBQUMsSUFBSSxFQUFFLGdCQUFnQixFQUFFLFFBQVEsQ0FBQyxFQUFFLEdBQUcsR0FBRyxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FnQjVGO0NBQ0YifQ==
|
|
@@ -1 +1 @@
|
|
|
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,gBAAgB,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEjG,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtE;;GAEG;AACH,qBAAa,iBAAkB,YAAW,mBAAmB;IACrD,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;IAEK,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,
|
|
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,gBAAgB,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEjG,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtE;;GAEG;AACH,qBAAa,iBAAkB,YAAW,mBAAmB;IACrD,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,kBAAkB,CAAC,CA2B7B;IAEK,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAgB5F;CACF"}
|
|
@@ -23,7 +23,7 @@ import { ExecutionPayload, HashedValues, TxContext, TxExecutionRequest } from '@
|
|
|
23
23
|
...extraHashedArgs
|
|
24
24
|
], authWitnesses, capsules);
|
|
25
25
|
}
|
|
26
|
-
async wrapExecutionPayload(exec,
|
|
26
|
+
async wrapExecutionPayload(exec, _options) {
|
|
27
27
|
if (exec.calls.length !== 1) {
|
|
28
28
|
throw new Error(`DefaultEntrypoint can only wrap a single call, got ${exec.calls.length}`);
|
|
29
29
|
}
|
|
@@ -10,7 +10,7 @@ export declare class DefaultMultiCallEntrypoint implements EntrypointInterface {
|
|
|
10
10
|
private address;
|
|
11
11
|
constructor(address?: AztecAddress);
|
|
12
12
|
createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, chainInfo: ChainInfo): Promise<TxExecutionRequest>;
|
|
13
|
-
wrapExecutionPayload(exec: ExecutionPayload,
|
|
13
|
+
wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload>;
|
|
14
14
|
private getEntrypointAbi;
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdF9tdWx0aV9jYWxsX2VudHJ5cG9pbnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9kZWZhdWx0X211bHRpX2NhbGxfZW50cnlwb2ludC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNyRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQTJCLGtCQUFrQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFHakcsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLG1CQUFtQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFdEU7O0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i_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,EAAE,gBAAgB,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGjG,OAAO,KAAK,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtE;;GAEG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;;IACxD,OAAO,CAAC,OAAO;IAA3B,YAAoB,OAAO,GAAE,YAA0D,EAAI;IAErF,wBAAwB,CAC5B,IAAI,EAAE,gBAAgB,EACtB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,kBAAkB,CAAC,CAiB7B;IAEK,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,QAAQ,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAqB5F;IA0BD,OAAO,CAAC,gBAAgB;CAyDzB"}
|
|
@@ -30,7 +30,7 @@ import { EncodedAppEntrypointCalls } from './encoding.js';
|
|
|
30
30
|
});
|
|
31
31
|
return Promise.resolve(txRequest);
|
|
32
32
|
}
|
|
33
|
-
async wrapExecutionPayload(exec,
|
|
33
|
+
async wrapExecutionPayload(exec, _options) {
|
|
34
34
|
const { authWitnesses, capsules, extraHashedArgs } = exec;
|
|
35
35
|
const callData = await this.#buildEntrypointCallData(exec);
|
|
36
36
|
const entrypointCall = FunctionCall.from({
|
package/dest/interfaces.d.ts
CHANGED
|
@@ -47,12 +47,11 @@ export interface EntrypointInterface {
|
|
|
47
47
|
* of a single entrypoint call.
|
|
48
48
|
*
|
|
49
49
|
* @param exec - The execution payload to wrap
|
|
50
|
-
* @param chainInfo - Chain information (chainId and version) for replay protection
|
|
51
50
|
* @param options - Implementation-specific options
|
|
52
51
|
* @returns A new execution payload with a single call to this entrypoint
|
|
53
52
|
* @throws Error if the payload cannot be wrapped (e.g., exceeds call limit)
|
|
54
53
|
*/
|
|
55
|
-
wrapExecutionPayload(exec: ExecutionPayload,
|
|
54
|
+
wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload>;
|
|
56
55
|
}
|
|
57
56
|
/** Creates authorization witnesses. */
|
|
58
57
|
export interface AuthWitnessProvider {
|
|
@@ -63,4 +62,4 @@ export interface AuthWitnessProvider {
|
|
|
63
62
|
*/
|
|
64
63
|
createAuthWit(messageHash: Fr | Buffer): Promise<AuthWitness>;
|
|
65
64
|
}
|
|
66
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2ludGVyZmFjZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzlELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ3JELE9BQU8sS0FBSyxFQUFFLGdCQUFnQixFQUFFLGtCQUFrQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFFN0UsT0FBTyxFQUFFLENBQUMsRUFBRSxNQUFNLEtBQUssQ0FBQztBQUV4Qjs7O0dBR0c7QUFDSCxNQUFNLE1BQU0sU0FBUyxHQUFHO0lBQ3RCLHNCQUFzQjtJQUN0QixPQUFPLEVBQUUsRUFBRSxDQUFDO0lBQ1osaUNBQWlDO0lBQ2pDLE9BQU8sRUFBRSxFQUFFLENBQUM7Q0FDYixD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,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACxF;AAED,uCAAuC;AACvC,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,aAAa,CAAC,WAAW,EAAE,EAAE,GAAG,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC/D"}
|
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": "5.0.0-
|
|
5
|
+
"version": "5.0.0-private.20260318",
|
|
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": "5.0.0-
|
|
71
|
-
"@aztec/foundation": "5.0.0-
|
|
72
|
-
"@aztec/protocol-contracts": "5.0.0-
|
|
73
|
-
"@aztec/stdlib": "5.0.0-
|
|
70
|
+
"@aztec/constants": "5.0.0-private.20260318",
|
|
71
|
+
"@aztec/foundation": "5.0.0-private.20260318",
|
|
72
|
+
"@aztec/protocol-contracts": "5.0.0-private.20260318",
|
|
73
|
+
"@aztec/stdlib": "5.0.0-private.20260318",
|
|
74
74
|
"tslib": "^2.4.0",
|
|
75
75
|
"zod": "^3.23.8"
|
|
76
76
|
},
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
2
|
import { type FunctionAbi, FunctionCall, FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
|
|
3
|
-
import { computeOuterAuthWitHash } from '@aztec/stdlib/auth-witness';
|
|
4
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
6
5
|
import { ExecutionPayload, HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
@@ -67,7 +66,7 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
|
|
|
67
66
|
options: DefaultAccountEntrypointOptions,
|
|
68
67
|
): Promise<TxExecutionRequest> {
|
|
69
68
|
const { authWitnesses, capsules, extraHashedArgs } = exec;
|
|
70
|
-
const callData = await this.#buildEntrypointCallData(exec,
|
|
69
|
+
const callData = await this.#buildEntrypointCallData(exec, options);
|
|
71
70
|
const entrypointHashedArgs = await HashedValues.fromArgs(callData.encodedArgs);
|
|
72
71
|
const txRequest = TxExecutionRequest.from({
|
|
73
72
|
firstCallArgsHash: entrypointHashedArgs.hash,
|
|
@@ -85,11 +84,10 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
|
|
|
85
84
|
|
|
86
85
|
async wrapExecutionPayload(
|
|
87
86
|
exec: ExecutionPayload,
|
|
88
|
-
chainInfo: ChainInfo,
|
|
89
87
|
options: DefaultAccountEntrypointOptions,
|
|
90
88
|
): Promise<ExecutionPayload> {
|
|
91
89
|
const { authWitnesses, capsules, extraHashedArgs, feePayer } = exec;
|
|
92
|
-
const callData = await this.#buildEntrypointCallData(exec,
|
|
90
|
+
const callData = await this.#buildEntrypointCallData(exec, options);
|
|
93
91
|
|
|
94
92
|
// Build the entrypoint function call
|
|
95
93
|
const entrypointCall = FunctionCall.from({
|
|
@@ -116,15 +114,10 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
|
|
|
116
114
|
* Builds the shared data needed for both creating a tx execution request and wrapping an execution payload.
|
|
117
115
|
* This includes encoding calls, building entrypoint arguments, and creating the authwitness.
|
|
118
116
|
* @param exec - The execution payload containing calls to encode
|
|
119
|
-
* @param chainInfo - Chain information (chainId and version) for replay protection
|
|
120
117
|
* @param options - Account entrypoint options including tx nonce and fee payment method
|
|
121
118
|
* @returns Encoded call data, ABI, function selector, and auth witness
|
|
122
119
|
*/
|
|
123
|
-
async #buildEntrypointCallData(
|
|
124
|
-
exec: ExecutionPayload,
|
|
125
|
-
chainInfo: ChainInfo,
|
|
126
|
-
options: DefaultAccountEntrypointOptions,
|
|
127
|
-
) {
|
|
120
|
+
async #buildEntrypointCallData(exec: ExecutionPayload, options: DefaultAccountEntrypointOptions) {
|
|
128
121
|
const { calls } = exec;
|
|
129
122
|
const { cancellable, txNonce, feePaymentMethodOptions } = options;
|
|
130
123
|
|
|
@@ -136,9 +129,7 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
|
|
|
136
129
|
|
|
137
130
|
const functionSelector = await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters);
|
|
138
131
|
|
|
139
|
-
const
|
|
140
|
-
const messageHash = await computeOuterAuthWitHash(this.address, chainInfo.chainId, chainInfo.version, payloadHash);
|
|
141
|
-
const payloadAuthWitness = await this.auth.createAuthWit(messageHash);
|
|
132
|
+
const payloadAuthWitness = await this.auth.createAuthWit(await encodedCalls.hash());
|
|
142
133
|
|
|
143
134
|
return {
|
|
144
135
|
encodedCalls,
|
|
@@ -41,7 +41,7 @@ export class DefaultEntrypoint implements EntrypointInterface {
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
async wrapExecutionPayload(exec: ExecutionPayload,
|
|
44
|
+
async wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload> {
|
|
45
45
|
if (exec.calls.length !== 1) {
|
|
46
46
|
throw new Error(`DefaultEntrypoint can only wrap a single call, got ${exec.calls.length}`);
|
|
47
47
|
}
|
|
@@ -37,7 +37,7 @@ export class DefaultMultiCallEntrypoint implements EntrypointInterface {
|
|
|
37
37
|
return Promise.resolve(txRequest);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async wrapExecutionPayload(exec: ExecutionPayload,
|
|
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
43
|
const entrypointCall = FunctionCall.from({
|
package/src/interfaces.ts
CHANGED
|
@@ -51,12 +51,11 @@ export interface EntrypointInterface {
|
|
|
51
51
|
* of a single entrypoint call.
|
|
52
52
|
*
|
|
53
53
|
* @param exec - The execution payload to wrap
|
|
54
|
-
* @param chainInfo - Chain information (chainId and version) for replay protection
|
|
55
54
|
* @param options - Implementation-specific options
|
|
56
55
|
* @returns A new execution payload with a single call to this entrypoint
|
|
57
56
|
* @throws Error if the payload cannot be wrapped (e.g., exceeds call limit)
|
|
58
57
|
*/
|
|
59
|
-
wrapExecutionPayload(exec: ExecutionPayload,
|
|
58
|
+
wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload>;
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
/** Creates authorization witnesses. */
|