@aztec/aztec.js 0.78.1 → 0.80.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.
Files changed (162) hide show
  1. package/dest/account_manager/deploy_account_method.d.ts +2 -2
  2. package/dest/account_manager/deploy_account_method.d.ts.map +1 -1
  3. package/dest/account_manager/deploy_account_method.js +14 -21
  4. package/dest/account_manager/index.d.ts +2 -3
  5. package/dest/account_manager/index.d.ts.map +1 -1
  6. package/dest/account_manager/index.js +1 -1
  7. package/dest/api/abi.d.ts +1 -1
  8. package/dest/api/abi.d.ts.map +1 -1
  9. package/dest/api/abi.js +1 -1
  10. package/dest/api/account.d.ts +1 -1
  11. package/dest/api/account.d.ts.map +1 -1
  12. package/dest/{contract/index.d.ts → api/contract.d.ts} +9 -8
  13. package/dest/api/contract.d.ts.map +1 -0
  14. package/dest/{contract/index.js → api/contract.js} +8 -7
  15. package/dest/api/deployment.d.ts +1 -0
  16. package/dest/api/deployment.d.ts.map +1 -1
  17. package/dest/api/deployment.js +1 -0
  18. package/dest/api/ethereum.d.ts +3 -0
  19. package/dest/api/ethereum.d.ts.map +1 -0
  20. package/dest/api/ethereum.js +2 -0
  21. package/dest/api/{interfaces/pxe.d.ts → interfaces.d.ts} +1 -1
  22. package/dest/api/interfaces.d.ts.map +1 -0
  23. package/dest/api/rpc.d.ts +3 -0
  24. package/dest/api/rpc.d.ts.map +1 -0
  25. package/dest/api/rpc.js +2 -0
  26. package/dest/api/testing.d.ts +6 -0
  27. package/dest/api/testing.d.ts.map +1 -0
  28. package/dest/api/testing.js +5 -0
  29. package/dest/api/utils.d.ts +8 -0
  30. package/dest/api/utils.d.ts.map +1 -0
  31. package/dest/api/utils.js +6 -0
  32. package/dest/api/wallet.d.ts +1 -1
  33. package/dest/api/wallet.d.ts.map +1 -1
  34. package/dest/api/wallet.js +1 -1
  35. package/dest/contract/base_contract_interaction.d.ts +41 -3
  36. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  37. package/dest/contract/base_contract_interaction.js +39 -1
  38. package/dest/contract/batch_call.d.ts +25 -6
  39. package/dest/contract/batch_call.d.ts.map +1 -1
  40. package/dest/contract/batch_call.js +62 -25
  41. package/dest/contract/checker.d.ts +1 -1
  42. package/dest/contract/checker.d.ts.map +1 -1
  43. package/dest/contract/checker.js +2 -2
  44. package/dest/contract/contract.d.ts +1 -1
  45. package/dest/contract/contract.d.ts.map +1 -1
  46. package/dest/contract/contract_base.d.ts +1 -1
  47. package/dest/contract/contract_base.d.ts.map +1 -1
  48. package/dest/contract/contract_base.js +2 -2
  49. package/dest/contract/contract_function_interaction.d.ts +8 -6
  50. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  51. package/dest/contract/contract_function_interaction.js +33 -25
  52. package/dest/contract/deploy_method.d.ts +6 -5
  53. package/dest/contract/deploy_method.d.ts.map +1 -1
  54. package/dest/contract/deploy_method.js +26 -50
  55. package/dest/contract/deploy_proven_tx.d.ts +1 -1
  56. package/dest/contract/deploy_proven_tx.d.ts.map +1 -1
  57. package/dest/contract/deploy_sent_tx.d.ts +1 -1
  58. package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
  59. package/dest/contract/protocol_contracts.d.ts +1 -1
  60. package/dest/contract/protocol_contracts.d.ts.map +1 -1
  61. package/dest/contract/proven_tx.d.ts +1 -1
  62. package/dest/contract/proven_tx.d.ts.map +1 -1
  63. package/dest/contract/unsafe_contract.d.ts +1 -1
  64. package/dest/contract/unsafe_contract.d.ts.map +1 -1
  65. package/dest/entrypoint/entrypoint.d.ts +4 -0
  66. package/dest/entrypoint/entrypoint.d.ts.map +1 -1
  67. package/dest/entrypoint/entrypoint.js +16 -0
  68. package/dest/ethereum/l1_contracts.d.ts.map +1 -0
  69. package/dest/{api/ethereum → ethereum}/l1_contracts.js +1 -1
  70. package/dest/{api/ethereum → ethereum}/portal_manager.d.ts +1 -1
  71. package/dest/ethereum/portal_manager.d.ts.map +1 -0
  72. package/dest/{api/ethereum → ethereum}/portal_manager.js +4 -1
  73. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +1 -1
  74. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  75. package/dest/fee/public_fee_payment_method.js +1 -1
  76. package/dest/index.d.ts +7 -13
  77. package/dest/index.d.ts.map +1 -1
  78. package/dest/index.js +8 -14
  79. package/dest/test/anvil_test_watcher.d.ts.map +1 -0
  80. package/dest/{api/ethereum → test}/anvil_test_watcher.js +2 -2
  81. package/dest/{utils/aztec_cheatcodes.d.ts → test/aztec_cheat_codes.d.ts} +1 -1
  82. package/dest/test/aztec_cheat_codes.d.ts.map +1 -0
  83. package/dest/{api → test}/cheat_codes.d.ts +2 -2
  84. package/dest/test/cheat_codes.d.ts.map +1 -0
  85. package/dest/{api → test}/cheat_codes.js +2 -2
  86. package/dest/{api/ethereum/cheat_codes.d.ts → test/rollup_cheat_codes.d.ts} +2 -3
  87. package/dest/test/rollup_cheat_codes.d.ts.map +1 -0
  88. package/dest/{api/ethereum/cheat_codes.js → test/rollup_cheat_codes.js} +2 -4
  89. package/dest/utils/authwit.d.ts.map +1 -1
  90. package/dest/utils/authwit.js +1 -1
  91. package/dest/utils/fee_juice.d.ts +1 -1
  92. package/dest/utils/fee_juice.d.ts.map +1 -1
  93. package/dest/wallet/account_wallet.js +1 -1
  94. package/package.json +14 -13
  95. package/src/account_manager/deploy_account_method.ts +12 -31
  96. package/src/account_manager/index.ts +1 -1
  97. package/src/api/abi.ts +15 -0
  98. package/src/api/account.ts +1 -1
  99. package/src/{contract/index.ts → api/contract.ts} +21 -7
  100. package/src/api/deployment.ts +1 -0
  101. package/src/api/ethereum.ts +11 -0
  102. package/src/api/rpc.ts +2 -0
  103. package/src/api/testing.ts +5 -0
  104. package/src/{utils/index.ts → api/utils.ts} +7 -7
  105. package/src/api/wallet.ts +1 -7
  106. package/src/contract/base_contract_interaction.ts +60 -3
  107. package/src/contract/batch_call.ts +63 -21
  108. package/src/contract/checker.ts +8 -3
  109. package/src/contract/contract.ts +1 -1
  110. package/src/contract/contract_base.ts +4 -3
  111. package/src/contract/contract_function_interaction.ts +35 -25
  112. package/src/contract/deploy_method.ts +23 -37
  113. package/src/contract/deploy_proven_tx.ts +1 -1
  114. package/src/contract/deploy_sent_tx.ts +1 -1
  115. package/src/contract/protocol_contracts.ts +1 -1
  116. package/src/contract/proven_tx.ts +1 -1
  117. package/src/contract/unsafe_contract.ts +1 -1
  118. package/src/entrypoint/entrypoint.ts +21 -0
  119. package/src/{api/ethereum → ethereum}/l1_contracts.ts +1 -1
  120. package/src/{api/ethereum → ethereum}/portal_manager.ts +4 -1
  121. package/src/fee/fee_juice_payment_method_with_claim.ts +1 -1
  122. package/src/fee/public_fee_payment_method.ts +1 -1
  123. package/src/index.ts +7 -27
  124. package/src/{api/ethereum → test}/anvil_test_watcher.ts +2 -2
  125. package/src/{api → test}/cheat_codes.ts +2 -2
  126. package/src/{api/ethereum/cheat_codes.ts → test/rollup_cheat_codes.ts} +2 -4
  127. package/src/utils/authwit.ts +2 -1
  128. package/src/utils/fee_juice.ts +1 -2
  129. package/src/wallet/account_wallet.ts +1 -1
  130. package/dest/api/cheat_codes.d.ts.map +0 -1
  131. package/dest/api/ethereum/anvil_test_watcher.d.ts.map +0 -1
  132. package/dest/api/ethereum/chain_monitor.d.ts +0 -25
  133. package/dest/api/ethereum/chain_monitor.d.ts.map +0 -1
  134. package/dest/api/ethereum/chain_monitor.js +0 -74
  135. package/dest/api/ethereum/cheat_codes.d.ts.map +0 -1
  136. package/dest/api/ethereum/index.d.ts +0 -7
  137. package/dest/api/ethereum/index.d.ts.map +0 -1
  138. package/dest/api/ethereum/index.js +0 -6
  139. package/dest/api/ethereum/l1_contracts.d.ts.map +0 -1
  140. package/dest/api/ethereum/portal_manager.d.ts.map +0 -1
  141. package/dest/api/interfaces/pxe.d.ts.map +0 -1
  142. package/dest/contract/index.d.ts.map +0 -1
  143. package/dest/deployment/index.d.ts +0 -2
  144. package/dest/deployment/index.d.ts.map +0 -1
  145. package/dest/deployment/index.js +0 -1
  146. package/dest/rpc_clients/index.d.ts +0 -3
  147. package/dest/rpc_clients/index.d.ts.map +0 -1
  148. package/dest/rpc_clients/index.js +0 -2
  149. package/dest/utils/aztec_cheatcodes.d.ts.map +0 -1
  150. package/dest/utils/index.d.ts +0 -8
  151. package/dest/utils/index.d.ts.map +0 -1
  152. package/dest/utils/index.js +0 -6
  153. package/src/api/ethereum/chain_monitor.ts +0 -88
  154. package/src/api/ethereum/index.ts +0 -19
  155. package/src/deployment/index.ts +0 -1
  156. package/src/rpc_clients/index.ts +0 -2
  157. /package/dest/api/{interfaces/pxe.js → interfaces.js} +0 -0
  158. /package/dest/{api/ethereum → ethereum}/l1_contracts.d.ts +0 -0
  159. /package/dest/{api/ethereum → test}/anvil_test_watcher.d.ts +0 -0
  160. /package/dest/{utils/aztec_cheatcodes.js → test/aztec_cheat_codes.js} +0 -0
  161. /package/src/api/{interfaces/pxe.ts → interfaces.ts} +0 -0
  162. /package/src/{utils/aztec_cheatcodes.ts → test/aztec_cheat_codes.ts} +0 -0
