@aztec/entrypoints 0.0.0-test.0 → 0.0.1-commit.023c3e5

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.
@@ -0,0 +1,61 @@
1
+ import { FunctionType } from '@aztec/stdlib/abi';
2
+ import type { GasSettings } from '@aztec/stdlib/gas';
3
+ import { ExecutionPayload, HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
4
+
5
+ import type { ChainInfo, EntrypointInterface } from './interfaces.js';
6
+
7
+ /**
8
+ * Default implementation of the entrypoint interface. It calls a function on a contract directly
9
+ */
10
+ export class DefaultEntrypoint implements EntrypointInterface {
11
+ async createTxExecutionRequest(
12
+ exec: ExecutionPayload,
13
+ gasSettings: GasSettings,
14
+ chainInfo: ChainInfo,
15
+ ): Promise<TxExecutionRequest> {
16
+ // Initial request with calls, authWitnesses and capsules
17
+ const { calls, authWitnesses, capsules, extraHashedArgs } = exec;
18
+
19
+ if (calls.length > 1) {
20
+ throw new Error(`Expected a single call, got ${calls.length}`);
21
+ }
22
+
23
+ const call = calls[0];
24
+
25
+ // Hash the arguments for the function call
26
+ const hashedArguments = [await HashedValues.fromArgs(call.args)];
27
+
28
+ if (call.type !== FunctionType.PRIVATE) {
29
+ throw new Error('Public entrypoints are not allowed');
30
+ }
31
+
32
+ // Assemble the tx request
33
+ return new TxExecutionRequest(
34
+ call.to,
35
+ call.selector,
36
+ hashedArguments[0].hash,
37
+ new TxContext(chainInfo.chainId.toNumber(), chainInfo.version.toNumber(), gasSettings),
38
+ [...hashedArguments, ...extraHashedArgs],
39
+ authWitnesses,
40
+ capsules,
41
+ );
42
+ }
43
+
44
+ async wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload> {
45
+ if (exec.calls.length !== 1) {
46
+ throw new Error(`DefaultEntrypoint can only wrap a single call, got ${exec.calls.length}`);
47
+ }
48
+
49
+ const call = exec.calls[0];
50
+
51
+ const hashedArguments = await HashedValues.fromArgs(call.args);
52
+
53
+ return new ExecutionPayload(
54
+ [call],
55
+ exec.authWitnesses,
56
+ exec.capsules,
57
+ [hashedArguments, ...exec.extraHashedArgs],
58
+ exec.feePayer,
59
+ );
60
+ }
61
+ }
@@ -0,0 +1,144 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import { ProtocolContractAddress } from '@aztec/protocol-contracts';
3
+ import { type FunctionAbi, FunctionCall, FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
4
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import type { GasSettings } from '@aztec/stdlib/gas';
6
+ import { ExecutionPayload, HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
7
+
8
+ import { EncodedAppEntrypointCalls } from './encoding.js';
9
+ import type { ChainInfo, EntrypointInterface } from './interfaces.js';
10
+
11
+ /**
12
+ * Implementation for an entrypoint interface that can execute multiple function calls in a single transaction
13
+ */
14
+ export class DefaultMultiCallEntrypoint implements EntrypointInterface {
15
+ constructor(private address: AztecAddress = ProtocolContractAddress.MultiCallEntrypoint) {}
16
+
17
+ async createTxExecutionRequest(
18
+ exec: ExecutionPayload,
19
+ gasSettings: GasSettings,
20
+ chainInfo: ChainInfo,
21
+ ): Promise<TxExecutionRequest> {
22
+ const { authWitnesses, capsules, extraHashedArgs } = exec;
23
+ const callData = await this.#buildEntrypointCallData(exec);
24
+
25
+ const entrypointHashedArgs = await HashedValues.fromArgs(callData.encodedArgs);
26
+ const txRequest = TxExecutionRequest.from({
27
+ firstCallArgsHash: entrypointHashedArgs.hash,
28
+ origin: this.address,
29
+ functionSelector: callData.functionSelector,
30
+ txContext: new TxContext(chainInfo.chainId.toNumber(), chainInfo.version.toNumber(), gasSettings),
31
+ argsOfCalls: [...callData.encodedCalls.hashedArguments, entrypointHashedArgs, ...extraHashedArgs],
32
+ authWitnesses,
33
+ capsules,
34
+ salt: Fr.random(),
35
+ });
36
+
37
+ return Promise.resolve(txRequest);
38
+ }
39
+
40
+ async wrapExecutionPayload(exec: ExecutionPayload, _options?: any): Promise<ExecutionPayload> {
41
+ const { authWitnesses, capsules, extraHashedArgs } = exec;
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
+ );
53
+
54
+ return new ExecutionPayload(
55
+ [entrypointCall],
56
+ authWitnesses,
57
+ capsules,
58
+ [...callData.encodedCalls.hashedArguments, ...extraHashedArgs],
59
+ exec.feePayer,
60
+ );
61
+ }
62
+
63
+ /**
64
+ * Builds the shared data needed for both creating a tx execution request and wrapping an execution payload.
65
+ * This includes encoding calls and building entrypoint arguments.
66
+ * @param exec - The execution payload containing calls to encode
67
+ * @returns Encoded call data, ABI, encoded arguments, and function selector
68
+ */
69
+ async #buildEntrypointCallData(exec: ExecutionPayload) {
70
+ const { calls } = exec;
71
+
72
+ const encodedCalls = await EncodedAppEntrypointCalls.create(calls);
73
+
74
+ const abi = this.getEntrypointAbi();
75
+ const encodedArgs = encodeArguments(abi, [encodedCalls]);
76
+
77
+ const functionSelector = await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters);
78
+
79
+ return {
80
+ encodedCalls,
81
+ abi,
82
+ encodedArgs,
83
+ functionSelector,
84
+ };
85
+ }
86
+
87
+ private getEntrypointAbi() {
88
+ return {
89
+ name: 'entrypoint',
90
+ isInitializer: false,
91
+ functionType: 'private',
92
+ isOnlySelf: false,
93
+ isStatic: false,
94
+ parameters: [
95
+ {
96
+ name: 'app_payload',
97
+ type: {
98
+ kind: 'struct',
99
+ path: 'authwit::entrypoint::app::AppPayload',
100
+ fields: [
101
+ {
102
+ name: 'function_calls',
103
+ type: {
104
+ kind: 'array',
105
+ length: 5,
106
+ type: {
107
+ kind: 'struct',
108
+ path: 'authwit::entrypoint::function_call::FunctionCall',
109
+ fields: [
110
+ { name: 'args_hash', type: { kind: 'field' } },
111
+ {
112
+ name: 'function_selector',
113
+ type: {
114
+ kind: 'struct',
115
+ path: 'authwit::aztec::protocol_types::abis::function_selector::FunctionSelector',
116
+ fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
117
+ },
118
+ },
119
+ {
120
+ name: 'target_address',
121
+ type: {
122
+ kind: 'struct',
123
+ path: 'authwit::aztec::protocol_types::address::AztecAddress',
124
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
125
+ },
126
+ },
127
+ { name: 'is_public', type: { kind: 'boolean' } },
128
+ { name: 'hide_msg_sender', type: { kind: 'boolean' } },
129
+ { name: 'is_static', type: { kind: 'boolean' } },
130
+ ],
131
+ },
132
+ },
133
+ },
134
+ { name: 'tx_nonce', type: { kind: 'field' } },
135
+ ],
136
+ },
137
+ visibility: 'public',
138
+ },
139
+ ],
140
+ returnTypes: [],
141
+ errorTypes: {},
142
+ } as FunctionAbi;
143
+ }
144
+ }
@@ -0,0 +1,148 @@
1
+ import { GeneratorIndex } from '@aztec/constants';
2
+ import { padArrayEnd } from '@aztec/foundation/collection';
3
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
+ import { Fr } from '@aztec/foundation/curves/bn254';
5
+ import type { Tuple } from '@aztec/foundation/serialize';
6
+ import { FunctionCall, FunctionType } from '@aztec/stdlib/abi';
7
+ import { HashedValues } from '@aztec/stdlib/tx';
8
+
9
+ // These must match the values defined in:
10
+ // - noir-projects/aztec-nr/aztec/src/entrypoint/app.nr
11
+ export const APP_MAX_CALLS = 5;
12
+
13
+ /** Encoded function call for an Aztec entrypoint */
14
+ export type EncodedFunctionCall = {
15
+ /** Arguments hash for the call. */
16
+ /** This should be the calldata hash `hash([function_selector, ...args])` if `is_public` is true. */
17
+ args_hash: Fr;
18
+ /** Selector of the function to call */
19
+ function_selector: Fr;
20
+ /** Address of the contract to call */
21
+ target_address: Fr;
22
+ /** Whether the function is public or private */
23
+ is_public: boolean;
24
+ /** Only applicable for enqueued public function calls. Whether the msg_sender will be set to "null". */
25
+ hide_msg_sender: boolean;
26
+ /** Whether the function can alter state */
27
+ is_static: boolean;
28
+ };
29
+
30
+ /** Type that represents function calls ready to be sent to a circuit for execution */
31
+ export type EncodedCalls = {
32
+ /** Function calls in the expected format (Noir's convention) */
33
+ encodedFunctionCalls: EncodedFunctionCall[];
34
+ /** The hashed args for the call, ready to be injected in the execution cache */
35
+ hashedArguments: HashedValues[];
36
+ };
37
+
38
+ /**
39
+ * Entrypoints derive their arguments from the calls that they'll ultimate make.
40
+ * This utility class helps in creating the payload for the entrypoint by taking into
41
+ * account how the calls are encoded and hashed.
42
+ * */
43
+ export class EncodedAppEntrypointCalls implements EncodedCalls {
44
+ constructor(
45
+ /** Function calls in the expected format (Noir's convention) */
46
+ public encodedFunctionCalls: EncodedFunctionCall[],
47
+ /** The hashed args for the call, ready to be injected in the execution cache */
48
+ public hashedArguments: HashedValues[],
49
+ /** The index of the generator to use for hashing */
50
+ public generatorIndex: number,
51
+ /**
52
+ * A nonce to inject into the payload of the transaction. When used with cancellable=true, this nonce will be
53
+ * used to compute a nullifier that allows cancelling this transaction by submitting a new one with the same nonce
54
+ * but higher fee. The nullifier ensures only one transaction can succeed.
55
+ */
56
+ // eslint-disable-next-line camelcase
57
+ public tx_nonce: Fr,
58
+ ) {}
59
+
60
+ /* eslint-disable camelcase */
61
+ /**
62
+ * The function calls to execute. This uses snake_case naming so that it is compatible with Noir encoding
63
+ * @internal
64
+ */
65
+ get function_calls() {
66
+ return this.encodedFunctionCalls;
67
+ }
68
+ /* eslint-enable camelcase */
69
+
70
+ /**
71
+ * Serializes the payload to an array of fields
72
+ * @returns The fields of the payload
73
+ */
74
+ toFields(): Fr[] {
75
+ return [...this.functionCallsToFields(), this.tx_nonce];
76
+ }
77
+
78
+ /**
79
+ * Hashes the payload
80
+ * @returns The hash of the payload
81
+ */
82
+ hash() {
83
+ return poseidon2HashWithSeparator(this.toFields(), this.generatorIndex);
84
+ }
85
+
86
+ /** Serializes the function calls to an array of fields. */
87
+ protected functionCallsToFields() {
88
+ return this.encodedFunctionCalls.flatMap(call => [
89
+ call.args_hash,
90
+ call.function_selector,
91
+ call.target_address,
92
+ new Fr(call.is_public),
93
+ new Fr(call.hide_msg_sender),
94
+ new Fr(call.is_static),
95
+ ]);
96
+ }
97
+
98
+ /**
99
+ * Encodes the functions for the app-portion of a transaction from a set of function calls and a nonce
100
+ * @param functionCalls - The function calls to execute
101
+ * @param txNonce - A nonce used to enable transaction cancellation when cancellable=true. Transactions with the same
102
+ * nonce can be replaced by submitting a new one with a higher fee.
103
+ * @returns The encoded calls
104
+ */
105
+ static async create(
106
+ functionCalls: FunctionCall[] | Tuple<FunctionCall, typeof APP_MAX_CALLS>,
107
+ txNonce = Fr.random(),
108
+ ) {
109
+ if (functionCalls.length > APP_MAX_CALLS) {
110
+ throw new Error(`Expected at most ${APP_MAX_CALLS} function calls, got ${functionCalls.length}`);
111
+ }
112
+ const paddedCalls = padArrayEnd(functionCalls, FunctionCall.empty(), APP_MAX_CALLS);
113
+ const encoded = await encode(paddedCalls);
114
+ return new EncodedAppEntrypointCalls(
115
+ encoded.encodedFunctionCalls,
116
+ encoded.hashedArguments,
117
+ GeneratorIndex.SIGNATURE_PAYLOAD,
118
+ txNonce,
119
+ );
120
+ }
121
+ }
122
+
123
+ /** Encodes FunctionCalls for execution, following Noir's convention */
124
+ export async function encode(calls: FunctionCall[]): Promise<EncodedCalls> {
125
+ const hashedArguments: HashedValues[] = [];
126
+ for (const call of calls) {
127
+ const hashed =
128
+ call.type === FunctionType.PUBLIC
129
+ ? await HashedValues.fromCalldata([call.selector.toField(), ...call.args])
130
+ : await HashedValues.fromArgs(call.args);
131
+ hashedArguments.push(hashed);
132
+ }
133
+
134
+ /* eslint-disable camelcase */
135
+ const encodedFunctionCalls: EncodedFunctionCall[] = calls.map((call, index) => ({
136
+ args_hash: hashedArguments[index].hash,
137
+ function_selector: call.selector.toField(),
138
+ target_address: call.to.toField(),
139
+ is_public: call.type == FunctionType.PUBLIC,
140
+ hide_msg_sender: call.hideMsgSender,
141
+ is_static: call.isStatic,
142
+ }));
143
+
144
+ return {
145
+ encodedFunctionCalls,
146
+ hashedArguments,
147
+ };
148
+ }
package/src/index.ts CHANGED
@@ -7,4 +7,7 @@
7
7
  */
