@aztec/aztec.js 0.0.1-commit.24de95ac → 0.0.1-commit.2e2504e2

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 (252) hide show
  1. package/dest/account/account.d.ts +26 -42
  2. package/dest/account/account.d.ts.map +1 -1
  3. package/dest/account/account.js +19 -47
  4. package/dest/account/account_contract.d.ts +9 -10
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +20 -9
  7. package/dest/account/account_with_secret_key.d.ts.map +1 -1
  8. package/dest/account/account_with_secret_key.js +21 -4
  9. package/dest/account/index.d.ts +4 -3
  10. package/dest/account/index.d.ts.map +1 -1
  11. package/dest/account/index.js +2 -0
  12. package/dest/account/signerless_account.d.ts +7 -9
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/account/signerless_account.js +8 -11
  15. package/dest/api/abi.d.ts +1 -1
  16. package/dest/api/account.d.ts +3 -4
  17. package/dest/api/account.d.ts.map +1 -1
  18. package/dest/api/account.js +2 -3
  19. package/dest/api/addresses.d.ts +1 -1
  20. package/dest/api/authorization.d.ts +2 -2
  21. package/dest/api/authorization.d.ts.map +1 -1
  22. package/dest/api/authorization.js +1 -1
  23. package/dest/api/block.d.ts +1 -1
  24. package/dest/api/contract.d.ts +17 -11
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +15 -9
  27. package/dest/api/crypto.d.ts +1 -1
  28. package/dest/api/deployment.d.ts +1 -1
  29. package/dest/api/eth_address.d.ts +1 -1
  30. package/dest/api/ethereum.d.ts +1 -1
  31. package/dest/api/events.d.ts +1 -1
  32. package/dest/api/fee.d.ts +1 -1
  33. package/dest/api/fee_testing.d.ts +1 -1
  34. package/dest/api/fields.d.ts +3 -2
  35. package/dest/api/fields.d.ts.map +1 -1
  36. package/dest/api/fields.js +2 -1
  37. package/dest/api/keys.d.ts +2 -2
  38. package/dest/api/keys.js +1 -1
  39. package/dest/api/log.d.ts +1 -1
  40. package/dest/api/messaging.d.ts +1 -1
  41. package/dest/api/node.d.ts +8 -4
  42. package/dest/api/node.d.ts.map +1 -1
  43. package/dest/api/node.js +7 -3
  44. package/dest/api/note.d.ts +2 -2
  45. package/dest/api/note.d.ts.map +1 -1
  46. package/dest/api/note.js +1 -1
  47. package/dest/api/protocol.d.ts +7 -1
  48. package/dest/api/protocol.d.ts.map +1 -1
  49. package/dest/api/protocol.js +6 -0
  50. package/dest/api/trees.d.ts +1 -1
  51. package/dest/api/tx.d.ts +2 -2
  52. package/dest/api/tx.d.ts.map +1 -1
  53. package/dest/api/tx.js +1 -1
  54. package/dest/api/utils.d.ts +1 -1
  55. package/dest/api/wallet.d.ts +3 -3
  56. package/dest/api/wallet.d.ts.map +1 -1
  57. package/dest/api/wallet.js +2 -2
  58. package/dest/authorization/call_authorization_request.d.ts +2 -2
  59. package/dest/authorization/call_authorization_request.d.ts.map +1 -1
  60. package/dest/contract/base_contract_interaction.d.ts +8 -11
  61. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  62. package/dest/contract/base_contract_interaction.js +5 -17
  63. package/dest/contract/batch_call.d.ts +8 -9
  64. package/dest/contract/batch_call.d.ts.map +1 -1
  65. package/dest/contract/batch_call.js +54 -34
  66. package/dest/contract/checker.d.ts +1 -1
  67. package/dest/contract/contract.d.ts +2 -2
  68. package/dest/contract/contract.d.ts.map +1 -1
  69. package/dest/contract/contract.js +4 -5
  70. package/dest/contract/contract_base.d.ts +6 -10
  71. package/dest/contract/contract_base.d.ts.map +1 -1
  72. package/dest/contract/contract_base.js +5 -12
  73. package/dest/contract/contract_function_interaction.d.ts +3 -3
  74. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  75. package/dest/contract/contract_function_interaction.js +9 -6
  76. package/dest/contract/deploy_method.d.ts +71 -23
  77. package/dest/contract/deploy_method.d.ts.map +1 -1
  78. package/dest/contract/deploy_method.js +49 -29
  79. package/dest/contract/get_gas_limits.d.ts +1 -1
  80. package/dest/contract/interaction_options.d.ts +44 -7
  81. package/dest/contract/interaction_options.d.ts.map +1 -1
  82. package/dest/contract/interaction_options.js +12 -11
  83. package/dest/contract/protocol_contracts/auth-registry.d.ts +27 -0
  84. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -0
  85. package/dest/contract/protocol_contracts/auth-registry.js +558 -0
  86. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +26 -0
  87. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -0
  88. package/dest/contract/protocol_contracts/contract-class-registry.js +385 -0
  89. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +22 -0
  90. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -0
  91. package/dest/contract/protocol_contracts/contract-instance-registry.js +465 -0
  92. package/dest/contract/protocol_contracts/fee-juice.d.ts +21 -0
  93. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -0
  94. package/dest/contract/protocol_contracts/fee-juice.js +426 -0
  95. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +34 -0
  96. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -0
  97. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +585 -0
  98. package/dest/contract/protocol_contracts/public-checks.d.ts +26 -0
  99. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -0
  100. package/dest/contract/protocol_contracts/public-checks.js +593 -0
  101. package/dest/contract/wait_for_proven.d.ts +2 -2
  102. package/dest/contract/wait_for_proven.d.ts.map +1 -1
  103. package/dest/contract/wait_for_proven.js +1 -1
  104. package/dest/contract/wait_opts.d.ts +16 -0
  105. package/dest/contract/wait_opts.d.ts.map +1 -0
  106. package/dest/contract/wait_opts.js +5 -0
  107. package/dest/deployment/broadcast_function.d.ts +1 -1
  108. package/dest/deployment/broadcast_function.js +4 -4
  109. package/dest/deployment/contract_deployer.d.ts +1 -1
  110. package/dest/deployment/contract_deployer.d.ts.map +1 -1
  111. package/dest/deployment/contract_deployer.js +1 -1
  112. package/dest/deployment/publish_class.d.ts +1 -1
  113. package/dest/deployment/publish_class.js +3 -3
  114. package/dest/deployment/publish_instance.d.ts +2 -2
  115. package/dest/deployment/publish_instance.d.ts.map +1 -1
  116. package/dest/deployment/publish_instance.js +3 -3
  117. package/dest/ethereum/portal_manager.d.ts +7 -6
  118. package/dest/ethereum/portal_manager.d.ts.map +1 -1
  119. package/dest/ethereum/portal_manager.js +48 -22
  120. package/dest/fee/fee_juice_payment_method_with_claim.d.ts +2 -2
  121. package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
  122. package/dest/fee/fee_juice_payment_method_with_claim.js +3 -3
  123. package/dest/fee/fee_payment_method.d.ts +2 -2
  124. package/dest/fee/fee_payment_method.d.ts.map +1 -1
  125. package/dest/fee/private_fee_payment_method.d.ts +2 -2
  126. package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
  127. package/dest/fee/private_fee_payment_method.js +4 -4
  128. package/dest/fee/public_fee_payment_method.d.ts +2 -2
  129. package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
  130. package/dest/fee/public_fee_payment_method.js +4 -4
  131. package/dest/fee/sponsored_fee_payment.d.ts +2 -2
  132. package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
  133. package/dest/fee/sponsored_fee_payment.js +2 -2
  134. package/dest/scripts/generate_protocol_contract_types.d.ts +2 -0
  135. package/dest/scripts/generate_protocol_contract_types.d.ts.map +1 -0
  136. package/dest/scripts/generate_protocol_contract_types.js +120 -0
  137. package/dest/utils/abi_types.d.ts +2 -2
  138. package/dest/utils/abi_types.d.ts.map +1 -1
  139. package/dest/utils/authwit.d.ts +14 -12
  140. package/dest/utils/authwit.d.ts.map +1 -1
  141. package/dest/utils/authwit.js +27 -20
  142. package/dest/utils/cross_chain.d.ts +2 -2
  143. package/dest/utils/cross_chain.d.ts.map +1 -1
  144. package/dest/utils/fee_juice.d.ts +2 -2
  145. package/dest/utils/fee_juice.js +2 -2
  146. package/dest/utils/field_compressed_string.d.ts +1 -1
  147. package/dest/utils/field_compressed_string.d.ts.map +1 -1
  148. package/dest/utils/field_compressed_string.js +1 -1
  149. package/dest/utils/node.d.ts +13 -2
  150. package/dest/utils/node.d.ts.map +1 -1
  151. package/dest/utils/node.js +46 -0
  152. package/dest/utils/pub_key.d.ts +2 -2
  153. package/dest/utils/pub_key.d.ts.map +1 -1
  154. package/dest/utils/pub_key.js +1 -1
  155. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +6 -9
  156. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  157. package/dest/wallet/account_entrypoint_meta_payment_method.js +29 -44
  158. package/dest/wallet/account_manager.d.ts +3 -9
  159. package/dest/wallet/account_manager.d.ts.map +1 -1
  160. package/dest/wallet/account_manager.js +6 -12
  161. package/dest/wallet/capabilities.d.ts +444 -0
  162. package/dest/wallet/capabilities.d.ts.map +1 -0
  163. package/dest/wallet/capabilities.js +3 -0
  164. package/dest/wallet/deploy_account_method.d.ts +37 -9
  165. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  166. package/dest/wallet/deploy_account_method.js +9 -7
  167. package/dest/wallet/index.d.ts +2 -2
  168. package/dest/wallet/index.d.ts.map +1 -1
  169. package/dest/wallet/index.js +1 -1
  170. package/dest/wallet/wallet.d.ts +1577 -1465
  171. package/dest/wallet/wallet.d.ts.map +1 -1
  172. package/dest/wallet/wallet.js +200 -111
  173. package/package.json +26 -14
  174. package/src/account/account.ts +35 -60
  175. package/src/account/account_contract.ts +7 -8
  176. package/src/account/account_with_secret_key.ts +34 -9
  177. package/src/account/index.ts +3 -2
  178. package/src/account/signerless_account.ts +15 -15
  179. package/src/api/account.ts +10 -3
  180. package/src/api/authorization.ts +1 -0
  181. package/src/api/contract.ts +24 -8
  182. package/src/api/fields.ts +2 -1
  183. package/src/api/keys.ts +2 -2
  184. package/src/api/node.ts +7 -3
  185. package/src/api/note.ts +1 -1
  186. package/src/api/protocol.ts +7 -0
  187. package/src/api/tx.ts +4 -0
  188. package/src/api/wallet.ts +47 -8
  189. package/src/authorization/call_authorization_request.ts +1 -1
  190. package/src/contract/base_contract_interaction.ts +27 -16
  191. package/src/contract/batch_call.ts +67 -48
  192. package/src/contract/contract.ts +7 -5
  193. package/src/contract/contract_base.ts +5 -15
  194. package/src/contract/contract_function_interaction.ts +10 -11
  195. package/src/contract/deploy_method.ts +134 -40
  196. package/src/contract/interaction_options.ts +52 -13
  197. package/src/contract/protocol_contracts/auth-registry.ts +351 -0
  198. package/src/contract/protocol_contracts/contract-class-registry.ts +241 -0
  199. package/src/contract/protocol_contracts/contract-instance-registry.ts +302 -0
  200. package/src/contract/protocol_contracts/fee-juice.ts +264 -0
  201. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +332 -0
  202. package/src/contract/protocol_contracts/public-checks.ts +316 -0
  203. package/src/contract/wait_for_proven.ts +1 -1
  204. package/src/contract/wait_opts.ts +21 -0
  205. package/src/deployment/broadcast_function.ts +4 -4
  206. package/src/deployment/contract_deployer.ts +3 -2
  207. package/src/deployment/publish_class.ts +3 -3
  208. package/src/deployment/publish_instance.ts +3 -6
  209. package/src/ethereum/portal_manager.ts +65 -34
  210. package/src/fee/fee_juice_payment_method_with_claim.ts +4 -2
  211. package/src/fee/fee_payment_method.ts +1 -1
  212. package/src/fee/private_fee_payment_method.ts +5 -3
  213. package/src/fee/public_fee_payment_method.ts +5 -3
  214. package/src/fee/sponsored_fee_payment.ts +3 -1
  215. package/src/scripts/generate_protocol_contract_types.ts +150 -0
  216. package/src/utils/abi_types.ts +1 -1
  217. package/src/utils/authwit.ts +40 -22
  218. package/src/utils/cross_chain.ts +1 -1
  219. package/src/utils/fee_juice.ts +2 -2
  220. package/src/utils/field_compressed_string.ts +1 -1
  221. package/src/utils/node.ts +62 -0
  222. package/src/utils/pub_key.ts +2 -2
  223. package/src/wallet/account_entrypoint_meta_payment_method.ts +29 -60
  224. package/src/wallet/account_manager.ts +7 -15
  225. package/src/wallet/capabilities.ts +491 -0
  226. package/src/wallet/deploy_account_method.ts +41 -16
  227. package/src/wallet/index.ts +1 -1
  228. package/src/wallet/wallet.ts +322 -151
  229. package/dest/account/interface.d.ts +0 -19
  230. package/dest/account/interface.d.ts.map +0 -1
  231. package/dest/account/interface.js +0 -5
  232. package/dest/contract/deploy_sent_tx.d.ts +0 -43
  233. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  234. package/dest/contract/deploy_sent_tx.js +0 -40
  235. package/dest/contract/protocol_contracts.d.ts +0 -9
  236. package/dest/contract/protocol_contracts.d.ts.map +0 -1
  237. package/dest/contract/protocol_contracts.js +0 -26
  238. package/dest/contract/sent_tx.d.ts +0 -51
  239. package/dest/contract/sent_tx.d.ts.map +0 -1
  240. package/dest/contract/sent_tx.js +0 -90
  241. package/dest/contract/unsafe_contract.d.ts +0 -15
  242. package/dest/contract/unsafe_contract.d.ts.map +0 -1
  243. package/dest/contract/unsafe_contract.js +0 -6
  244. package/dest/wallet/base_wallet.d.ts +0 -91
  245. package/dest/wallet/base_wallet.d.ts.map +0 -1
  246. package/dest/wallet/base_wallet.js +0 -238
  247. package/src/account/interface.ts +0 -25
  248. package/src/contract/deploy_sent_tx.ts +0 -68
  249. package/src/contract/protocol_contracts.ts +0 -35
  250. package/src/contract/sent_tx.ts +0 -130
  251. package/src/contract/unsafe_contract.ts +0 -19
  252. package/src/wallet/base_wallet.ts +0 -350