@@ -2,7 +2,7 @@ import { type ContractArtifact, type FunctionArtifact } from '@aztec/stdlib/abi'
2
2
  import type { PublicKeys } from '@aztec/stdlib/keys';
3
3
  import type { AuthWitnessProvider } from '../account/interface.js';
4
4
  import type { Wallet } from '../account/wallet.js';
5
- import type { ExecutionRequestInit } from '../api/entrypoint.js';
5
+ import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
6
6
  import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js';
7
7
  /**
8
8
  * Contract interaction for deploying an account contract. Handles fee preparation and contract initialization.
@@ -10,6 +10,6 @@ import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js';
10
10
  export declare class DeployAccountMethod extends DeployMethod {
11
11
  #private;
12
12
  constructor(authWitnessProvider: AuthWitnessProvider, publicKeys: PublicKeys, wallet: Wallet, artifact: ContractArtifact, args?: any[], constructorNameOrArtifact?: string | FunctionArtifact, feePaymentNameOrArtifact?: string | FunctionArtifact);
13
- protected getInitializeFunctionCalls(options: DeployOptions): Promise<Pick<ExecutionRequestInit, 'calls' | 'authWitnesses' | 'hashedArguments'>>;
13
+ protected getInitializeFunctionCalls(options: DeployOptions): Promise<ContractFunctionInteraction[]>;
14
14
  }
15
15
  //# sourceMappingURL=deploy_account_method.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy_account_method.d.ts","sourceRoot":"","sources":["../../src/account_manager/deploy_account_method.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAItB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGhF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;;gBAKjD,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,GAAE,GAAG,EAAO,EAChB,yBAAyB,CAAC,EAAE,MAAM,GAAG,gBAAgB,EACrD,wBAAwB,CAAC,EAAE,MAAM,GAAG,gBAAgB;cAkB7B,0BAA0B,CACjD,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,eAAe,GAAG,iBAAiB,CAAC,CAAC;CAmCtF"}
1
+ {"version":3,"file":"deploy_account_method.d.ts","sourceRoot":"","sources":["../../src/account_manager/deploy_account_method.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAA6B,MAAM,mBAAmB,CAAC;AAC5G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAGhF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAY;;gBAKjD,mBAAmB,EAAE,mBAAmB,EACxC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,GAAE,GAAG,EAAO,EAChB,yBAAyB,CAAC,EAAE,MAAM,GAAG,gBAAgB,EACrD,wBAAwB,CAAC,EAAE,MAAM,GAAG,gBAAgB;cAkB7B,0BAA0B,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,2BAA2B,EAAE,CAAC;CAwBpH"}
@@ -1,5 +1,6 @@
1
- import { FunctionSelector, encodeArguments, getFunctionArtifactByName } from '@aztec/stdlib/abi';
1
+ import { getFunctionArtifactByName } from '@aztec/stdlib/abi';
2
2
  import { Contract } from '../contract/contract.js';
3
+ import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
3
4
  import { DeployMethod } from '../contract/deploy_method.js';
4
5
  import { EntrypointPayload, computeCombinedPayloadHash } from '../entrypoint/payload.js';
5
6
  /**
@@ -13,31 +14,23 @@ import { EntrypointPayload, computeCombinedPayloadHash } from '../entrypoint/pay
13
14
  this.#feePaymentArtifact = typeof feePaymentNameOrArtifact === 'string' ? getFunctionArtifactByName(artifact, feePaymentNameOrArtifact) : feePaymentNameOrArtifact;
14
15
  }
15
16
  async getInitializeFunctionCalls(options) {
16
- const exec = await super.getInitializeFunctionCalls(options);
17
+ const calls = await super.getInitializeFunctionCalls(options);
17
18
  if (options.fee && this.#feePaymentArtifact) {
18
19
  const { address } = await this.getInstance();
19
20
  const emptyAppPayload = await EntrypointPayload.fromAppExecution([]);
20
21
  const fee = await this.getDefaultFeeOptions(options.fee);
21
22
  const feePayload = await EntrypointPayload.fromFeeOptions(address, fee);
22
- exec.calls.push({
23
- name: this.#feePaymentArtifact.name,
24
- to: address,
25
- args: encodeArguments(this.#feePaymentArtifact, [
26
- emptyAppPayload,
27
- feePayload,
28
- false
29
- ]),
30
- selector: await FunctionSelector.fromNameAndParameters(this.#feePaymentArtifact.name, this.#feePaymentArtifact.parameters),
31
- type: this.#feePaymentArtifact.functionType,
32
- isStatic: this.#feePaymentArtifact.isStatic,
33
- returnTypes: this.#feePaymentArtifact.returnTypes
34
- });
35
- exec.authWitnesses ??= [];
36
- exec.hashedArguments ??= [];
37
- exec.authWitnesses.push(await this.#authWitnessProvider.createAuthWit(await computeCombinedPayloadHash(emptyAppPayload, feePayload)));
38
- exec.hashedArguments.push(...emptyAppPayload.hashedArguments);
39
- exec.hashedArguments.push(...feePayload.hashedArguments);
23
+ const args = [
24
+ emptyAppPayload,
25
+ feePayload,
26
+ false
27
+ ];
28
+ const call = new ContractFunctionInteraction(this.wallet, address, this.#feePaymentArtifact, args);
29
+ call.addAuthWitness(await this.#authWitnessProvider.createAuthWit(await computeCombinedPayloadHash(emptyAppPayload, feePayload)));
30
+ call.addHashedArguments(emptyAppPayload.hashedArguments);
31
+ call.addHashedArguments(feePayload.hashedArguments);
32
+ calls.push(call);
40
33
  }
41
- return exec;
34
+ return calls;
42
35
  }
43
36
  }
@@ -4,11 +4,10 @@ import type { PXE } from '@aztec/stdlib/interfaces/client';
4
4
  import type { AccountContract } from '../account/contract.js';
5
5
  import type { Salt, Wallet } from '../account/index.js';
6
6
  import type { AccountInterface } from '../account/interface.js';
7
+ import { Contract } from '../contract/contract.js';
7
8
  import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js';
8
- import { Contract } from '../contract/index.js';
9
9
  import { type WaitOpts } from '../contract/sent_tx.js';
10
10
  import { AccountWalletWithSecretKey } from '../wallet/index.js';
11
- import { DeployAccountMethod } from './deploy_account_method.js';
12
11
  import { DeployAccountSentTx } from './deploy_account_sent_tx.js';
13
12
  /**
14
13
  * Options to deploy an account contract.
@@ -80,7 +79,7 @@ export declare class AccountManager {
80
79
  * @param deployWallet - Wallet used for deploying the account contract.
81
80
  * @returns A DeployMethod instance that deploys this account contract.
82
81
  */