8
8
 
9
9
  export * from './account_entrypoint.js';
10
- export * from './dapp_entrypoint.js';
10
+ export * from './interfaces.js';
11
+ export * from './default_entrypoint.js';
12
+ export * from './encoding.js';
13
+ export * from './default_multi_call_entrypoint.js';
@@ -0,0 +1,69 @@
1
+ import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
3
+ import type { GasSettings } from '@aztec/stdlib/gas';
4
+ import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
5
+
6
+ import { z } from 'zod';
7
+
8
+ /**
9
+ * Information on the connected chain. Used by wallets when constructing transactions to protect against replay
10
+ * attacks.
11
+ */
12
+ export type ChainInfo = {
13
+ /** The L1 chain id */
14
+ chainId: Fr;
15
+ /** The version of the rollup */
16
+ version: Fr;
17
+ };
18
+
19
+ /**
20
+ * Zod schema for ChainInfo
21
+ */
22
+ export const ChainInfoSchema = z.object({
23
+ chainId: Fr.schema,
24
+ version: Fr.schema,
25
+ });
26
+
27
+ /**
28
+ * Creates transaction execution requests out of a set of function calls, a fee payment method and
29
+ * general options for the transaction
30
+ */
31
+ export interface EntrypointInterface {
32
+ /**
33
+ * Generates an execution request out of set of function calls.
34
+ * @param exec - The execution intents to be run.
35
+ * @param gasSettings - The gas settings for the transaction.
36
+ * @param chainInfo - Chain information (chainId and version) for replay protection.
37
+ * @param options - Miscellaneous tx options that enable/disable features of the entrypoint
38
+ * @returns The authenticated transaction execution request.
39
+ */
40
+ createTxExecutionRequest(
41
+ exec: ExecutionPayload,
42
+ gasSettings: GasSettings,
43
+ chainInfo: ChainInfo,
44
+ options?: any,
45
+ ): Promise<TxExecutionRequest>;
46
+
47
+ /**
48
+ * Wraps an execution payload such that it is executed *via* this entrypoint.
49
+ * This returns an ExecutionPayload with the entrypoint as the caller for the wrapped payload.
50
+ * Useful for account self-funding deployments and batching calls beyond the limit
51
+ * of a single entrypoint call.
52
+ *
53
+ * @param exec - The execution payload to wrap
54
+ * @param options - Implementation-specific options
55
+ * @returns A new execution payload with a single call to this entrypoint
56
+ * @throws Error if the payload cannot be wrapped (e.g., exceeds call limit)
57
+ */
58
+ wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload>;
59
+ }
60
+
61
+ /** Creates authorization witnesses. */
62
+ export interface AuthWitnessProvider {
63
+ /**
64
+ * Computes an authentication witness from either a message hash
65
+ * @param messageHash - The message hash to approve
66
+ * @returns The authentication witness
67
+ */
68
+ createAuthWit(messageHash: Fr | Buffer): Promise<AuthWitness>;
69
+ }
@@ -1,19 +0,0 @@
1
- import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
2
- import { type EntrypointInterface, type ExecutionRequestInit } from '@aztec/aztec.js/entrypoint';
3
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import { TxExecutionRequest } from '@aztec/stdlib/tx';
5
- /**
6
- * Implementation for an entrypoint interface that follows the default entrypoint signature
7
- * for an account, which accepts an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
8
- */
9
- export declare class DefaultDappEntrypoint implements EntrypointInterface {
10
- private userAddress;
11
- private userAuthWitnessProvider;
12
- private dappEntrypointAddress;
13
- private chainId;
14
- private version;
15
- constructor(userAddress: AztecAddress, userAuthWitnessProvider: AuthWitnessProvider, dappEntrypointAddress: AztecAddress, chainId?: number, version?: number);
16
- createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest>;
17
- private getEntrypointAbi;
18
- }
19
- //# sourceMappingURL=dapp_entrypoint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dapp_entrypoint.d.ts","sourceRoot":"","sources":["../src/dapp_entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,KAAK,mBAAmB,EAAqB,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEpH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAA2B,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI/E;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,mBAAmB;IAE7D,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,uBAAuB;IAC/B,OAAO,CAAC,qBAAqB;IAC7B,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;gBAJP,WAAW,EAAE,YAAY,EACzB,uBAAuB,EAAE,mBAAmB,EAC5C,qBAAqB,EAAE,YAAY,EACnC,OAAO,GAAE,MAAyB,EAClC,OAAO,GAAE,MAAwB;IAGrC,wBAAwB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAqCvF,OAAO,CAAC,gBAAgB;CAiEzB"}
@@ -1,125 +0,0 @@
1
- import { Fr, computeAuthWitMessageHash, computeInnerAuthWitHash } from '@aztec/aztec.js';
2
- import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
3
- import { type EntrypointInterface, EntrypointPayload, type ExecutionRequestInit } from '@aztec/aztec.js/entrypoint';
4
- import { type FunctionAbi, FunctionSelector, encodeArguments } from '@aztec/stdlib/abi';
5
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
6
- import { HashedValues, TxContext, TxExecutionRequest } from '@aztec/stdlib/tx';
7
-
8
- import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
9
-
10
- /**
11
- * Implementation for an entrypoint interface that follows the default entrypoint signature
12
- * for an account, which accepts an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
13
- */
14
- export class DefaultDappEntrypoint implements EntrypointInterface {
15
- constructor(
16
- private userAddress: AztecAddress,
17
- private userAuthWitnessProvider: AuthWitnessProvider,
18
- private dappEntrypointAddress: AztecAddress,
19
- private chainId: number = DEFAULT_CHAIN_ID,
20
- private version: number = DEFAULT_VERSION,
21
- ) {}
22
-
23
- async createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest> {
24
- const { calls, fee, capsules = [] } = exec;
25
- if (calls.length !== 1) {
26
- throw new Error(`Expected exactly 1 function call, got ${calls.length}`);
27
- }
28
-
29
- const payload = await EntrypointPayload.fromFunctionCalls(calls);
30
-
31
- const abi = this.getEntrypointAbi();
32
- const entrypointHashedArgs = await HashedValues.fromValues(encodeArguments(abi, [payload, this.userAddress]));
33
- const functionSelector = await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters);
34
- // Default msg_sender for entrypoints is now Fr.max_value rather than 0 addr (see #7190 & #7404)
35
- const innerHash = await computeInnerAuthWitHash([
36
- Fr.MAX_FIELD_VALUE,
37
- functionSelector.toField(),
38
- entrypointHashedArgs.hash,
39
- ]);
40
- const outerHash = await computeAuthWitMessageHash(
41
- { consumer: this.dappEntrypointAddress, innerHash },
42
- { chainId: new Fr(this.chainId), version: new Fr(this.version) },
43
- );
44
-
45
- const authWitness = await this.userAuthWitnessProvider.createAuthWit(outerHash);
46
-
47
- const txRequest = TxExecutionRequest.from({
48
- firstCallArgsHash: entrypointHashedArgs.hash,
49
- origin: this.dappEntrypointAddress,
50
- functionSelector,
51
- txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
52
- argsOfCalls: [...payload.hashedArguments, entrypointHashedArgs],
53
- authWitnesses: [authWitness],
54
- capsules,
55
- });
56
-
57
- return txRequest;
58
- }
59
-
60
- private getEntrypointAbi() {
61
- return {
62
- name: 'entrypoint',
63
- isInitializer: false,
64
- functionType: 'private',
65
- isInternal: false,
66
- isStatic: false,
67
- parameters: [
68
- {
69
- name: 'payload',
70
- type: {
71
- kind: 'struct',
72
- path: 'dapp_payload::DAppPayload',
73
- fields: [
74
- {
75
- name: 'function_calls',
76
- type: {
77
- kind: 'array',
78
- length: 1,
79
- type: {
80
- kind: 'struct',
81
- path: 'authwit::entrypoint::function_call::FunctionCall',
82
- fields: [
83
- { name: 'args_hash', type: { kind: 'field' } },
84
- {
85
- name: 'function_selector',
86
- type: {
87
- kind: 'struct',
88
- path: 'authwit::aztec::protocol_types::abis::function_selector::FunctionSelector',
89
- fields: [{ name: 'inner', type: { kind: 'integer', sign: 'unsigned', width: 32 } }],
90
- },
91
- },
92
- {
93
- name: 'target_address',
94
- type: {
95
- kind: 'struct',
96
- path: 'authwit::aztec::protocol_types::address::aztec_address::AztecAddress',
97
- fields: [{ name: 'inner', type: { kind: 'field' } }],
98
- },
99
- },
100
- { name: 'is_public', type: { kind: 'boolean' } },
101
- { name: 'is_static', type: { kind: 'boolean' } },
102
- ],
103
- },
104
- },
105
- },
106
- { name: 'nonce', type: { kind: 'field' } },
107
- ],
108
- },
109
- visibility: 'public',
110
- },
111
- {
112
- name: 'user_address',
113
- type: {
114
- kind: 'struct',
115
- path: 'authwit::aztec::protocol_types::address::aztec_address::AztecAddress',
116
- fields: [{ name: 'inner', type: { kind: 'field' } }],
117
- },
118
- visibility: 'public',
119
- },
120
- ],
121
- returnTypes: [],
122
- errorTypes: {},
123
- } as FunctionAbi;
124
- }
125
- }