@@ -1 +1 @@
1
- {"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAE5B,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3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EAgBhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQnC,CAAC;AA4EH,QAAA,MAAe,mBAAmB;;;;;;;;;;;;;;;;;;QAAU,mBAAmB;;;;;;;;;;;;;;;;;;MAA4C,CAAC;AAE5G,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AAEpD,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAI7C,CAAC"}
@@ -1,22 +1,12 @@
1
- import { AbiTypeSchema, ContractArtifactSchema, FunctionAbiSchema, FunctionType } from '@aztec/stdlib/abi';
1
+ import { BlockNumberPositiveSchema } from '@aztec/foundation/branded-types';
2
+ import { AbiTypeSchema, ContractArtifactSchema, FunctionType } from '@aztec/stdlib/abi';
2
3
  import { AuthWitness } from '@aztec/stdlib/auth-witness';
3
- import { ContractClassWithIdSchema, ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
4
+ import { ContractInstanceWithAddressSchema } from '@aztec/stdlib/contract';
4
5
  import { Gas } from '@aztec/stdlib/gas';
5
- import { PublicKeys } from '@aztec/stdlib/keys';
6
- import { AbiDecodedSchema, optional, schemas } from '@aztec/stdlib/schemas';
7
- import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
6
+ import { AbiDecodedSchema, optional, schemas, zodFor } from '@aztec/stdlib/schemas';
7
+ import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult, inTxSchema } from '@aztec/stdlib/tx';
8
8
  import { z } from 'zod';
