@aztec/aztec.js 0.80.0 → 0.82.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 (185) hide show
  1. package/dest/account/{contract.d.ts → account_contract.d.ts} +11 -5
  2. package/dest/account/account_contract.d.ts.map +1 -0
  3. package/dest/account/{contract.js → account_contract.js} +5 -1
  4. package/dest/account/index.d.ts +2 -3
  5. package/dest/account/index.d.ts.map +1 -1
  6. package/dest/account/index.js +1 -2
  7. package/dest/account/interface.d.ts +1 -13
  8. package/dest/account/interface.d.ts.map +1 -1
  9. package/dest/account/interface.js +1 -0
  10. package/dest/account_manager/account_manager.d.ts +105 -0
  11. package/dest/account_manager/account_manager.d.ts.map +1 -0
  12. package/dest/account_manager/account_manager.js +165 -0
  13. package/dest/account_manager/deploy_account_method.d.ts +4 -4
  14. package/dest/account_manager/deploy_account_method.d.ts.map +1 -1
  15. package/dest/account_manager/deploy_account_method.js +28 -13
  16. package/dest/account_manager/deploy_account_sent_tx.d.ts +3 -3
  17. package/dest/account_manager/deploy_account_sent_tx.d.ts.map +1 -1
  18. package/dest/account_manager/deploy_account_sent_tx.js +2 -2
  19. package/dest/account_manager/index.d.ts +1 -104
  20. package/dest/account_manager/index.d.ts.map +1 -1
  21. package/dest/account_manager/index.js +1 -157
  22. package/dest/api/account.d.ts +2 -1
  23. package/dest/api/account.d.ts.map +1 -1
  24. package/dest/api/contract.d.ts +4 -1
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +3 -0
  27. package/dest/api/fee.d.ts +1 -1
  28. package/dest/api/fee.d.ts.map +1 -1
  29. package/dest/api/utils.d.ts +2 -1
  30. package/dest/api/utils.d.ts.map +1 -1
  31. package/dest/api/utils.js +2 -1
  32. package/dest/api/wallet.d.ts +1 -1
  33. package/dest/api/wallet.d.ts.map +1 -1
  34. package/dest/contract/base_contract_interaction.d.ts +22 -57
  35. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  36. package/dest/contract/base_contract_interaction.js +12 -67
  37. package/dest/contract/batch_call.d.ts +6 -18
  38. package/dest/contract/batch_call.d.ts.map +1 -1
  39. package/dest/contract/batch_call.js +25 -54
  40. package/dest/contract/contract.d.ts +1 -1
  41. package/dest/contract/contract.d.ts.map +1 -1
  42. package/dest/contract/contract_base.d.ts +2 -2
  43. package/dest/contract/contract_base.d.ts.map +1 -1
  44. package/dest/contract/contract_function_interaction.d.ts +38 -18
  45. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  46. package/dest/contract/contract_function_interaction.js +34 -41
  47. package/dest/contract/deploy_method.d.ts +7 -8
  48. package/dest/contract/deploy_method.d.ts.map +1 -1
  49. package/dest/contract/deploy_method.js +27 -32
  50. package/dest/contract/deploy_proven_tx.d.ts +2 -3
  51. package/dest/contract/deploy_proven_tx.d.ts.map +1 -1
  52. package/dest/contract/deploy_sent_tx.d.ts +2 -3
  53. package/dest/contract/deploy_sent_tx.d.ts.map +1 -1
  54. package/dest/contract/deploy_sent_tx.js +4 -4
  55. package/dest/contract/protocol_contracts.d.ts +1 -1
  56. package/dest/contract/protocol_contracts.d.ts.map +1 -1
  57. package/dest/contract/proven_tx.d.ts +3 -4
  58. package/dest/contract/proven_tx.d.ts.map +1 -1
  59. package/dest/contract/sent_tx.d.ts +4 -16
  60. package/dest/contract/sent_tx.d.ts.map +1 -1
  61. package/dest/contract/sent_tx.js +6 -37
  62. package/dest/contract/unsafe_contract.d.ts +1 -1
  63. package/dest/contract/unsafe_contract.d.ts.map +1 -1
  64. package/dest/contract/wait_for_proven.d.ts +17 -0
  65. package/dest/contract/wait_for_proven.d.ts.map +1 -0
  66. package/dest/contract/wait_for_proven.js +17 -0
  67. package/dest/deployment/broadcast_function.js +12 -8
  68. package/dest/deployment/contract_deployer.d.ts +1 -1
  69. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  70. package/dest/deployment/register_class.d.ts +1 -1
  71. package/dest/deployment/register_class.d.ts.map +1 -1
  72. package/dest/deployment/register_class.js +6 -11
  73. package/dest/entrypoint/default_multi_call_entrypoint.d.ts +3 -2
  74. package/dest/entrypoint/default_multi_call_entrypoint.d.ts.map +1 -1
  75. package/dest/entrypoint/default_multi_call_entrypoint.js +12 -8
  76. package/dest/ethereum/portal_manager.d.ts +20 -11
  77. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  78. package/dest/ethereum/portal_manager.js +64 -30
  79. package/dest/fee/fee_juice_payment_method.d.ts +3 -3
  80. package/dest/fee/fee_juice_payment_method.d.ts.map +1 -1
  81. package/dest/fee/fee_juice_payment_method.js +3 -2
  82. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +4 -4
  83. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  84. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -5
  85. package/dest/fee/private_fee_payment_method.d.ts +6 -6
  86. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  87. package/dest/fee/private_fee_payment_method.js +13 -12
  88. package/dest/fee/public_fee_payment_method.d.ts +7 -7
  89. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  90. package/dest/fee/public_fee_payment_method.js +10 -11
  91. package/dest/fee/utils.d.ts +13 -0
  92. package/dest/fee/utils.d.ts.map +1 -0
  93. package/dest/fee/utils.js +32 -0
  94. package/dest/index.d.ts +1 -1
  95. package/dest/index.d.ts.map +1 -1
  96. package/dest/index.js +1 -1
  97. package/dest/test/aztec_cheat_codes.d.ts +2 -2
  98. package/dest/test/aztec_cheat_codes.d.ts.map +1 -1
  99. package/dest/test/aztec_cheat_codes.js +3 -3
  100. package/dest/utils/authwit.d.ts +16 -9
  101. package/dest/utils/authwit.d.ts.map +1 -1
  102. package/dest/utils/authwit.js +26 -35
  103. package/dest/wallet/account_wallet.d.ts +6 -6
  104. package/dest/wallet/account_wallet.d.ts.map +1 -1
  105. package/dest/wallet/account_wallet.js +15 -17
  106. package/dest/wallet/base_wallet.d.ts +12 -35
  107. package/dest/wallet/base_wallet.d.ts.map +1 -1
  108. package/dest/wallet/base_wallet.js +11 -64
  109. package/dest/wallet/index.d.ts +2 -2
  110. package/dest/wallet/index.d.ts.map +1 -1
  111. package/dest/wallet/index.js +1 -1
  112. package/dest/wallet/signerless_wallet.d.ts +3 -3
  113. package/dest/wallet/signerless_wallet.d.ts.map +1 -1
  114. package/dest/wallet/signerless_wallet.js +3 -6
  115. package/dest/wallet/wallet.d.ts +11 -0
  116. package/dest/wallet/wallet.d.ts.map +1 -0
  117. package/package.json +8 -7
  118. package/src/account/{contract.ts → account_contract.ts} +17 -4
  119. package/src/account/index.ts +2 -3
  120. package/src/account/interface.ts +1 -12
  121. package/src/account_manager/account_manager.ts +235 -0
  122. package/src/account_manager/deploy_account_method.ts +35 -15
  123. package/src/account_manager/deploy_account_sent_tx.ts +4 -4
  124. package/src/account_manager/index.ts +1 -227
  125. package/src/api/account.ts +2 -8
  126. package/src/api/contract.ts +5 -5
  127. package/src/api/fee.ts +1 -1
  128. package/src/api/utils.ts +1 -1
  129. package/src/api/wallet.ts +7 -1
  130. package/src/contract/base_contract_interaction.ts +32 -88
  131. package/src/contract/batch_call.ts +40 -43
  132. package/src/contract/contract.ts +1 -1
  133. package/src/contract/contract_base.ts +1 -1
  134. package/src/contract/contract_function_interaction.ts +85 -56
  135. package/src/contract/deploy_method.ts +24 -26
  136. package/src/contract/deploy_proven_tx.ts +2 -3
  137. package/src/contract/deploy_sent_tx.ts +6 -6
  138. package/src/contract/protocol_contracts.ts +1 -1
  139. package/src/contract/proven_tx.ts +2 -3
  140. package/src/contract/sent_tx.ts +6 -47
  141. package/src/contract/unsafe_contract.ts +1 -1
  142. package/src/contract/wait_for_proven.ts +38 -0
  143. package/src/deployment/broadcast_function.ts +40 -40
  144. package/src/deployment/contract_deployer.ts +1 -1
  145. package/src/deployment/register_class.ts +9 -22
  146. package/src/entrypoint/default_multi_call_entrypoint.ts +14 -7
  147. package/src/ethereum/portal_manager.ts +73 -24
  148. package/src/fee/fee_juice_payment_method.ts +4 -5
  149. package/src/fee/fee_juice_payment_method_with_claim.ts +24 -20
  150. package/src/fee/private_fee_payment_method.ts +29 -28
  151. package/src/fee/public_fee_payment_method.ts +29 -29
  152. package/src/fee/utils.ts +39 -0
  153. package/src/index.ts +1 -1
  154. package/src/test/aztec_cheat_codes.ts +3 -3
  155. package/src/utils/authwit.ts +32 -35
  156. package/src/wallet/account_wallet.ts +18 -17
  157. package/src/wallet/base_wallet.ts +27 -88
  158. package/src/wallet/index.ts +2 -2
  159. package/src/wallet/signerless_wallet.ts +9 -8
  160. package/src/wallet/wallet.ts +34 -0
  161. package/dest/account/contract.d.ts.map +0 -1
  162. package/dest/account/wallet.d.ts +0 -11
  163. package/dest/account/wallet.d.ts.map +0 -1
  164. package/dest/api/entrypoint.d.ts +0 -2
  165. package/dest/api/entrypoint.d.ts.map +0 -1
  166. package/dest/api/entrypoint.js +0 -1
  167. package/dest/entrypoint/default_entrypoint.d.ts +0 -12
  168. package/dest/entrypoint/default_entrypoint.d.ts.map +0 -1
  169. package/dest/entrypoint/default_entrypoint.js +0 -28
  170. package/dest/entrypoint/entrypoint.d.ts +0 -39
  171. package/dest/entrypoint/entrypoint.d.ts.map +0 -1
  172. package/dest/entrypoint/entrypoint.js +0 -20
  173. package/dest/entrypoint/payload.d.ts +0 -128
  174. package/dest/entrypoint/payload.d.ts.map +0 -1
  175. package/dest/entrypoint/payload.js +0 -143
  176. package/dest/fee/fee_payment_method.d.ts +0 -22
  177. package/dest/fee/fee_payment_method.d.ts.map +0 -1
  178. package/dest/fee/fee_payment_method.js +0 -3
  179. package/src/account/wallet.ts +0 -13
  180. package/src/api/entrypoint.ts +0 -1
  181. package/src/entrypoint/default_entrypoint.ts +0 -39
  182. package/src/entrypoint/entrypoint.ts +0 -60
  183. package/src/entrypoint/payload.ts +0 -238
  184. package/src/fee/fee_payment_method.ts +0 -22
  185. /package/dest/{account → wallet}/wallet.js +0 -0
