@aztec/entrypoints 0.78.1 → 0.79.0

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.
@@ -17,7 +17,7 @@ import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
17
17
  this.version = version;
18
18
  }
19
19
  async createTxExecutionRequest(exec) {
20
- const { calls, fee, nonce, cancellable, capsules = [] } = exec;
20
+ const { calls, fee, nonce, cancellable, authWitnesses = [], capsules = [] } = exec;
21
21
  const appPayload = await EntrypointPayload.fromAppExecution(calls, nonce);
22
22
  const feePayload = await EntrypointPayload.fromFeeOptions(this.address, fee);
23
23
  const abi = this.getEntrypointAbi();
@@ -38,6 +38,7 @@ import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
38
38
  entrypointHashedArgs
39
39
  ],
40
40
  authWitnesses: [
41
+ ...authWitnesses,
41
42
  combinedPayloadAuthWitness
42
43
  ],
43
44
  capsules
@@ -20,7 +20,7 @@ import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
20
20
  this.version = version;
21
21
  }
22
22
  async createTxExecutionRequest(exec) {
23
- const { calls, fee, capsules = [] } = exec;
23
+ const { calls, fee, authWitnesses = [], capsules = [] } = exec;
24
24
  if (calls.length !== 1) {
25
25
  throw new Error(`Expected exactly 1 function call, got ${calls.length}`);
26
26
  }
@@ -55,6 +55,7 @@ import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
55
55
  entrypointHashedArgs
56
56
  ],
57
57
  authWitnesses: [
58
+ ...authWitnesses,
58
59
  authWitness
59
60
  ],
60
61
  capsules
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.78.1",
5
+ "version": "0.79.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  "./dapp": "./dest/dapp_entrypoint.js",
@@ -61,10 +61,10 @@
61
61
  ]
62
62
  },
63
63
  "dependencies": {
64
- "@aztec/aztec.js": "0.78.1",
65
- "@aztec/foundation": "0.78.1",
66
- "@aztec/protocol-contracts": "0.78.1",
67
- "@aztec/stdlib": "0.78.1",
64
+ "@aztec/aztec.js": "0.79.0",
65
+ "@aztec/foundation": "0.79.0",
66
+ "@aztec/protocol-contracts": "0.79.0",
67
+ "@aztec/stdlib": "0.79.0",
68
68
  "tslib": "^2.4.0"
69
69
  },
70
70
  "devDependencies": {
@@ -24,7 +24,7 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
24
24
  ) {}
25
25
 
26
26
  async createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest> {
27
- const { calls, fee, nonce, cancellable, capsules = [] } = exec;
27
+ const { calls, fee, nonce, cancellable, authWitnesses = [], capsules = [] } = exec;
28
28
  const appPayload = await EntrypointPayload.fromAppExecution(calls, nonce);
29
29
  const feePayload = await EntrypointPayload.fromFeeOptions(this.address, fee);
30
30
 
@@ -43,7 +43,7 @@ export class DefaultAccountEntrypoint implements EntrypointInterface {
43
43
  functionSelector: await FunctionSelector.fromNameAndParameters(abi.name, abi.parameters),
44
44
  txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
45
45
  argsOfCalls: [...appPayload.hashedArguments, ...feePayload.hashedArguments, entrypointHashedArgs],
46
- authWitnesses: [combinedPayloadAuthWitness],
46
+ authWitnesses: [...authWitnesses, combinedPayloadAuthWitness],
47
47
  capsules,
48
48
  });
49
49
 
@@ -21,7 +21,7 @@ export class DefaultDappEntrypoint implements EntrypointInterface {
21
21
  ) {}
22
22
 
23
23
  async createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest> {
24
- const { calls, fee, capsules = [] } = exec;
24
+ const { calls, fee, authWitnesses = [], capsules = [] } = exec;
25
25
  if (calls.length !== 1) {
26
26
  throw new Error(`Expected exactly 1 function call, got ${calls.length}`);
27
27
  }
@@ -50,7 +50,7 @@ export class DefaultDappEntrypoint implements EntrypointInterface {
50
50
  functionSelector,
51
51
  txContext: new TxContext(this.chainId, this.version, fee.gasSettings),
52
52
  argsOfCalls: [...payload.hashedArguments, entrypointHashedArgs],
53
- authWitnesses: [authWitness],
53
+ authWitnesses: [...authWitnesses, authWitness],
54
54
  capsules,
55
55
  });
56
56