83
- getDeployMethod(deployWallet?: Wallet): Promise<DeployMethod<Contract> | DeployAccountMethod>;
82
+ getDeployMethod(deployWallet?: Wallet): Promise<DeployMethod<Contract>>;
84
83
  /**
85
84
  * Deploys the account contract that backs this account.
86
85
  * Does not register the associated class nor publicly deploy the instance by default.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/account_manager/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,KAAK,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAE3F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAoB,MAAM,oBAAoB,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MA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AE,EAAE,EAAE,eAAe,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,IAAI;IAc1F,SAAS,CAAC,aAAa;IAIvB,SAAS,CAAC,iBAAiB;IAI3B;;;OAGG;IACU,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAMpD;;;;OAIG;IACI,kBAAkB,IAAI,OAAO,CAAC,eAAe,CAAC;IAIrD;;;;OAIG;IACI,UAAU;IAIjB;;;;OAIG;IACI,WAAW,IAAI,2BAA2B;IAIjD;;;;OAIG;IACU,SAAS,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAK7D;;;;;;OAMG;IACU,QAAQ,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAW5D;;;;;;OAMG;IACU,eAAe,CAAC,YAAY,CAAC,EAAE,MAAM;IA2ClD;;;;;;;OAOG;IACI,MAAM,CAAC,IAAI,CAAC,EAAE,oBAAoB,GAAG,mBAAmB;IAgB/D;;;;;;OAMG;IACU,SAAS,CAAC,IAAI,GAAE,oBAAoB,GAAG,QAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAKpH;;OAEG;IACU,YAAY;CAG1B;AAED,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,KAAK,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -2,8 +2,8 @@ import { Fr } from '@aztec/foundation/fields';
2
2
  import { CompleteAddress } from '@aztec/stdlib/contract';
3
3
  import { getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
4
4
  import { deriveKeys } from '@aztec/stdlib/keys';
5
+ import { Contract } from '../contract/contract.js';
5
6
  import { DeployMethod } from '../contract/deploy_method.js';
6
- import { Contract } from '../contract/index.js';
7
7
  import { DefaultWaitOpts } from '../contract/sent_tx.js';
8
8
  import { DefaultMultiCallEntrypoint } from '../entrypoint/default_multi_call_entrypoint.js';
9
9
  import { AccountWalletWithSecretKey, SignerlessWallet } from '../wallet/index.js';
package/dest/api/abi.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { type ContractArtifact, type FunctionArtifact, EventSelector, FunctionSelector, loadContractArtifact, contractArtifactToBuffer, contractArtifactFromBuffer, } from '@aztec/stdlib/abi';
1
+ export { type ContractArtifact, type FunctionArtifact, type FunctionAbi, EventSelector, FunctionType, FunctionSelector, FunctionCall, NoteSelector, type ABIParameter, decodeFromAbi, encodeArguments, type AbiType, isAddressStruct, isAztecAddressStruct, isEthAddressStruct, isWrappedFieldStruct, isFunctionSelectorStruct, loadContractArtifact, loadContractArtifactForPublic, getAllFunctionAbis, contractArtifactToBuffer, contractArtifactFromBuffer, } from '@aztec/stdlib/abi';
2
2
  export { type NoirCompiledContract } from '@aztec/stdlib/noir';
3
3
  //# sourceMappingURL=abi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../../src/api/abi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"abi.d.ts","sourceRoot":"","sources":["../../src/api/abi.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,KAAK,YAAY,EACjB,aAAa,EACb,eAAe,EACf,KAAK,OAAO,EACZ,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,kBAAkB,EAClB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
package/dest/api/abi.js CHANGED
@@ -1 +1 @@
1
- export { EventSelector, FunctionSelector, loadContractArtifact, contractArtifactToBuffer, contractArtifactFromBuffer } from '@aztec/stdlib/abi';
1
+ export { EventSelector, FunctionType, FunctionSelector, FunctionCall, NoteSelector, decodeFromAbi, encodeArguments, isAddressStruct, isAztecAddressStruct, isEthAddressStruct, isWrappedFieldStruct, isFunctionSelectorStruct, loadContractArtifact, loadContractArtifactForPublic, getAllFunctionAbis, contractArtifactToBuffer, contractArtifactFromBuffer } from '@aztec/stdlib/abi';
@@ -1,3 +1,3 @@
1
1
  export { type AccountContract, type AccountInterface, type AuthWitnessProvider, type Salt, type Wallet, getAccountContractAddress, } from '../account/index.js';
2
- export { AccountManager } from '../account_manager/index.js';
2
+ export { AccountManager, type DeployAccountOptions } from '../account_manager/index.js';
3
3
  //# sourceMappingURL=account.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACT,KAAK,MAAM,EACX,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/api/account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,IAAI,EACT,KAAK,MAAM,EACX,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -35,11 +35,12 @@
35
35
  *
36
36
  * @packageDocumentation
37
37
  */