9
- export const ContractInstantiationDataSchema = z.object({
10
- constructorArtifact: optional(z.union([
11
- FunctionAbiSchema,
12
- z.string()
13
- ])),
14
- constructorArgs: optional(z.array(z.any())),
15
- skipArgsDecoding: optional(z.boolean()),
16
- salt: schemas.Fr,
17
- publicKeys: optional(PublicKeys.schema),
18
- deployer: optional(schemas.AztecAddress)
19
- });
9
+ import { NO_WAIT } from '../contract/interaction_options.js';
20
10
  export const FunctionCallSchema = z.object({
21
11
  name: z.string(),
22
12
  to: schemas.AztecAddress,
@@ -31,9 +21,10 @@ export const ExecutionPayloadSchema = z.object({
31
21
  calls: z.array(FunctionCallSchema),
32
22
  authWitnesses: z.array(AuthWitness.schema),
33
23
  capsules: z.array(Capsule.schema),
34
- extraHashedArgs: z.array(HashedValues.schema)
24
+ extraHashedArgs: z.array(HashedValues.schema),
25
+ feePayer: optional(schemas.AztecAddress)
35
26
  });
36
- export const UserFeeOptionsSchema = z.object({
27
+ export const GasSettingsOptionSchema = z.object({
37
28
  gasSettings: optional(z.object({
38
29
  gasLimits: optional(Gas.schema),
39
30
  teardownGasLimits: optional(Gas.schema),
@@ -45,18 +36,27 @@ export const UserFeeOptionsSchema = z.object({
45
36
  feePerDaGas: schemas.BigInt,
46
37
  feePerL2Gas: schemas.BigInt
47
38
  }))
48
- })),
49
- embeddedPaymentMethodFeePayer: optional(schemas.AztecAddress)
39
+ }))
50
40
  });