@@ -47,14 +47,21 @@ export type IntentAction = {
47
47
  * @returns The message hash for the action
48
48
  */
49
49
  export declare const computeAuthWitMessageHash: (intent: IntentInnerHash | IntentAction, metadata: IntentMetadata) => Promise<Fr>;
50
- export declare const computeInnerAuthWitHashFromAction: (caller: AztecAddress, action: FunctionCall) => Promise<Fr>;
51
50
  /**
52
- * Compute the inner hash for an authentication witness.
53
- * This is the "intent" of the message, before siloed with the consumer.
54
- * It is used as part of the `computeAuthWitMessageHash` but can also be used
55
- * in case the message is not a "call" to a function, but arbitrary data.
56
- * @param args - The arguments to hash
57
- * @returns The inner hash for the witness
58
- */
59
- export declare const computeInnerAuthWitHash: (args: Fr[]) => Promise<Fr>;
51
+ * Computes the inner authwitness hash for a function call, for it to later be combined with the metadata
52
+ * required for the outer hash and eventually the full AuthWitness.
53
+ * @param caller - Who is going to be calling the function
54
+ * @param fnCall - The function call to compute the inner hash from
55
+ * @returns The inner hash for the function call
56
+ **/
57
+ export declare const computeInnerAuthWitHashFromFunctionCall: (caller: AztecAddress, fnCall: FunctionCall) => Promise<Fr>;
58
+ /**
59
+ * Computes the inner authwitness hash for an action, that can either be a ContractFunctionInteraction
60
+ * or an isolated FunctionCall. Since the former is just a wrapper around the latter, we can just extract
61
+ * the first (and only) call from the ContractFunctionInteraction and use it to compute the inner hash.
62
+ * @param caller - Who is going to be performing the action
63
+ * @param action - The ContractFunctionInteraction or FunctionCall to compute the inner hash for
64
+ * @returns The inner hash for the action
65
+ **/
66
+ export declare const computeInnerAuthWitHashFromAction: (caller: AztecAddress, action: FunctionCall | ContractFunctionInteraction) => Promise<Fr>;
60
67
  //# sourceMappingURL=authwit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authwit.d.ts","sourceRoot":"","sources":["../../src/utils/authwit.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,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ACb,CAAC;AAEF,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG;IAC5B,qBAAqB;IACrB,QAAQ,EAAE,YAAY,CAAC;IACvB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC;CACxB,CAAC;AAEF,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GAAG;IACzB,6BAA6B;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,4BAA4B;IAC5B,MAAM,EAAE,2BAA2B,GAAG,YAAY,CAAC;CACpD,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,yBAAyB,WAAkB,eAAe,GAAG,YAAY,YAAY,cAAc,gBAiB/G,CAAC;AAGF;;;;;;IAMI;AACJ,eAAO,MAAM,uCAAuC,WAAkB,YAAY,UAAU,YAAY,gBAMvG,CAAC;AAEF;;;;;;;IAOI;AACJ,eAAO,MAAM,iCAAiC,WACpC,YAAY,UACZ,YAAY,GAAG,2BAA2B,gBAQnD,CAAC"}
@@ -1,6 +1,5 @@
1
- import { GeneratorIndex } from '@aztec/constants';
2
- import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto';
3
1
  import { Fr } from '@aztec/foundation/fields';
2
+ import { computeInnerAuthWitHash, computeOuterAuthWitHash } from '@aztec/stdlib/auth-witness';
4
3
  import { HashedValues } from '@aztec/stdlib/tx';
5
4
  import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
6
5
  // docs:start:authwit_computeAuthWitMessageHash
@@ -28,47 +27,39 @@ import { ContractFunctionInteraction } from '../contract/contract_function_inter
28
27
  const chainId = metadata.chainId;
29
28
  const version = metadata.version;
30
29
  if ('caller' in intent) {
31
- const action = intent.action instanceof ContractFunctionInteraction ? (await intent.action.request()).calls[0] : intent.action;
32
- return computeOuterAuthWitHash(action.to, chainId, version, await computeInnerAuthWitHashFromAction(intent.caller, action));
30
+ const fnCall = intent.action instanceof ContractFunctionInteraction ? (await intent.action.request()).calls[0] : intent.action;
31
+ return computeOuterAuthWitHash(fnCall.to, chainId, version, await computeInnerAuthWitHashFromFunctionCall(intent.caller, fnCall));
33
32
  } else {
34
33
  const inner = Buffer.isBuffer(intent.innerHash) ? Fr.fromBuffer(intent.innerHash) : intent.innerHash;
35
34
  return computeOuterAuthWitHash(intent.consumer, chainId, version, inner);
36
35
  }
37
36
  };