38
- export { Contract } from './contract.js';
39
- export { ContractFunctionInteraction, type ProfileResult, type SendMethodOptions, } from './contract_function_interaction.js';
40
- export { DefaultWaitOpts, SentTx, type WaitOpts } from './sent_tx.js';
41
- export { ContractBase, type ContractMethod, type ContractNotes, type ContractStorageLayout } from './contract_base.js';
42
- export { BatchCall } from './batch_call.js';
43
- export { type DeployOptions, DeployMethod } from './deploy_method.js';
44
- export { DeploySentTx } from './deploy_sent_tx.js';
45
- //# sourceMappingURL=index.d.ts.map
38
+ export { Contract } from '../contract/contract.js';
39
+ export { ContractFunctionInteraction, type ProfileResult, type SendMethodOptions, } from '../contract/contract_function_interaction.js';
40
+ export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js';
41
+ export { ContractBase, type ContractMethod, type ContractNotes, type ContractStorageLayout, } from '../contract/contract_base.js';
42
+ export { BatchCall } from '../contract/batch_call.js';
43
+ export { type DeployOptions, DeployMethod } from '../contract/deploy_method.js';
44
+ export { DeploySentTx } from '../contract/deploy_sent_tx.js';
45
+ export { type PartialAddress, type ContractClassWithId, type ContractInstanceWithAddress, getContractClassFromArtifact, getContractInstanceFromDeployParams, type NodeInfo, } from '@aztec/stdlib/contract';
46
+ //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/api/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACL,2BAA2B,EAC3B,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EACL,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,4BAA4B,EAC5B,mCAAmC,EACnC,KAAK,QAAQ,GACd,MAAM,wBAAwB,CAAC"}
@@ -34,10 +34,11 @@
34
34
  * for interacting with your contracts.