51
- export const WalletSimulationFeeOptionSchema = UserFeeOptionsSchema.extend({
41
+ export const WalletSimulationFeeOptionSchema = GasSettingsOptionSchema.extend({
52
42
  estimatedGasPadding: optional(z.number()),
53
43
  estimateGas: optional(z.boolean())
54
44
  });
45
+ export const WaitOptsSchema = z.object({
46
+ ignoreDroppedReceiptsFor: optional(z.number()),
47
+ timeout: optional(z.number()),
48
+ interval: optional(z.number()),
49
+ dontThrowOnRevert: optional(z.boolean())
50
+ });
55
51
  export const SendOptionsSchema = z.object({
56
52
  from: schemas.AztecAddress,
57
53
  authWitnesses: optional(z.array(AuthWitness.schema)),
58
54
  capsules: optional(z.array(Capsule.schema)),
59
- fee: optional(UserFeeOptionsSchema)
55
+ fee: optional(GasSettingsOptionSchema),
56
+ wait: optional(z.union([
57
+ z.literal(NO_WAIT),
58
+ WaitOptsSchema
59
+ ]))
60
60
  });
61
61
  export const SimulateOptionsSchema = z.object({
62
62
  from: schemas.AztecAddress,
@@ -75,96 +75,172 @@ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
75
75
  ]),
76
76
  skipProofGeneration: optional(z.boolean())
77
77
  });
78
- export const InstanceDataSchema = z.union([
79
- schemas.AztecAddress,
80
- ContractInstanceWithAddressSchema,
81
- ContractInstantiationDataSchema,
82
- z.object({
83
- instance: ContractInstanceWithAddressSchema,
84
- artifact: ContractArtifactSchema
85
- })
86
- ]);
87
78
  export const MessageHashOrIntentSchema = z.union([
88
- schemas.Fr,
89
- schemas.Buffer,
90
79
  z.object({
91
80
  consumer: schemas.AztecAddress,
92
- innerHash: z.union([
93
- schemas.Buffer,
94
- schemas.Fr
95
- ])
81
+ innerHash: schemas.Fr
96
82
  }),
97
83
  z.object({
98
84
  caller: schemas.AztecAddress,
99
85
  call: FunctionCallSchema
100
86
  })
101
87
  ]);