38
37
  // docs:end:authwit_computeAuthWitMessageHash
39
- export const computeInnerAuthWitHashFromAction = async (caller, action)=>computeInnerAuthWitHash([
38
+ /**
39
+ * Computes the inner authwitness hash for a function call, for it to later be combined with the metadata
40
+ * required for the outer hash and eventually the full AuthWitness.
41
+ * @param caller - Who is going to be calling the function
42
+ * @param fnCall - The function call to compute the inner hash from
43
+ * @returns The inner hash for the function call
44
+ **/ export const computeInnerAuthWitHashFromFunctionCall = async (caller, fnCall)=>{
45
+ return computeInnerAuthWitHash([
40
46
  caller.toField(),
41
- action.selector.toField(),
42
- (await HashedValues.fromValues(action.args)).hash
47
+ fnCall.selector.toField(),
48
+ (await HashedValues.fromValues(fnCall.args)).hash
43
49
  ]);
44
- /**
45
- * Compute the inner hash for an authentication witness.
46
- * This is the "intent" of the message, before siloed with the consumer.
47
- * It is used as part of the `computeAuthWitMessageHash` but can also be used
48
- * in case the message is not a "call" to a function, but arbitrary data.
49
- * @param args - The arguments to hash
50
- * @returns The inner hash for the witness
51
- */ export const computeInnerAuthWitHash = (args)=>{
52
- return poseidon2HashWithSeparator(args, GeneratorIndex.AUTHWIT_INNER);
53
50
  };
54
51
  /**
55
- * Compute the outer hash for an authentication witness.
56
- * This is the value siloed with its "consumer" and what the `on_behalf_of`
57
- * should be signing.
58
- * The consumer is who will be consuming the message, for token approvals it
59
- * is the token contract itself (because the token makes the call to check the approval).
60
- * It is used as part of the `computeAuthWitMessageHash` but can also be used
61
- * in case the message is not a "call" to a function, but arbitrary data.
62
- * @param consumer - The address that can "consume" the authwit
63
- * @param chainId - The chain id that can "consume" the authwit
64
- * @param version - The version that can "consume" the authwit
65
- * @param innerHash - The inner hash for the witness
66
- * @returns The outer hash for the witness
67
- */ const computeOuterAuthWitHash = (consumer, chainId, version, innerHash)=>{
68
- return poseidon2HashWithSeparator([
69
- consumer.toField(),
70
- chainId,
71
- version,
72
- innerHash
73
- ], GeneratorIndex.AUTHWIT_OUTER);
52
+ * Computes the inner authwitness hash for an action, that can either be a ContractFunctionInteraction
53
+ * or an isolated FunctionCall. Since the former is just a wrapper around the latter, we can just extract
54
+ * the first (and only) call from the ContractFunctionInteraction and use it to compute the inner hash.
55
+ * @param caller - Who is going to be performing the action
56
+ * @param action - The ContractFunctionInteraction or FunctionCall to compute the inner hash for
57
+ * @returns The inner hash for the action
58
+ **/ export const computeInnerAuthWitHashFromAction = async (caller, action)=>{
59
+ action = action instanceof ContractFunctionInteraction ? (await action.request()).calls[0] : action;
60
+ return computeInnerAuthWitHash([
61
+ caller.toField(),
62
+ action.selector.toField(),
63
+ (await HashedValues.fromValues(action.args)).hash
64
+ ]);
74
65
  };
@@ -1,13 +1,14 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
+ import type { FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
4
+ import type { ExecutionPayload } from '@aztec/entrypoints/payload';
3
5
  import { Fr } from '@aztec/foundation/fields';
4
- import type { AuthWitness } from '@aztec/stdlib/auth-witness';
6
+ import { AuthWitness } from '@aztec/stdlib/auth-witness';
5
7
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
6
8
  import type { PXE } from '@aztec/stdlib/interfaces/client';
7
9
  import type { TxExecutionRequest } from '@aztec/stdlib/tx';
8
10
  import type { AccountInterface } from '../account/interface.js';
9
11
  import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
10
- import type { ExecutionRequestInit } from '../entrypoint/entrypoint.js';
11
12
  import { type IntentAction, type IntentInnerHash } from '../utils/authwit.js';
12
13
  import { BaseWallet } from './base_wallet.js';
13
14
  /**
@@ -16,10 +17,9 @@ import { BaseWallet } from './base_wallet.js';
16
17
  export declare class AccountWallet extends BaseWallet {
17
18
  protected account: AccountInterface;
18
19
  constructor(pxe: PXE, account: AccountInterface);
19
- createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest>;
20
+ createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
20
21
  getChainId(): Fr;
21
22
  getVersion(): Fr;
22
- isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
23
23
  /**
24
24
  * Computes an authentication witness from either a message hash or an intent.
25
25
  *
@@ -56,10 +56,10 @@ export declare class AccountWallet extends BaseWallet {
56
56
  *
57
57
  * @param onBehalfOf - The address of the "approver"
58
58
  * @param intent - The consumer and inner hash or the caller and action to lookup
59
- *
59
+ * @param witness - The computed authentication witness to check
60
60
  * @returns - A struct containing the validity of the authwit in private and public contexts.
61
61
  */
62
- lookupValidity(onBehalfOf: AztecAddress, intent: IntentInnerHash | IntentAction): Promise<{
62
+ lookupValidity(onBehalfOf: AztecAddress, intent: IntentInnerHash | IntentAction, witness: AuthWitness): Promise<{
63
63
  /** boolean flag indicating if the authwit is valid in private context */
64
64
  isValidInPrivate: boolean;
65
65
  /** boolean flag indicating if the authwit is valid in public context */
@@ -1 +1 @@
1
- {"version":3,"file":"account_wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/account_wallet.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,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OAQG;IACU,gBAAgB,CAC3B,mBAAmB,EAAE,EAAE,GAAG,MAAM,GAAG,eAAe,GAAG,YAAY,EACjE,UAAU,EAAE,OAAO,GAClB,OAAO,CAAC,2BAA2B,CAAC;YAgBzB,uBAAuB;IAmBrC;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAMtB;;;;;;;;;OASG;IACG,cAAc,CAClB,UAAU,EAAE,YAAY,EACxB,MAAM,EAAE,eAAe,GAAG,YAAY,EACtC,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC;QACT,yEAAyE;QACzE,gBAAgB,EAAE,OAAO,CAAC;QAC1B,wEAAwE;QACxE,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IA2BF,+EAA+E;IACxE,kBAAkB;IAIzB,sEAAsE;IACtD,UAAU;IAI1B,OAAO,CAAC,mBAAmB;IAwB3B,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,kBAAkB;CAuB3B"}
@@ -9,12 +9,10 @@ import { BaseWallet } from './base_wallet.js';
9
9
  */ export class AccountWallet extends BaseWallet {
10
10
  account;
11
11
  constructor(pxe, account){
12
- super(pxe, [
13
- account.getAddress()
14
- ]), this.account = account;
12
+ super(pxe), this.account = account;
15
13
  }
16
- createTxExecutionRequest(exec) {
17
- return this.account.createTxExecutionRequest(exec);
14
+ createTxExecutionRequest(exec, fee, options) {
15
+ return this.account.createTxExecutionRequest(exec, fee, options);
18
16
  }
19
17
  getChainId() {
20
18
  return this.account.getChainId();
@@ -22,9 +20,6 @@ import { BaseWallet } from './base_wallet.js';
22
20
  getVersion() {
23
21
  return this.account.getVersion();
24
22
  }
25
- isL1ToL2MessageSynced(l1ToL2Message) {
26
- return this.pxe.isL1ToL2MessageSynced(l1ToL2Message);
27
- }
28
23
  /**
29
24
  * Computes an authentication witness from either a message hash or an intent.
30
25
  *
@@ -43,9 +38,7 @@ import { BaseWallet } from './base_wallet.js';
43
38
  } else {
44
39
  messageHash = await this.getMessageHash(messageHashOrIntent);
45
40
  }
46
- const witness = await this.account.createAuthWit(messageHash);
47
- await this.pxe.addAuthWitness(witness);
48
- return witness;
41
+ return this.account.createAuthWit(messageHash);
49
42
  }
50
43
  /**
51
44
  * Returns a function interaction to set a message hash as authorized or revoked in this account.
@@ -107,9 +100,9 @@ import { BaseWallet } from './base_wallet.js';
107
100
  *
108
101
  * @param onBehalfOf - The address of the "approver"
109
102
  * @param intent - The consumer and inner hash or the caller and action to lookup
110
- *
103
+ * @param witness - The computed authentication witness to check
111
104
  * @returns - A struct containing the validity of the authwit in private and public contexts.
112
- */ async lookupValidity(onBehalfOf, intent) {
105
+ */ async lookupValidity(onBehalfOf, intent, witness) {
113
106
  const { innerHash, consumer } = await this.getInnerHashAndConsumer(intent);
114
107
  const messageHash = await this.getMessageHash(intent);
115
108
  const results = {
@@ -117,13 +110,18 @@ import { BaseWallet } from './base_wallet.js';
117
110
  isValidInPublic: false
118
111
  };
119
112
  // Check private
120
- const witness = await this.getAuthWitness(messageHash);
121
- if (witness !== undefined) {
113
+ try {
122
114
  results.isValidInPrivate = await new ContractFunctionInteraction(this, onBehalfOf, this.getLookupValidityAbi(), [
123
115
  consumer,
124
116
  innerHash
125
- ]).simulate();
126
- }
117
+ ]).simulate({
118
+ authWitnesses: [
119
+ witness
120
+ ]
121
+ });
122
+ // TODO: Narrow down the error to make sure simulation failed due to an invalid authwit
123
+ // eslint-disable-next-line no-empty
124
+ } catch {}
127
125
  // check public
128
126
  results.isValidInPublic = await new ContractFunctionInteraction(this, ProtocolContractAddress.AuthRegistry, this.getIsConsumableAbi(), [
129
127
  onBehalfOf,
@@ -1,40 +1,29 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
- import type { L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/constants';
3
+ import type { FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
4
+ import type { ExecutionPayload } from '@aztec/entrypoints/payload';
4
5
  import type { Fr, Point } from '@aztec/foundation/fields';
5
- import type { SiblingPath } from '@aztec/foundation/trees';
6
6
  import type { AbiDecoded, ContractArtifact } from '@aztec/stdlib/abi';
7
7
  import type { AuthWitness } from '@aztec/stdlib/auth-witness';
8
8
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
9
- import type { L2Block } from '@aztec/stdlib/block';
10
- import type { CompleteAddress, ContractInstanceWithAddress, NodeInfo, PartialAddress } from '@aztec/stdlib/contract';
9
+ import type { CompleteAddress, ContractInstanceWithAddress, NodeInfo } from '@aztec/stdlib/contract';
11
10
  import type { GasFees } from '@aztec/stdlib/gas';
12
- import type { ContractClassMetadata, ContractMetadata, EventMetadataDefinition, GetContractClassLogsResponse, GetPublicLogsResponse, PXE, PXEInfo } from '@aztec/stdlib/interfaces/client';
13
- import type { LogFilter } from '@aztec/stdlib/logs';
14
- import type { NotesFilter, UniqueNote } from '@aztec/stdlib/note';
15
- import type { PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxProvingResult, TxReceipt, TxSimulationResult } from '@aztec/stdlib/tx';
16
- import type { Wallet } from '../account/wallet.js';
17
- import type { ExecutionRequestInit } from '../entrypoint/entrypoint.js';
11
+ import type { ContractClassMetadata, ContractMetadata, EventMetadataDefinition, PXE, PXEInfo } from '@aztec/stdlib/interfaces/client';
12
+ import type { PrivateExecutionResult, Tx, TxExecutionRequest, TxHash, TxProfileResult, TxProvingResult, TxReceipt, TxSimulationResult } from '@aztec/stdlib/tx';
18
13
  import type { IntentAction, IntentInnerHash } from '../utils/authwit.js';
14
+ import type { Wallet } from './wallet.js';
19
15
  /**
20
16
  * A base class for Wallet implementations
21
17
  */
22
18
  export declare abstract class BaseWallet implements Wallet {
23
19
  protected readonly pxe: PXE;
24
- private scopes?;
25
- constructor(pxe: PXE, scopes?: AztecAddress[] | undefined);
26
- abstract isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
20
+ constructor(pxe: PXE);
27
21
  abstract getCompleteAddress(): CompleteAddress;
28
22
  abstract getChainId(): Fr;
29
23
  abstract getVersion(): Fr;
30
- abstract createTxExecutionRequest(exec: ExecutionRequestInit): Promise<TxExecutionRequest>;
24
+ abstract createTxExecutionRequest(exec: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
31
25
  abstract createAuthWit(intent: Fr | Buffer | IntentInnerHash | IntentAction): Promise<AuthWitness>;
32
- setScopes(scopes: AztecAddress[]): void;
33
- getScopes(): AztecAddress[] | undefined;
34
26
  getAddress(): AztecAddress;
35
- storeCapsule(contract: AztecAddress, storageSlot: Fr, capsule: Fr[]): Promise<void>;
36
- registerAccount(secretKey: Fr, partialAddress: PartialAddress): Promise<CompleteAddress>;
37
- getRegisteredAccounts(): Promise<CompleteAddress[]>;
38
27
  registerSender(address: AztecAddress): Promise<AztecAddress>;
39
28
  getSenders(): Promise<AztecAddress[]>;
40
29
  removeSender(address: AztecAddress): Promise<void>;
@@ -44,30 +33,18 @@ export declare abstract class BaseWallet implements Wallet {
44
33
  }): Promise<void>;
45
34
  registerContractClass(artifact: ContractArtifact): Promise<void>;
46
35
  updateContract(contractAddress: AztecAddress, artifact: ContractArtifact): Promise<void>;
47
- getContracts(): Promise<AztecAddress[]>;
48
36
  proveTx(txRequest: TxExecutionRequest, privateExecutionResult: PrivateExecutionResult): Promise<TxProvingResult>;
49
- simulateTx(txRequest: TxExecutionRequest, simulatePublic: boolean, msgSender?: AztecAddress, skipTxValidation?: boolean, skipFeeEnforcement?: boolean, profile?: boolean): Promise<TxSimulationResult>;
37
+ profileTx(txRequest: TxExecutionRequest, profileMode: 'gates' | 'execution-steps' | 'full', msgSender?: AztecAddress): Promise<TxProfileResult>;
38
+ simulateTx(txRequest: TxExecutionRequest, simulatePublic: boolean, msgSender?: AztecAddress, skipTxValidation?: boolean, skipFeeEnforcement?: boolean): Promise<TxSimulationResult>;
50
39
  sendTx(tx: Tx): Promise<TxHash>;
51
- getTxEffect(txHash: TxHash): Promise<import("@aztec/stdlib/block").InBlock<import("@aztec/stdlib/tx").TxEffect> | undefined>;
52
- getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
53
- getNotes(filter: NotesFilter): Promise<UniqueNote[]>;
54
- getPublicStorageAt(contract: AztecAddress, storageSlot: Fr): Promise<any>;
55
- getBlock(number: number): Promise<L2Block | undefined>;
56
40
  getCurrentBaseFees(): Promise<GasFees>;
57
- simulateUnconstrained(functionName: string, args: any[], to: AztecAddress, from?: AztecAddress | undefined): Promise<AbiDecoded>;
58
- getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
59
- getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
60
- getBlockNumber(): Promise<number>;
61
- getProvenBlockNumber(): Promise<number>;
41
+ simulateUnconstrained(functionName: string, args: any[], to: AztecAddress, authwits?: AuthWitness[], from?: AztecAddress | undefined): Promise<AbiDecoded>;
62
42
  getNodeInfo(): Promise<NodeInfo>;
63
- addAuthWitness(authWitness: AuthWitness): Promise<void>;
64
- getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
65
43
  getPXEInfo(): Promise<PXEInfo>;
66
44
  getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
67
45
  getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
46
+ getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
68
47
  getPrivateEvents<T>(event: EventMetadataDefinition, from: number, limit: number, vpks?: Point[]): Promise<T[]>;
69
48
  getPublicEvents<T>(event: EventMetadataDefinition, from: number, limit: number): Promise<T[]>;
70
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]>;
71
- getL2ToL1MembershipWitness(blockNumber: number, l2Tol1Message: Fr): Promise<[bigint, SiblingPath<number>]>;
72
49
  }
73
50
  //# sourceMappingURL=base_wallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base_wallet.d.ts","sourceR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AC;IAGtC,qBAAqB,CACnB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,GAAG,EAAE,EACX,EAAE,EAAE,YAAY,EAChB,QAAQ,CAAC,EAAE,WAAW,EAAE,EACxB,IAAI,CAAC,EAAE,YAAY,GAAG,SAAS,GAC9B,OAAO,CAAC,UAAU,CAAC;IAGtB,WAAW,IAAI,OAAO,CAAC,QAAQ,CAAC;IAGhC,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAG9B,wBAAwB,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,GAAE,OAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAGlG,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAIrE,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAIhD,gBAAgB,CAAC,CAAC,EAChB,KAAK,EAAE,uBAAuB,EAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,KAAK,EAA0E,GACpF,OAAO,CAAC,CAAC,EAAE,CAAC;IAGf,eAAe,CAAC,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;CAG9F"}
@@ -2,29 +2,12 @@
2
2
  * A base class for Wallet implementations
3
3
  */ export class BaseWallet {
4
4
  pxe;
5
- scopes;
6
- constructor(pxe, scopes){
5
+ constructor(pxe){
7
6
  this.pxe = pxe;
8
- this.scopes = scopes;
9
- }
10
- setScopes(scopes) {
11
- this.scopes = scopes;
12
- }
13
- getScopes() {
14
- return this.scopes;
15
7
  }
16
8
  getAddress() {
17
9
  return this.getCompleteAddress().address;
18
10
  }
19
- storeCapsule(contract, storageSlot, capsule) {
20
- return this.pxe.storeCapsule(contract, storageSlot, capsule);
21
- }
22
- registerAccount(secretKey, partialAddress) {
23
- return this.pxe.registerAccount(secretKey, partialAddress);
24
- }
25
- getRegisteredAccounts() {
26
- return this.pxe.getRegisteredAccounts();
27
- }
28
11
  registerSender(address) {
29
12
  return this.pxe.registerSender(address);
30
13
  }
@@ -43,60 +26,27 @@
43
26
  updateContract(contractAddress, artifact) {
44
27
  return this.pxe.updateContract(contractAddress, artifact);
45
28
  }
46
- getContracts() {
47
- return this.pxe.getContracts();
48
- }
49
29
  proveTx(txRequest, privateExecutionResult) {
50
30
  return this.pxe.proveTx(txRequest, privateExecutionResult);
51
31
  }
52
- simulateTx(txRequest, simulatePublic, msgSender, skipTxValidation, skipFeeEnforcement, profile) {
53
- return this.pxe.simulateTx(txRequest, simulatePublic, msgSender, skipTxValidation, skipFeeEnforcement, profile, this.scopes);
32
+ profileTx(txRequest, profileMode, msgSender) {
33
+ return this.pxe.profileTx(txRequest, profileMode, msgSender);
34
+ }
35
+ simulateTx(txRequest, simulatePublic, msgSender, skipTxValidation, skipFeeEnforcement) {
36
+ return this.pxe.simulateTx(txRequest, simulatePublic, msgSender, skipTxValidation, skipFeeEnforcement);
54
37
  }
55
38
  sendTx(tx) {
56
39
  return this.pxe.sendTx(tx);
57
40
  }
58
- getTxEffect(txHash) {
59
- return this.pxe.getTxEffect(txHash);
60
- }
61
- getTxReceipt(txHash) {
62
- return this.pxe.getTxReceipt(txHash);
63
- }
64
- getNotes(filter) {
65
- return this.pxe.getNotes(filter);
66
- }
67
- getPublicStorageAt(contract, storageSlot) {
68
- return this.pxe.getPublicStorageAt(contract, storageSlot);
69
- }
70
- getBlock(number) {
71
- return this.pxe.getBlock(number);
72
- }
73
41
  getCurrentBaseFees() {
74
42
  return this.pxe.getCurrentBaseFees();
75
43
  }
76
- simulateUnconstrained(functionName, args, to, from) {
77
- return this.pxe.simulateUnconstrained(functionName, args, to, from);
78
- }
79
- getPublicLogs(filter) {
80
- return this.pxe.getPublicLogs(filter);
81
- }
82
- getContractClassLogs(filter) {
83
- return this.pxe.getContractClassLogs(filter);
84
- }
85
- getBlockNumber() {
86
- return this.pxe.getBlockNumber();
87
- }
88
- getProvenBlockNumber() {
89
- return this.pxe.getProvenBlockNumber();
44
+ simulateUnconstrained(functionName, args, to, authwits, from) {
45
+ return this.pxe.simulateUnconstrained(functionName, args, to, authwits, from);
90
46
  }
91
47
  getNodeInfo() {
92
48
  return this.pxe.getNodeInfo();
93
49
  }
94
- addAuthWitness(authWitness) {
95
- return this.pxe.addAuthWitness(authWitness);
96
- }
97
- getAuthWitness(messageHash) {
98
- return this.pxe.getAuthWitness(messageHash);
99
- }
100
50
  getPXEInfo() {
101
51
  return this.pxe.getPXEInfo();
102
52
  }
@@ -106,6 +56,9 @@
106
56
  getContractMetadata(address) {
107
57
  return this.pxe.getContractMetadata(address);
108
58
  }
59
+ getTxReceipt(txHash) {
60
+ return this.pxe.getTxReceipt(txHash);
61
+ }
109
62
  getPrivateEvents(event, from, limit, vpks = [
110
63
  this.getCompleteAddress().publicKeys.masterIncomingViewingPublicKey
111
64
  ]) {
@@ -114,10 +67,4 @@
114
67
  getPublicEvents(event, from, limit) {
115
68
  return this.pxe.getPublicEvents(event, from, limit);
116
69
  }
117
- getL1ToL2MembershipWitness(contractAddress, messageHash, secret) {
118
- return this.pxe.getL1ToL2MembershipWitness(contractAddress, messageHash, secret);
119
- }
120
- getL2ToL1MembershipWitness(blockNumber, l2Tol1Message) {
121
- return this.pxe.getL2ToL1MembershipWitness(blockNumber, l2Tol1Message);
122
- }
123
70
  }
@@ -1,8 +1,8 @@
1
1
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
2
2
  import type { PXE } from '@aztec/stdlib/interfaces/client';
3
- import type { AccountContract } from '../account/contract.js';
3
+ import type { AccountContract } from '../account/account_contract.js';
4
4
  import { AccountWallet } from './account_wallet.js';
5
- export * from '../account/wallet.js';
5
+ export * from './wallet.js';
6
6
  export * from './account_wallet.js';
7
7
  export * from './account_wallet_with_private_key.js';
8
8
  export * from './signerless_wallet.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,aAAa,CAAC,CAUxB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,wBAAwB,CAAC;AAEvC;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,aAAa,CAAC,CAUxB"}
@@ -1,5 +1,5 @@
1
1
  import { AccountWallet } from './account_wallet.js';
2
- export * from '../account/wallet.js';
2
+ export * from './wallet.js';
3
3
  export * from './account_wallet.js';
4
4
  export * from './account_wallet_with_private_key.js';
5
5
  export * from './signerless_wallet.js';
@@ -1,11 +1,12 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
2
  /// <reference types="node" resolution-mode="require"/>
3
+ import type { EntrypointInterface, FeeOptions, TxExecutionOptions } from '@aztec/entrypoints/interfaces';
4
+ import type { ExecutionPayload } from '@aztec/entrypoints/payload';
3
5
  import type { Fr } from '@aztec/foundation/fields';
4
6
  import { AuthWitness } from '@aztec/stdlib/auth-witness';
5
7
  import type { CompleteAddress } from '@aztec/stdlib/contract';
6
8
  import type { PXE } from '@aztec/stdlib/interfaces/client';
7
9
  import type { TxExecutionRequest } from '@aztec/stdlib/tx';
8
- import type { EntrypointInterface, ExecutionRequestInit } from '../entrypoint/entrypoint.js';
9
10
  import type { IntentAction, IntentInnerHash } from '../utils/authwit.js';
10
11
  import { BaseWallet } from './base_wallet.js';
11
12
  /**
@@ -14,12 +15,11 @@ import { BaseWallet } from './base_wallet.js';
14
15
  export declare class SignerlessWallet extends BaseWallet {
15
16
  private entrypoint?;
16
17
  constructor(pxe: PXE, entrypoint?: EntrypointInterface | undefined);
17
- createTxExecutionRequest(execution: ExecutionRequestInit): Promise<TxExecutionRequest>;
18
+ createTxExecutionRequest(execution: ExecutionPayload, fee: FeeOptions, options: TxExecutionOptions): Promise<TxExecutionRequest>;
18
19
  getChainId(): Fr;
19
20
  getVersion(): Fr;
20
21
  getPublicKeysHash(): Fr;
21
22
  getCompleteAddress(): CompleteAddress;
22
23
  createAuthWit(_intent: Fr | Buffer | IntentInnerHash | IntentAction): Promise<AuthWitness>;
23
- isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
24
24
  }
25
25
  //# sourceMappingURL=signerless_wallet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"signerless_wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/signerless_wallet.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,WAAW,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,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IACxB,OAAO,CAAC,UAAU,CAAC;gBAA7B,GAAG,EAAE,GAAG,EAAU,UAAU,CAAC,iCAAqB;IAGxD,wBAAwB,CAC5B,SAAS,EAAE,gBAAgB,EAC3B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,kBAAkB,CAAC;IAU9B,UAAU,IAAI,EAAE;IAIhB,UAAU,IAAI,EAAE;IAIhB,iBAAiB,IAAI,EAAE;IAIvB,kBAAkB,IAAI,eAAe;IAIrC,aAAa,CAAC,OAAO,EAAE,EAAE,GAAG,MAAM,GAAG,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;CAG3F"}
@@ -1,4 +1,4 @@
1
- import { DefaultEntrypoint } from '../entrypoint/default_entrypoint.js';
1
+ import { DefaultEntrypoint } from '@aztec/entrypoints/default';
2
2
  import { BaseWallet } from './base_wallet.js';
3
3
  /**
4
4
  * Wallet implementation which creates a transaction request directly to the requested contract without any signing.
@@ -7,13 +7,13 @@ import { BaseWallet } from './base_wallet.js';
7
7
  constructor(pxe, entrypoint){
8
8
  super(pxe), this.entrypoint = entrypoint;
9
9
  }
10
- async createTxExecutionRequest(execution) {
10
+ async createTxExecutionRequest(execution, fee, options) {
11
11
  let entrypoint = this.entrypoint;
12
12
  if (!entrypoint) {
13
13
  const { l1ChainId: chainId, protocolVersion } = await this.pxe.getNodeInfo();
14
14
  entrypoint = new DefaultEntrypoint(chainId, protocolVersion);
15
15
  }
16
- return entrypoint.createTxExecutionRequest(execution);
16
+ return entrypoint.createTxExecutionRequest(execution, fee, options);
17
17
  }
18
18
  getChainId() {
19
19
  throw new Error('SignerlessWallet: Method getChainId not implemented.');
@@ -30,7 +30,4 @@ import { BaseWallet } from './base_wallet.js';
30
30
  createAuthWit(_intent) {
31
31
  throw new Error('SignerlessWallet: Method createAuthWit not implemented.');
32
32
  }
33
- isL1ToL2MessageSynced(l1ToL2Message) {
34
- return this.pxe.isL1ToL2MessageSynced(l1ToL2Message);
35
- }
36
33
  }
@@ -0,0 +1,11 @@
1
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
2
+ import type { PXE } from '@aztec/stdlib/interfaces/client';
3
+ import type { AccountInterface } from '../account/interface.js';
4
+ import type { IntentAction, IntentInnerHash } from '../utils/authwit.js';
5
+ /**
6
+ * The wallet interface.
7
+ */
8
+ export type Wallet = AccountInterface & Pick<PXE, 'simulateTx' | 'simulateUnconstrained' | 'profileTx' | 'sendTx' | 'getContractClassMetadata' | 'getContractMetadata' | 'registerContract' | 'registerContractClass' | 'proveTx' | 'getNodeInfo' | 'getPXEInfo' | 'getCurrentBaseFees' | 'updateContract' | 'registerSender' | 'getSenders' | 'removeSender' | 'getTxReceipt' | 'getPrivateEvents' | 'getPublicEvents'> & {
9
+ createAuthWit(intent: IntentInnerHash | IntentAction): Promise<AuthWitness>;
10
+ };
11
+ //# sourceMappingURL=wallet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,gBAAgB,GACnC,IAAI,CACF,GAAG,EACD,YAAY,GACZ,uBAAuB,GACvB,WAAW,GACX,QAAQ,GACR,0BAA0B,GAC1B,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,SAAS,GACT,aAAa,GACb,YAAY,GACZ,oBAAoB,GACpB,gBAAgB,GAChB,gBAAgB,GAChB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,iBAAiB,CACpB,GAAG;IACF,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CAC7E,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aztec/aztec.js",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
4
- "version": "0.80.0",
4
+ "version": "0.82.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dest/index.js",
@@ -79,12 +79,13 @@
79
79
  ]
80
80
  },
81
81
  "dependencies": {
82
- "@aztec/constants": "0.80.0",
83
- "@aztec/ethereum": "0.80.0",
84
- "@aztec/foundation": "0.80.0",
85
- "@aztec/l1-artifacts": "0.80.0",
86
- "@aztec/protocol-contracts": "0.80.0",
87
- "@aztec/stdlib": "0.80.0",
82
+ "@aztec/constants": "0.82.0",
83
+ "@aztec/entrypoints": "0.82.0",
84
+ "@aztec/ethereum": "0.82.0",
85
+ "@aztec/foundation": "0.82.0",
86
+ "@aztec/l1-artifacts": "0.82.0",
87
+ "@aztec/protocol-contracts": "0.82.0",
88
+ "@aztec/stdlib": "0.82.0",
88
89
  "axios": "^1.7.2",
89
90
  "tslib": "^2.4.0",
90
91
  "viem": "2.23.7"