35
35
  *
36
36
  * @packageDocumentation
37
- */ export { Contract } from './contract.js';
38
- export { ContractFunctionInteraction } from './contract_function_interaction.js';
39
- export { DefaultWaitOpts, SentTx } from './sent_tx.js';
40
- export { ContractBase } from './contract_base.js';
41
- export { BatchCall } from './batch_call.js';
42
- export { DeployMethod } from './deploy_method.js';
43
- export { DeploySentTx } from './deploy_sent_tx.js';
37
+ */ export { Contract } from '../contract/contract.js';
38
+ export { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
39
+ export { DefaultWaitOpts, SentTx } from '../contract/sent_tx.js';
40
+ export { ContractBase } from '../contract/contract_base.js';
41
+ export { BatchCall } from '../contract/batch_call.js';
42
+ export { DeployMethod } from '../contract/deploy_method.js';
43
+ export { DeploySentTx } from '../contract/deploy_sent_tx.js';
44
+ export { getContractClassFromArtifact, getContractInstanceFromDeployParams } from '@aztec/stdlib/contract';
@@ -1,4 +1,5 @@
1
1
  export { registerContractClass } from '../deployment/register_class.js';
2
2
  export { broadcastPrivateFunction, broadcastUnconstrainedFunction } from '../deployment/broadcast_function.js';
3
3
  export { deployInstance } from '../deployment/deploy_instance.js';
4
+ export { ContractDeployer } from '../deployment/contract_deployer.js';
4
5
  //# sourceMappingURL=deployment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/api/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../src/api/deployment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { registerContractClass } from '../deployment/register_class.js';
2
2
  export { broadcastPrivateFunction, broadcastUnconstrainedFunction } from '../deployment/broadcast_function.js';
3
3
  export { deployInstance } from '../deployment/deploy_instance.js';
4
+ export { ContractDeployer } from '../deployment/contract_deployer.js';
@@ -0,0 +1,3 @@
1
+ export { L1FeeJuicePortalManager, L1ToL2TokenPortalManager, L1TokenManager, L1TokenPortalManager, type L2AmountClaim, type L2AmountClaimWithRecipient, type L2Claim, generateClaimSecret, } from '../ethereum/portal_manager.js';
2
+ export { getL1ContractAddresses } from '../ethereum/l1_contracts.js';
3
+ //# sourceMappingURL=ethereum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ethereum.d.ts","sourceRoot":"","sources":["../../src/api/ethereum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,OAAO,EACZ,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { L1FeeJuicePortalManager, L1ToL2TokenPortalManager, L1TokenManager, L1TokenPortalManager, generateClaimSecret } from '../ethereum/portal_manager.js';
2
+ export { getL1ContractAddresses } from '../ethereum/l1_contracts.js';
@@ -1,2 +1,2 @@
1
1
  export type { PXE } from '@aztec/stdlib/interfaces/client';
2
- //# sourceMappingURL=pxe.d.ts.map
2
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../src/api/interfaces.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { createPXEClient } from '../rpc_clients/pxe_client.js';
2
+ export { createCompatibleClient } from '../rpc_clients/node/index.js';
3
+ //# sourceMappingURL=rpc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/api/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createPXEClient } from '../rpc_clients/pxe_client.js';
2
+ export { createCompatibleClient } from '../rpc_clients/node/index.js';
@@ -0,0 +1,6 @@
1
+ export { AnvilTestWatcher } from '../test/anvil_test_watcher.js';
2
+ export { RollupCheatCodes } from '../test/rollup_cheat_codes.js';
3
+ export { AztecCheatCodes } from '../test/aztec_cheat_codes.js';
4
+ export { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
5
+ export { CheatCodes } from '../test/cheat_codes.js';
6
+ //# sourceMappingURL=testing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/api/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { AnvilTestWatcher } from '../test/anvil_test_watcher.js';
2
+ export { RollupCheatCodes } from '../test/rollup_cheat_codes.js';
3
+ export { AztecCheatCodes } from '../test/aztec_cheat_codes.js';
4
+ export { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes';
5
+ export { CheatCodes } from '../test/cheat_codes.js';
@@ -0,0 +1,8 @@
1
+ export { generatePublicKey } from '../utils/pub_key.js';
2
+ export { type AztecAddressLike, type EthAddressLike, type EventSelectorLike, type FieldLike, type FunctionSelectorLike, type U128Like, type WrappedFieldLike, } from '../utils/abi_types.js';
3
+ export { computeAuthWitMessageHash, computeInnerAuthWitHash, computeInnerAuthWitHashFromAction, type IntentAction, type IntentInnerHash, } from '../utils/authwit.js';
4
+ export { waitForPXE } from '../utils/pxe.js';
5
+ export { waitForNode, createAztecNodeClient, type AztecNode } from '../utils/node.js';
6
+ export { getFeeJuiceBalance } from '../utils/fee_juice.js';
7
+ export { readFieldCompressedString } from '../utils/field_compressed_string.js';
8
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/api/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,gBAAgB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,iCAAiC,EACjC,KAAK,YAAY,EACjB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { generatePublicKey } from '../utils/pub_key.js';
2
+ export { computeAuthWitMessageHash, computeInnerAuthWitHash, computeInnerAuthWitHashFromAction } from '../utils/authwit.js';
3
+ export { waitForPXE } from '../utils/pxe.js';
4
+ export { waitForNode, createAztecNodeClient } from '../utils/node.js';
5
+ export { getFeeJuiceBalance } from '../utils/fee_juice.js';
6
+ export { readFieldCompressedString } from '../utils/field_compressed_string.js';
@@ -1,2 +1,2 @@
1
- export { AccountWallet, AccountWalletWithSecretKey as AccountWalletWithSecretKey, SignerlessWallet, type Wallet, getWallet, } from '../wallet/index.js';
1
+ export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet, getWallet } from '../wallet/index.js';
2
2
  //# sourceMappingURL=wallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,0BAA0B,IAAI,0BAA0B,EACxD,gBAAgB,EAChB,KAAK,MAAM,EACX,SAAS,GACV,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/api/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- export { AccountWallet, AccountWalletWithSecretKey as AccountWalletWithSecretKey, SignerlessWallet, getWallet } from '../wallet/index.js';
1
+ export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet, getWallet } from '../wallet/index.js';
@@ -1,6 +1,7 @@
1
1
  import type { Fr } from '@aztec/foundation/fields';
2
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
2
3
  import { GasSettings } from '@aztec/stdlib/gas';
3
- import type { Capsule, TxExecutionRequest, TxProvingResult } from '@aztec/stdlib/tx';
4
+ import type { Capsule, HashedValues, TxExecutionRequest, TxProvingResult } from '@aztec/stdlib/tx';
4
5
  import type { Wallet } from '../account/wallet.js';
5
6
  import type { ExecutionRequestInit } from '../entrypoint/entrypoint.js';
6
7
  import type { FeeOptions, UserFeeOptions } from '../entrypoint/payload.js';
@@ -27,7 +28,9 @@ export type SendMethodOptions = {
27
28
  export declare abstract class BaseContractInteraction {
28
29
  protected wallet: Wallet;
29
30
  protected log: import("@aztec/foundation/log").Logger;
30
- private capsules;
31
+ protected authWitnesses: AuthWitness[];
32
+ protected hashedArguments: HashedValues[];
33
+ protected capsules: Capsule[];
31
34
  constructor(wallet: Wallet);
32
35
  /**
33
36
  * Create a transaction execution request ready to be simulated.
@@ -35,6 +38,13 @@ export declare abstract class BaseContractInteraction {
35
38
  * @returns A transaction execution request.
36
39
  */
37
40
  abstract create(options?: SendMethodOptions): Promise<TxExecutionRequest>;
41
+ /**
42
+ * Returns an execution request that represents this operation.
43
+ * Can be used as a building block for constructing batch requests.
44
+ * @param options - An optional object containing additional configuration for the transaction.
45
+ * @returns An execution request wrapped in promise.
46
+ */
47
+ abstract request(options?: SendMethodOptions): Promise<Omit<ExecutionRequestInit, 'fee'>>;
38
48
  /**
39
49
  * Creates a transaction execution request, simulates and proves it. Differs from .prove in
40
50
  * that its result does not include the wallet nor the composed tx object, but only the proving result.
@@ -80,6 +90,34 @@ export declare abstract class BaseContractInteraction {
80
90
  protected getFeeOptions(request: Omit<ExecutionRequestInit, 'fee'> & {
81
91
  fee?: UserFeeOptions;
82
92
  }): Promise<FeeOptions>;
93
+ /**
94
+ * Add authWitness used in this contract interaction.
95
+ * @param authWitness - authWitness used in the contract interaction.
96
+ */
97
+ addAuthWitness(authWitness: AuthWitness): void;
98
+ /**
99
+ * Add authWitness used in this contract interaction.
100
+ * @param authWitnesses - authWitnesses used in the contract interaction.
101
+ */
102
+ addAuthWitnesses(authWitnesses: AuthWitness[]): void;
103
+ /**
104
+ * Return all authWitnesses added for this interaction.
105
+ */
106
+ getAuthWitnesses(): AuthWitness[];
107
+ /**
108
+ * Add hashedArgument used in this contract interaction.
109
+ * @param hashedArgument - hashedArgument used in the contract interaction.
110
+ */
111
+ addHashedArgument(hashedArgument: HashedValues): void;
112
+ /**
113
+ * Add hashedArguments used in this contract interaction.
114
+ * @param hashedArguments - hashedArguments used in the contract interaction.
115
+ */
116
+ addHashedArguments(hashedArguments: HashedValues[]): void;
117
+ /**
118
+ * Return all hashedArguments added for this interaction.
119
+ */
120
+ getHashedArguments(): HashedValues[];
83
121
  /**
84
122
  * Add data passed to the oracle calls during this contract interaction.
85
123
  * @param capsule - Data passed to oracle calls.
@@ -91,7 +129,7 @@ export declare abstract class BaseContractInteraction {
91
129
  */
92
130
  addCapsules(capsules: Capsule[]): void;
93
131
  /**
94
- * Return all capsules added for this function interaction.
132
+ * Return all capsules added for this contract interaction.
95
133
  */
96
134
  getCapsules(): Capsule[];
97
135
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base_contract_interaction.d.ts","sourceRoot":"","sources":["../../src/contract/base_contract_interaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,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,EAAE,WAAW,EAAE;IAIpD;;OAEG;IACI,gBAAgB;IAIvB;;;OAGG;IACI,iBAAiB,CAAC,cAAc,EAAE,YAAY;IAIrD;;;OAGG;IACI,kBAAkB,CAAC,eAAe,EAAE,YAAY,EAAE;IAIzD;;OAEG;IACI,kBAAkB;IAIzB;;;OAGG;IACI,UAAU,CAAC,OAAO,EAAE,OAAO;IAIlC;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE;IAItC;;OAEG;IACI,WAAW;CAGnB"}
@@ -10,10 +10,14 @@ import { SentTx } from './sent_tx.js';
10
10
  */ export class BaseContractInteraction {
11
11
  wallet;
12
12
  log;
13
+ authWitnesses;
14
+ hashedArguments;
13
15
  capsules;
14
16
  constructor(wallet){
15
17
  this.wallet = wallet;
16
18
  this.log = createLogger('aztecjs:contract_interaction');
19
+ this.authWitnesses = [];
20
+ this.hashedArguments = [];
17
21
  this.capsules = [];
18
22
  }
19
23
  /**
@@ -130,6 +134,40 @@ import { SentTx } from './sent_tx.js';
130
134
  };
131
135
  }
132
136
  /**
137
+ * Add authWitness used in this contract interaction.
138
+ * @param authWitness - authWitness used in the contract interaction.
139
+ */ addAuthWitness(authWitness) {
140
+ this.authWitnesses.push(authWitness);
141
+ }
142
+ /**
143
+ * Add authWitness used in this contract interaction.
144
+ * @param authWitnesses - authWitnesses used in the contract interaction.
145
+ */ addAuthWitnesses(authWitnesses) {
146
+ this.authWitnesses.push(...authWitnesses);
147
+ }
148
+ /**
149
+ * Return all authWitnesses added for this interaction.
150
+ */ getAuthWitnesses() {
151
+ return this.authWitnesses;
152
+ }
153
+ /**
154
+ * Add hashedArgument used in this contract interaction.
155
+ * @param hashedArgument - hashedArgument used in the contract interaction.
156
+ */ addHashedArgument(hashedArgument) {
157
+ this.hashedArguments.push(hashedArgument);
158
+ }
159
+ /**
160
+ * Add hashedArguments used in this contract interaction.
161
+ * @param hashedArguments - hashedArguments used in the contract interaction.
162
+ */ addHashedArguments(hashedArguments) {
163
+ this.hashedArguments.push(...hashedArguments);
164
+ }
165
+ /**
166
+ * Return all hashedArguments added for this interaction.
167
+ */ getHashedArguments() {
168
+ return this.hashedArguments;
169
+ }
170
+ /**
133
171
  * Add data passed to the oracle calls during this contract interaction.
134
172
  * @param capsule - Data passed to oracle calls.
135
173
  */ addCapsule(capsule) {
@@ -142,7 +180,7 @@ import { SentTx } from './sent_tx.js';
142
180
  this.capsules.push(...capsules);
143
181
  }
144
182
  /**
145
- * Return all capsules added for this function interaction.
183
+ * Return all capsules added for this contract interaction.
146
184
  */ getCapsules() {
147
185
  return this.capsules;
148
186
  }
@@ -1,19 +1,25 @@
1
- import { type FunctionCall } from '@aztec/stdlib/abi';
2
1
  import type { TxExecutionRequest } from '@aztec/stdlib/tx';
3
- import type { Wallet } from '../account/index.js';
2
+ import type { Wallet } from '../account/wallet.js';
3
+ import { type ExecutionRequestInit } from '../entrypoint/entrypoint.js';
4
4
  import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js';
5
5
  import type { SimulateMethodOptions } from './contract_function_interaction.js';
6
6
  /** A batch of function calls to be sent as a single transaction through a wallet. */
7
7
  export declare class BatchCall extends BaseContractInteraction {
8
- protected calls: FunctionCall[];
9
- constructor(wallet: Wallet, calls: FunctionCall[]);
8
+ protected calls: BaseContractInteraction[];
9
+ constructor(wallet: Wallet, calls: BaseContractInteraction[]);
10
10
  /**
11
11
  * Create a transaction execution request that represents this batch, encoded and authenticated by the
12
12
  * user's wallet, ready to be simulated.
13
- * @param opts - An optional object containing additional configuration for the transaction.
13
+ * @param options - An optional object containing additional configuration for the transaction.
14
14
  * @returns A Promise that resolves to a transaction instance.
15
15
  */
16
- create(opts?: SendMethodOptions): Promise<TxExecutionRequest>;
16
+ create(options?: SendMethodOptions): Promise<TxExecutionRequest>;
17
+ /**
18
+ * Returns an execution request that represents this operation.
19
+ * @param options - An optional object containing additional configuration for the transaction.
20
+ * @returns An execution request wrapped in promise.
21
+ */
22
+ request(options?: SendMethodOptions): Promise<Omit<ExecutionRequestInit, 'fee'>>;
17
23
  /**
18
24
  * Simulate a transaction and get its return values
19
25
  * Differs from prove in a few important ways:
@@ -24,5 +30,18 @@ export declare class BatchCall extends BaseContractInteraction {
24
30
  * @returns The result of the transaction as returned by the contract function.
25
31
  */
26
32
  simulate(options?: SimulateMethodOptions): Promise<any>;
33
+ /**
34
+ * Return all authWitnesses added for this interaction.
35
+ */
36
+ getAuthWitnesses(): import("@aztec/stdlib/auth-witness").AuthWitness[];
37
+ /**
38
+ * Return all hashedArguments added for this interaction.
39
+ */
40
+ getHashedArguments(): import("@aztec/stdlib/tx").HashedValues[];
41
+ /**
42
+ * Return all capsules added for this interaction.
43
+ */
44
+ getCapsules(): import("@aztec/stdlib/tx").Capsule[];
45
+ private getRequests;
27
46
  }
28
47
  //# sourceMappingURL=batch_call.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"batch_call.d.ts","sourceRoot":"","sources":["../../src/contract/batch_call.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAA+B,MAAM,mBAAmB,CAAC;AACnF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,qFAAqF;AACrF,qBAAa,SAAU,SAAQ,uBAAuB;IACxB,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE;gBAA/C,MAAM,EAAE,MAAM,EAAY,KAAK,EAAE,YAAY,EAAE;IAI3D;;;;;OAKG;IACU,MAAM,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAO1E;;;;;;;;OAQG;IACU,QAAQ,CAAC,OAAO,GAAE,qBAA0B,GAA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