102
- export const BatchedMethodSchema = z.union([
103
- z.object({
104
- name: z.literal('registerSender'),
105
- args: z.tuple([
106
- schemas.AztecAddress,
107
- optional(z.string())
108
- ])
109
- }),
110
- z.object({
111
- name: z.literal('registerContract'),
112
- args: z.tuple([
113
- InstanceDataSchema,
114
- optional(ContractArtifactSchema),
115
- optional(schemas.Fr)
116
- ])
117
- }),
118
- z.object({
119
- name: z.literal('sendTx'),
120
- args: z.tuple([
121
- ExecutionPayloadSchema,
122
- SendOptionsSchema
123
- ])
124
- }),
125
- z.object({
126
- name: z.literal('simulateUtility'),
127
- args: z.tuple([
128
- z.string(),
129
- z.array(z.any()),
130
- schemas.AztecAddress,
131
- optional(z.array(AuthWitness.schema))
132
- ])
133
- })
134
- ]);
88
+ export const EventMetadataDefinitionSchema = z.object({
89
+ eventSelector: schemas.EventSelector,
90
+ abiType: AbiTypeSchema,
91
+ fieldNames: z.array(z.string())
92
+ });
93
+ export const PrivateEventSchema = zodFor()(z.object({
94
+ event: AbiDecodedSchema,
95
+ metadata: inTxSchema()
96
+ }));
97
+ export const PrivateEventFilterSchema = z.object({
98
+ contractAddress: schemas.AztecAddress,
99
+ scopes: z.array(schemas.AztecAddress),
100
+ txHash: optional(TxHash.schema),
101
+ fromBlock: optional(BlockNumberPositiveSchema),
102
+ toBlock: optional(BlockNumberPositiveSchema)
103
+ });
135
104
  export const ContractMetadataSchema = z.object({
136
- contractInstance: z.union([
137
- ContractInstanceWithAddressSchema,
138
- z.undefined()
139
- ]),
105
+ instance: optional(ContractInstanceWithAddressSchema),
140
106
  isContractInitialized: z.boolean(),
141
- isContractPublished: z.boolean()
107
+ isContractPublished: z.boolean(),
108
+ isContractUpdated: z.boolean(),
109
+ updatedContractClassId: optional(schemas.Fr)
142
110
  });
143
111
  export const ContractClassMetadataSchema = z.object({
144
- contractClass: z.union([
145
- ContractClassWithIdSchema,
146
- z.undefined()
112
+ isArtifactRegistered: z.boolean(),
113
+ isContractClassPubliclyRegistered: z.boolean()
114
+ });
115
+ export const ContractFunctionPatternSchema = z.object({
116
+ contract: z.union([
117
+ schemas.AztecAddress,
118
+ z.literal('*')
147
119
  ]),
148
- isContractClassPubliclyRegistered: z.boolean(),
149
- artifact: z.union([
150
- ContractArtifactSchema,
151
- z.undefined()
120
+ function: z.union([
121
+ z.string(),
122
+ z.literal('*')
152
123
  ])
153
124
  });
154
- export const EventMetadataDefinitionSchema = z.object({
155
- eventSelector: schemas.EventSelector,
156
- abiType: AbiTypeSchema,
157
- fieldNames: z.array(z.string())
125
+ export const AccountsCapabilitySchema = z.object({
126
+ type: z.literal('accounts'),
127
+ canGet: optional(z.boolean()),
128
+ canCreateAuthWit: optional(z.boolean())
158
129
  });
159
- export const WalletSchema = {
130
+ export const GrantedAccountsCapabilitySchema = AccountsCapabilitySchema.extend({
131
+ accounts: z.array(z.object({
132
+ alias: z.string(),
133
+ item: schemas.AztecAddress
134
+ }))
135
+ });
136
+ export const ContractsCapabilitySchema = z.object({
137
+ type: z.literal('contracts'),
138
+ contracts: z.union([
139
+ z.literal('*'),
140
+ z.array(schemas.AztecAddress)
141
+ ]),
142
+ canRegister: optional(z.boolean()),
143
+ canGetMetadata: optional(z.boolean())
144
+ });
145
+ export const GrantedContractsCapabilitySchema = ContractsCapabilitySchema;
146
+ export const ContractClassesCapabilitySchema = z.object({
147
+ type: z.literal('contractClasses'),
148
+ classes: z.union([
149
+ z.literal('*'),
150
+ z.array(schemas.Fr)
151
+ ]),
152
+ canGetMetadata: z.boolean()
153
+ });
154
+ export const GrantedContractClassesCapabilitySchema = ContractClassesCapabilitySchema;
155
+ export const SimulationCapabilitySchema = z.object({
156
+ type: z.literal('simulation'),
157
+ transactions: optional(z.object({
158
+ scope: z.union([
159
+ z.literal('*'),
160
+ z.array(ContractFunctionPatternSchema)
161
+ ])
162
+ })),
163
+ utilities: optional(z.object({
164
+ scope: z.union([
165
+ z.literal('*'),
166
+ z.array(ContractFunctionPatternSchema)
167
+ ])
168
+ }))
169
+ });
170
+ export const GrantedSimulationCapabilitySchema = SimulationCapabilitySchema;
171
+ export const TransactionCapabilitySchema = z.object({
172
+ type: z.literal('transaction'),
173
+ scope: z.union([
174
+ z.literal('*'),
175
+ z.array(ContractFunctionPatternSchema)
176
+ ])
177
+ });
178
+ export const GrantedTransactionCapabilitySchema = TransactionCapabilitySchema;
179
+ export const DataCapabilitySchema = z.object({
180
+ type: z.literal('data'),
181
+ addressBook: optional(z.boolean()),
182
+ privateEvents: optional(z.object({
183
+ contracts: z.union([
184
+ z.literal('*'),
185
+ z.array(schemas.AztecAddress)
186
+ ])
187
+ }))
188
+ });
189
+ export const GrantedDataCapabilitySchema = DataCapabilitySchema;
190
+ export const CapabilitySchema = z.discriminatedUnion('type', [
191
+ AccountsCapabilitySchema,
192
+ ContractsCapabilitySchema,
193
+ ContractClassesCapabilitySchema,
194
+ SimulationCapabilitySchema,
195
+ TransactionCapabilitySchema,
196
+ DataCapabilitySchema
197
+ ]);
198
+ export const GrantedCapabilitySchema = z.discriminatedUnion('type', [
199
+ GrantedAccountsCapabilitySchema,
200
+ GrantedContractsCapabilitySchema,
201
+ GrantedContractClassesCapabilitySchema,
202
+ GrantedSimulationCapabilitySchema,
203
+ GrantedTransactionCapabilitySchema,
204
+ GrantedDataCapabilitySchema
205
+ ]);
206
+ export const AppCapabilitiesSchema = z.object({
207
+ version: z.literal('1.0'),
208
+ metadata: z.object({
209
+ name: z.string(),
210
+ version: z.string(),
211
+ description: optional(z.string()),
212
+ url: optional(z.string()),
213
+ icon: optional(z.string())
214
+ }),
215
+ capabilities: z.array(CapabilitySchema),
216
+ behavior: optional(z.object({
217
+ mode: optional(z.enum([
218
+ 'strict',
219
+ 'permissive'
220
+ ])),
221
+ expiration: optional(z.number())
222
+ }))
223
+ });
224
+ export const WalletCapabilitiesSchema = z.object({
225
+ version: z.literal('1.0'),
226
+ granted: z.array(GrantedCapabilitySchema),
227
+ wallet: z.object({
228
+ name: z.string(),
229
+ version: z.string()
230
+ }),
231
+ expiresAt: optional(z.number())
232
+ });
233
+ /**
234
+ * Record of all wallet method schemas (excluding batch).
235
+ * This is the single source of truth for method schemas - batch schemas are derived from this.
236
+ */ const WalletMethodSchemas = {
160
237
  getChainInfo: z.function().args().returns(z.object({
161
238
  chainId: schemas.Fr,
162
239
  version: schemas.Fr
163
240
  })),
164
- getContractClassMetadata: z.function().args(schemas.Fr, optional(z.boolean())).returns(ContractClassMetadataSchema),
165
241
  getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
166
- getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
167
- getPrivateEvents: z.function().args(schemas.AztecAddress, EventMetadataDefinitionSchema, z.number(), z.number(), z.array(schemas.AztecAddress)).returns(z.array(AbiDecodedSchema)),
242
+ getContractClassMetadata: z.function().args(schemas.Fr).returns(ContractClassMetadataSchema),
243
+ getPrivateEvents: z.function().args(EventMetadataDefinitionSchema, PrivateEventFilterSchema).returns(z.array(PrivateEventSchema)),
168
244
  registerSender: z.function().args(schemas.AztecAddress, optional(z.string())).returns(schemas.AztecAddress),
169
245
  getAddressBook: z.function().args().returns(z.array(z.object({
170
246
  alias: z.string(),
@@ -174,29 +250,42 @@ export const WalletSchema = {
174
250
  alias: z.string(),
175
251
  item: schemas.AztecAddress
176
252
  }))),
177
- registerContract: z.function().args(InstanceDataSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
253
+ registerContract: z.function().args(ContractInstanceWithAddressSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
178
254
  simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
179
- simulateUtility: z.function().args(z.string(), z.array(z.any()), schemas.AztecAddress, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
255
+ simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
180
256
  profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
181
- sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
257
+ sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(z.union([
258
+ TxHash.schema,
259
+ TxReceipt.schema
260
+ ])),
182
261
  createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
262
+ requestCapabilities: z.function().args(AppCapabilitiesSchema).returns(WalletCapabilitiesSchema)
263
+ };
264
+ /**
265
+ * Creates batch schemas from the individual wallet methods.
266
+ * This allows us to define them once and derive batch schemas automatically,
267
+ * reducing duplication and ensuring consistency.
268
+ */ function createBatchSchemas(methodSchemas) {
269
+ const names = Object.keys(methodSchemas);
270
+ const namesAndArgs = names.map((name)=>z.object({
271
+ name: z.literal(name),
272
+ args: methodSchemas[name].parameters()
273
+ }));
274
+ const namesAndReturns = names.map((name)=>z.object({
275
+ name: z.literal(name),
276
+ result: methodSchemas[name].returnType()
277
+ }));
278
+ // Type assertion needed because discriminatedUnion expects a tuple type [T, T, ...T[]]
279
+ // but we're building the array dynamically. The runtime behavior is correct.
280
+ return {
281
+ input: z.discriminatedUnion('name', namesAndArgs),
282
+ output: z.discriminatedUnion('name', namesAndReturns)
283
+ };
284
+ }
285
+ const { input: BatchedMethodSchema, output: BatchedResultSchema } = createBatchSchemas(WalletMethodSchemas);
286
+ export { BatchedMethodSchema, BatchedResultSchema };
287
+ export const WalletSchema = {
288
+ ...WalletMethodSchemas,
183
289
  // @ts-expect-error - ApiSchemaFor cannot properly type generic methods with readonly arrays
184
- batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(z.discriminatedUnion('name', [
185
- z.object({
186
- name: z.literal('registerSender'),
187
- result: schemas.AztecAddress
188
- }),
189
- z.object({
190
- name: z.literal('registerContract'),
191
- result: ContractInstanceWithAddressSchema
192
- }),
193
- z.object({
194
- name: z.literal('sendTx'),
195
- result: TxHash.schema
196
- }),
197
- z.object({
198
- name: z.literal('simulateUtility'),
199
- result: UtilitySimulationResult.schema
200
- })
201
- ])))
290
+ batch: z.function().args(z.array(BatchedMethodSchema)).returns(z.array(BatchedResultSchema))
202
291
  };
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.0.1-commit.24de95ac",
4
+ "version": "0.0.1-commit.2e2504e2",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./abi": "./dest/api/abi.js",
@@ -30,16 +30,26 @@
30
30
  },
31
31
  "typedocOptions": {
32
32
  "entryPoints": [
33
- "./src/index.ts"
33
+ "./src/api/abi.ts",
34
+ "./src/api/account.ts",
35
+ "./src/api/contract.ts",
36
+ "./src/api/deployment.ts",
37
+ "./src/api/ethereum.ts",
38
+ "./src/api/fee.ts",
39
+ "./src/api/fields.ts",
40
+ "./src/api/keys.ts",
41
+ "./src/api/tx.ts",
42
+ "./src/api/wallet.ts"
34
43
  ],
35
44
  "name": "Aztec.js",
36
45
  "tsconfig": "./tsconfig.json"
37
46
  },
38
47
  "scripts": {
39
- "build": "yarn clean && tsc -b",
40
- "build:dev": "tsc -b --watch",
41
- "build:ts": "tsc -b",
42
- "clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts",
48
+ "build": "yarn clean && yarn generate && ../scripts/tsc.sh",
49
+ "build:dev": "../scripts/tsc.sh --watch",
50
+ "build:ts": "../scripts/tsc.sh",
51
+ "clean": "rm -rf ./dest .tsbuildinfo ./src/account_contract/artifacts ./src/contract/protocol_contracts",
52
+ "generate": "node --no-warnings --loader @swc-node/register/esm src/scripts/generate_protocol_contract_types.ts && run -T prettier -w src/contract/protocol_contracts",
43
53
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
44
54
  },
45
55
  "inherits": [
@@ -84,22 +94,24 @@
84
94
  ]
85
95
  },
86
96
  "dependencies": {
87
- "@aztec/constants": "0.0.1-commit.24de95ac",
88
- "@aztec/entrypoints": "0.0.1-commit.24de95ac",
89
- "@aztec/ethereum": "0.0.1-commit.24de95ac",
90
- "@aztec/foundation": "0.0.1-commit.24de95ac",
91
- "@aztec/l1-artifacts": "0.0.1-commit.24de95ac",
92
- "@aztec/protocol-contracts": "0.0.1-commit.24de95ac",
93
- "@aztec/stdlib": "0.0.1-commit.24de95ac",
97
+ "@aztec/constants": "0.0.1-commit.2e2504e2",
98
+ "@aztec/entrypoints": "0.0.1-commit.2e2504e2",
99
+ "@aztec/ethereum": "0.0.1-commit.2e2504e2",
100
+ "@aztec/foundation": "0.0.1-commit.2e2504e2",
101
+ "@aztec/l1-artifacts": "0.0.1-commit.2e2504e2",
102
+ "@aztec/protocol-contracts": "0.0.1-commit.2e2504e2",
103
+ "@aztec/stdlib": "0.0.1-commit.2e2504e2",
94
104
  "axios": "^1.12.0",
95
105
  "tslib": "^2.4.0",
96
- "viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
106
+ "viem": "npm:@aztec/viem@2.38.2",
97
107
  "zod": "^3.23.8"
98
108
  },
99
109
  "devDependencies": {
110
+ "@aztec/builder": "0.0.1-commit.2e2504e2",
100
111
  "@jest/globals": "^30.0.0",
101
112
  "@types/jest": "^30.0.0",
102
113
  "@types/node": "^22.15.17",
114
+ "@typescript/native-preview": "7.0.0-dev.20260113.1",
103
115
  "buffer": "^6.0.3",
104
116
  "crypto-browserify": "^3.12.1",
105
117
  "jest": "^30.0.0",
@@ -1,97 +1,72 @@
1
1
  import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
2
- import type { ExecutionPayload } from '@aztec/entrypoints/payload';
3
- import { Fr } from '@aztec/foundation/fields';
2
+ import type { AuthWitnessProvider, ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
4
3
  import { AuthWitness } from '@aztec/stdlib/auth-witness';
4
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
5
6
  import type { GasSettings } from '@aztec/stdlib/gas';
6
- import type { TxExecutionRequest } from '@aztec/stdlib/tx';
7
+ import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
7
8
 
8
9
  import { type CallIntent, type IntentInnerHash, computeAuthWitMessageHash } from '../utils/authwit.js';
9
- import type { AccountInterface } from './interface.js';
10
10
 
11
11
  /**
12
- * An authwit provider that can create both private and public authwits
13
- * with an intent as input, as opposed to just a precomputed inner hash
12
+ * Provides authorization for actions via the AuthWitness mechanism.
14
13
  */
15
- interface AuthwitnessIntentProvider {
14
+ export interface AuthorizationProvider {
16
15
  /**
17
- * Creates a private authwit from an intent or inner hash, to be provided
18
- * during function execution
16
+ * Creates an authentication witness from an inner hash with consumer, or a call intent
19
17
  * @param intent - The action (or inner hash) to authorize
18
+ * @param chainInfo - Chain information needed for message hash computation
20
19
  */
21
- createAuthWit(intent: IntentInnerHash | CallIntent | Buffer | Fr): Promise<AuthWitness>;
20
+ createAuthWit(intent: IntentInnerHash | CallIntent, chainInfo: ChainInfo): Promise<AuthWitness>;
22
21
  }
23
22
 
23
+ // docs:start:account-interface
24
24
  /**
25
- * A type defining an account, capable of both creating authwits and using them
26
- * to authenticate transaction execution requests.
25
+ * Minimal interface for transaction execution and authorization.
27
26
  */
28
- export type Account = AccountInterface & AuthwitnessIntentProvider;
27
+ export type Account = EntrypointInterface &
28
+ AuthorizationProvider & {
29
+ /** Returns the complete address for this account. */
30
+ getCompleteAddress(): CompleteAddress;
31
+ /** Returns the address for this account. */
32
+ getAddress(): AztecAddress;
33
+ };
34
+ // docs:end:account-interface
29
35
 
30
36
  /**
31
37
  * An account implementation that uses authwits as an authentication mechanism
32
38
  * and can assemble transaction execution requests for an entrypoint.
33
39
  */
34
40
  export class BaseAccount implements Account {
35
- constructor(protected account: AccountInterface) {}
41
+ constructor(
42
+ private entrypoint: EntrypointInterface,
43
+ private authWitnessProvider: AuthWitnessProvider,
44
+ private completeAddress: CompleteAddress,
45
+ ) {}
36
46
 
37
47
  createTxExecutionRequest(
38
48
  exec: ExecutionPayload,
39
49
  gasSettings: GasSettings,
50
+ chainInfo: ChainInfo,
40
51
  options: DefaultAccountEntrypointOptions,
41
52
  ): Promise<TxExecutionRequest> {
42
- return this.account.createTxExecutionRequest(exec, gasSettings, options);
53
+ return this.entrypoint.createTxExecutionRequest(exec, gasSettings, chainInfo, options);
43
54
  }
44
55
 
45
- getChainId(): Fr {
46
- return this.account.getChainId();
56
+ wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload> {
57
+ return this.entrypoint.wrapExecutionPayload(exec, options);
47
58
  }
48
59
 
49
- getVersion(): Fr {
50
- return this.account.getVersion();
60
+ async createAuthWit(messageHashOrIntent: CallIntent | IntentInnerHash, chainInfo: ChainInfo): Promise<AuthWitness> {
61
+ const messageHash = await computeAuthWitMessageHash(messageHashOrIntent, chainInfo);
62
+ return this.authWitnessProvider.createAuthWit(messageHash);
51
63
  }
52
64
 
53
- /** Returns the complete address of the account that implements this wallet. */
54
- public getCompleteAddress() {
55
- return this.account.getCompleteAddress();
65
+ getCompleteAddress(): CompleteAddress {
66
+ return this.completeAddress;
56
67
  }
57
68
 
58
- /** Returns the address of the account that implements this wallet. */
59
- public getAddress() {
60
- return this.getCompleteAddress().address;
61
- }
62
-
63
- /**
64
- * Computes an authentication witness from either a message hash or an intent.
65
- *
66
- * If a message hash is provided, it will create a witness for the hash directly.
67
- * Otherwise, it will compute the message hash using the intent, along with the
68
- * chain id and the version values provided by the wallet.
69
- *
70
- * @param messageHashOrIntent - The message hash of the intent to approve
71
- * @returns The authentication witness
72
- */
73
- async createAuthWit(messageHashOrIntent: Fr | Buffer | CallIntent | IntentInnerHash): Promise<AuthWitness> {
74
- let messageHash: Fr;
75
- if (Buffer.isBuffer(messageHashOrIntent)) {
76
- messageHash = Fr.fromBuffer(messageHashOrIntent);
77
- } else if (messageHashOrIntent instanceof Fr) {
78
- messageHash = messageHashOrIntent;
79
- } else {
80
- messageHash = await this.getMessageHash(messageHashOrIntent);
81
- }
82
-
83
- return this.account.createAuthWit(messageHash);
84
- }
85
-
86
- /**
87
- * Returns the message hash for the given intent
88
- *
89
- * @param intent - A tuple of (consumer and inner hash) or (caller and action)
90
- * @returns The message hash
91
- */
92
- private getMessageHash(intent: IntentInnerHash | CallIntent): Promise<Fr> {
93
- const chainId = this.getChainId();
94
- const version = this.getVersion();
95
- return computeAuthWitMessageHash(intent, { chainId, version });
69
+ getAddress(): AztecAddress {
70
+ return this.completeAddress.address;
96
71
  }
97
72
  }