@aztec/aztec.js 0.0.1-commit.f295ac2 → 0.0.1-commit.fc805bf

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 (137) hide show
  1. package/dest/account/account.d.ts +25 -40
  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 +7 -8
  5. package/dest/account/account_contract.d.ts.map +1 -1
  6. package/dest/account/account_with_secret_key.d.ts +18 -7
  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 +3 -2
  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 +5 -6
  13. package/dest/account/signerless_account.d.ts.map +1 -1
  14. package/dest/account/signerless_account.js +8 -11
  15. package/dest/api/account.d.ts +2 -4
  16. package/dest/api/account.d.ts.map +1 -1
  17. package/dest/api/account.js +1 -3
  18. package/dest/api/authorization.d.ts +2 -2
  19. package/dest/api/authorization.d.ts.map +1 -1
  20. package/dest/api/authorization.js +1 -1
  21. package/dest/api/block.d.ts +2 -2
  22. package/dest/api/block.d.ts.map +1 -1
  23. package/dest/api/block.js +1 -1
  24. package/dest/api/contract.d.ts +16 -10
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +14 -8
  27. package/dest/api/keys.d.ts +1 -1
  28. package/dest/api/keys.js +1 -1
  29. package/dest/api/node.d.ts +8 -4
  30. package/dest/api/node.d.ts.map +1 -1
  31. package/dest/api/node.js +7 -3
  32. package/dest/api/tx.d.ts +2 -2
  33. package/dest/api/tx.d.ts.map +1 -1
  34. package/dest/api/tx.js +1 -1
  35. package/dest/api/wallet.d.ts +3 -2
  36. package/dest/api/wallet.d.ts.map +1 -1
  37. package/dest/api/wallet.js +2 -1
  38. package/dest/contract/base_contract_interaction.d.ts +8 -10
  39. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  40. package/dest/contract/base_contract_interaction.js +5 -17
  41. package/dest/contract/deploy_method.d.ts +63 -16
  42. package/dest/contract/deploy_method.d.ts.map +1 -1
  43. package/dest/contract/deploy_method.js +36 -19
  44. package/dest/contract/interaction_options.d.ts +42 -5
  45. package/dest/contract/interaction_options.d.ts.map +1 -1
  46. package/dest/contract/interaction_options.js +8 -1
  47. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -10
  48. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  49. package/dest/contract/protocol_contracts/auth-registry.js +97 -467
  50. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -11
  51. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  52. package/dest/contract/protocol_contracts/contract-class-registry.js +10 -422
  53. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  54. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  55. package/dest/contract/protocol_contracts/contract-instance-registry.js +80 -482
  56. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  57. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  58. package/dest/contract/protocol_contracts/fee-juice.js +14 -412
  59. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +3 -3
  60. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  61. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +13 -14
  62. package/dest/contract/protocol_contracts/public-checks.d.ts +3 -3
  63. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  64. package/dest/contract/protocol_contracts/public-checks.js +13 -22
  65. package/dest/contract/wait_for_proven.js +1 -1
  66. package/dest/contract/wait_opts.d.ts +16 -0
  67. package/dest/contract/wait_opts.d.ts.map +1 -0
  68. package/dest/contract/wait_opts.js +5 -0
  69. package/dest/utils/authwit.d.ts +8 -6
  70. package/dest/utils/authwit.d.ts.map +1 -1
  71. package/dest/utils/authwit.js +5 -9
  72. package/dest/utils/node.d.ts +12 -1
  73. package/dest/utils/node.d.ts.map +1 -1
  74. package/dest/utils/node.js +46 -0
  75. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  76. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  77. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  78. package/dest/wallet/account_manager.d.ts +1 -7
  79. package/dest/wallet/account_manager.d.ts.map +1 -1
  80. package/dest/wallet/account_manager.js +5 -11
  81. package/dest/wallet/capabilities.d.ts +444 -0
  82. package/dest/wallet/capabilities.d.ts.map +1 -0
  83. package/dest/wallet/capabilities.js +3 -0
  84. package/dest/wallet/deploy_account_method.d.ts +34 -6
  85. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  86. package/dest/wallet/deploy_account_method.js +7 -5
  87. package/dest/wallet/index.d.ts +2 -1
  88. package/dest/wallet/index.d.ts.map +1 -1
  89. package/dest/wallet/index.js +1 -0
  90. package/dest/wallet/wallet.d.ts +1358 -20
  91. package/dest/wallet/wallet.d.ts.map +1 -1
  92. package/dest/wallet/wallet.js +136 -5
  93. package/package.json +9 -9
  94. package/src/account/account.ts +34 -58
  95. package/src/account/account_contract.ts +6 -7
  96. package/src/account/account_with_secret_key.ts +33 -8
  97. package/src/account/index.ts +2 -1
  98. package/src/account/signerless_account.ts +13 -12
  99. package/src/api/account.ts +9 -3
  100. package/src/api/authorization.ts +1 -0
  101. package/src/api/block.ts +1 -1
  102. package/src/api/contract.ts +22 -7
  103. package/src/api/keys.ts +2 -2
  104. package/src/api/node.ts +7 -3
  105. package/src/api/tx.ts +2 -0
  106. package/src/api/wallet.ts +43 -0
  107. package/src/contract/base_contract_interaction.ts +27 -15
  108. package/src/contract/deploy_method.ts +115 -23
  109. package/src/contract/interaction_options.ts +49 -4
  110. package/src/contract/protocol_contracts/auth-registry.ts +45 -236
  111. package/src/contract/protocol_contracts/contract-class-registry.ts +3 -204
  112. package/src/contract/protocol_contracts/contract-instance-registry.ts +34 -233
  113. package/src/contract/protocol_contracts/fee-juice.ts +4 -202
  114. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +6 -12
  115. package/src/contract/protocol_contracts/public-checks.ts +6 -14
  116. package/src/contract/wait_for_proven.ts +1 -1
  117. package/src/contract/wait_opts.ts +21 -0
  118. package/src/utils/authwit.ts +19 -7
  119. package/src/utils/node.ts +62 -0
  120. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  121. package/src/wallet/account_manager.ts +5 -13
  122. package/src/wallet/capabilities.ts +491 -0
  123. package/src/wallet/deploy_account_method.ts +37 -13
  124. package/src/wallet/index.ts +1 -0
  125. package/src/wallet/wallet.ts +149 -14
  126. package/dest/account/interface.d.ts +0 -19
  127. package/dest/account/interface.d.ts.map +0 -1
  128. package/dest/account/interface.js +0 -5
  129. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  130. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  131. package/dest/contract/deploy_sent_tx.js +0 -46
  132. package/dest/contract/sent_tx.d.ts +0 -50
  133. package/dest/contract/sent_tx.d.ts.map +0 -1
  134. package/dest/contract/sent_tx.js +0 -90
  135. package/src/account/interface.ts +0 -25
  136. package/src/contract/deploy_sent_tx.ts +0 -75
  137. package/src/contract/sent_tx.ts +0 -129
@@ -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,EAAE,WAAW,EAA6B,MAAM,iCAAiC,CAAC;AACzF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAGL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
@@ -6,6 +6,7 @@ import { Gas } from '@aztec/stdlib/gas';
6
6
  import { AbiDecodedSchema, optional, schemas, zodFor } from '@aztec/stdlib/schemas';
7
7
  import { Capsule, HashedValues, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult, inTxSchema } from '@aztec/stdlib/tx';
8
8
  import { z } from 'zod';
9
+ import { NO_WAIT } from '../contract/interaction_options.js';
9
10
  export const FunctionCallSchema = z.object({
10
11
  name: z.string(),
11
12
  to: schemas.AztecAddress,
@@ -41,11 +42,21 @@ export const WalletSimulationFeeOptionSchema = GasSettingsOptionSchema.extend({
41
42
  estimatedGasPadding: optional(z.number()),
42
43
  estimateGas: optional(z.boolean())
43
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
+ });
44
51
  export const SendOptionsSchema = z.object({
45
52
  from: schemas.AztecAddress,
46
53
  authWitnesses: optional(z.array(AuthWitness.schema)),
47
54
  capsules: optional(z.array(Capsule.schema)),
48
- fee: optional(GasSettingsOptionSchema)
55
+ fee: optional(GasSettingsOptionSchema),
56
+ wait: optional(z.union([
57
+ z.literal(NO_WAIT),
58
+ WaitOptsSchema
59
+ ]))
49
60
  });
50
61
  export const SimulateOptionsSchema = z.object({
51
62
  from: schemas.AztecAddress,
@@ -65,7 +76,6 @@ export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
65
76
  skipProofGeneration: optional(z.boolean())
66
77
  });
67
78
  export const MessageHashOrIntentSchema = z.union([
68
- schemas.Fr,
69
79
  z.object({
70
80
  consumer: schemas.AztecAddress,
71
81
  innerHash: schemas.Fr
@@ -102,6 +112,124 @@ export const ContractClassMetadataSchema = z.object({
102
112
  isArtifactRegistered: z.boolean(),
103
113
  isContractClassPubliclyRegistered: z.boolean()
104
114
  });
115
+ export const ContractFunctionPatternSchema = z.object({
116
+ contract: z.union([
117
+ schemas.AztecAddress,
118
+ z.literal('*')
119
+ ]),
120
+ function: z.union([
121
+ z.string(),
122
+ z.literal('*')
123
+ ])
124
+ });
125
+ export const AccountsCapabilitySchema = z.object({
126
+ type: z.literal('accounts'),
127
+ canGet: optional(z.boolean()),
128
+ canCreateAuthWit: optional(z.boolean())
129
+ });
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
+ });
105
233
  /**
106
234
  * Record of all wallet method schemas (excluding batch).
107
235
  * This is the single source of truth for method schemas - batch schemas are derived from this.
@@ -110,7 +238,6 @@ export const ContractClassMetadataSchema = z.object({
110
238
  chainId: schemas.Fr,
111
239
  version: schemas.Fr
112
240
  })),
113
- getTxReceipt: z.function().args(TxHash.schema).returns(TxReceipt.schema),
114
241
  getContractMetadata: z.function().args(schemas.AztecAddress).returns(ContractMetadataSchema),
115
242
  getContractClassMetadata: z.function().args(schemas.Fr).returns(ContractClassMetadataSchema),
116
243
  getPrivateEvents: z.function().args(EventMetadataDefinitionSchema, PrivateEventFilterSchema).returns(z.array(PrivateEventSchema)),
@@ -127,8 +254,12 @@ export const ContractClassMetadataSchema = z.object({
127
254
  simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
128
255
  simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema))).returns(UtilitySimulationResult.schema),
129
256
  profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
130
- sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
131
- createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema)
257
+ sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(z.union([
258
+ TxHash.schema,
259
+ TxReceipt.schema
260
+ ])),
261
+ createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
262
+ requestCapabilities: z.function().args(AppCapabilitiesSchema).returns(WalletCapabilitiesSchema)
132
263
  };
133
264
  /**
134
265
  * Creates batch schemas from the individual wallet methods.
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.f295ac2",
4
+ "version": "0.0.1-commit.fc805bf",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./abi": "./dest/api/abi.js",
@@ -85,20 +85,20 @@
85
85
  ]
86
86
  },
87
87
  "dependencies": {
88
- "@aztec/constants": "0.0.1-commit.f295ac2",
89
- "@aztec/entrypoints": "0.0.1-commit.f295ac2",
90
- "@aztec/ethereum": "0.0.1-commit.f295ac2",
91
- "@aztec/foundation": "0.0.1-commit.f295ac2",
92
- "@aztec/l1-artifacts": "0.0.1-commit.f295ac2",
93
- "@aztec/protocol-contracts": "0.0.1-commit.f295ac2",
94
- "@aztec/stdlib": "0.0.1-commit.f295ac2",
88
+ "@aztec/constants": "0.0.1-commit.fc805bf",
89
+ "@aztec/entrypoints": "0.0.1-commit.fc805bf",
90
+ "@aztec/ethereum": "0.0.1-commit.fc805bf",
91
+ "@aztec/foundation": "0.0.1-commit.fc805bf",
92
+ "@aztec/l1-artifacts": "0.0.1-commit.fc805bf",
93
+ "@aztec/protocol-contracts": "0.0.1-commit.fc805bf",
94
+ "@aztec/stdlib": "0.0.1-commit.fc805bf",
95
95
  "axios": "^1.12.0",
96
96
  "tslib": "^2.4.0",
97
97
  "viem": "npm:@aztec/viem@2.38.2",
98
98
  "zod": "^3.23.8"
99
99
  },
100
100
  "devDependencies": {
101
- "@aztec/builder": "0.0.1-commit.f295ac2",
101
+ "@aztec/builder": "0.0.1-commit.fc805bf",
102
102
  "@jest/globals": "^30.0.0",
103
103
  "@types/jest": "^30.0.0",
104
104
  "@types/node": "^22.15.17",
@@ -1,96 +1,72 @@
1
1
  import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
2
- import { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AuthWitnessProvider, ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
3
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';
4
6
  import type { GasSettings } from '@aztec/stdlib/gas';
5
7
  import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
6
8
 
7
9
  import { type CallIntent, type IntentInnerHash, computeAuthWitMessageHash } from '../utils/authwit.js';
8
- import type { AccountInterface } from './interface.js';
9
10
 
10
11
  /**
11
- * An authwit provider that can create both private and public authwits
12
- * with an intent as input, as opposed to just a precomputed inner hash
12
+ * Provides authorization for actions via the AuthWitness mechanism.
13
13
  */
14
- interface AuthwitnessIntentProvider {
14
+ export interface AuthorizationProvider {
15
15
  /**
16
- * Creates a private authwit from an intent or inner hash, to be provided
17
- * during function execution
16
+ * Creates an authentication witness from an inner hash with consumer, or a call intent
18
17
  * @param intent - The action (or inner hash) to authorize
18
+ * @param chainInfo - Chain information needed for message hash computation
19
19
  */
20
- createAuthWit(intent: IntentInnerHash | CallIntent | Buffer | Fr): Promise<AuthWitness>;
20
+ createAuthWit(intent: IntentInnerHash | CallIntent, chainInfo: ChainInfo): Promise<AuthWitness>;
21
21
  }
22
22
 
23
+ // docs:start:account-interface
23
24
  /**
24
- * A type defining an account, capable of both creating authwits and using them
25
- * to authenticate transaction execution requests.
25
+ * Minimal interface for transaction execution and authorization.
26
26
  */
27
- 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
28
35
 
29
36
  /**
30
37
  * An account implementation that uses authwits as an authentication mechanism
31
38
  * and can assemble transaction execution requests for an entrypoint.
32
39
  */
33
40
  export class BaseAccount implements Account {
34
- constructor(protected account: AccountInterface) {}
41
+ constructor(
42
+ private entrypoint: EntrypointInterface,
43
+ private authWitnessProvider: AuthWitnessProvider,
44
+ private completeAddress: CompleteAddress,
45
+ ) {}
35
46
 
36
47
  createTxExecutionRequest(
37
48
  exec: ExecutionPayload,
38
49
  gasSettings: GasSettings,
50
+ chainInfo: ChainInfo,
39
51
  options: DefaultAccountEntrypointOptions,
40
52
  ): Promise<TxExecutionRequest> {
41
- return this.account.createTxExecutionRequest(exec, gasSettings, options);
53
+ return this.entrypoint.createTxExecutionRequest(exec, gasSettings, chainInfo, options);
42
54
  }
43
55
 
44
- getChainId(): Fr {
45
- return this.account.getChainId();
56
+ wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload> {
57
+ return this.entrypoint.wrapExecutionPayload(exec, options);
46
58
  }
47
59
 
48
- getVersion(): Fr {
49
- 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);
50
63
  }
51
64
 
52
- /** Returns the complete address of the account that implements this wallet. */
53
- public getCompleteAddress() {
54
- return this.account.getCompleteAddress();
65
+ getCompleteAddress(): CompleteAddress {
66
+ return this.completeAddress;
55
67
  }
56
68
 
57
- /** Returns the address of the account that implements this wallet. */
58
- public getAddress() {
59
- return this.getCompleteAddress().address;
60
- }
61
-
62
- /**
63
- * Computes an authentication witness from either a message hash or an intent.
64
- *
65
- * If a message hash is provided, it will create a witness for the hash directly.
66
- * Otherwise, it will compute the message hash using the intent, along with the
67
- * chain id and the version values provided by the wallet.
68
- *
69
- * @param messageHashOrIntent - The message hash of the intent to approve
70
- * @returns The authentication witness
71
- */
72
- async createAuthWit(messageHashOrIntent: Fr | Buffer | CallIntent | IntentInnerHash): Promise<AuthWitness> {
73
- let messageHash: Fr;
74
- if (Buffer.isBuffer(messageHashOrIntent)) {
75
- messageHash = Fr.fromBuffer(messageHashOrIntent);
76
- } else if (messageHashOrIntent instanceof Fr) {
77
- messageHash = messageHashOrIntent;
78
- } else {
79
- messageHash = await this.getMessageHash(messageHashOrIntent);
80
- }
81
-
82
- return this.account.createAuthWit(messageHash);
83
- }
84
-
85
- /**
86
- * Returns the message hash for the given intent
87
- *
88
- * @param intent - A tuple of (consumer and inner hash) or (caller and action)
89
- * @returns The message hash
90
- */
91
- private getMessageHash(intent: IntentInnerHash | CallIntent): Promise<Fr> {
92
- const chainId = this.getChainId();
93
- const version = this.getVersion();
94
- return computeAuthWitMessageHash(intent, { chainId, version });
69
+ getAddress(): AztecAddress {
70
+ return this.completeAddress.address;
95
71
  }
96
72
  }
@@ -1,11 +1,11 @@
1
- import type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
1
+ import type { AuthWitnessProvider } from '@aztec/entrypoints/interfaces';
2
2
  import { Fr } from '@aztec/foundation/curves/bn254';
3
3
  import type { ContractArtifact } from '@aztec/stdlib/abi';
4
4
  import type { CompleteAddress } from '@aztec/stdlib/contract';
5
5
  import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
6
6
  import { deriveKeys } from '@aztec/stdlib/keys';
7
7
 
8
- import type { AccountInterface } from './interface.js';
8
+ import type { Account } from './account.js';
9
9
 
10
10
  /**
11
11
  * An account contract instance. Knows its artifact, deployment arguments, how to create
@@ -31,14 +31,13 @@ export interface AccountContract {
31
31
  >;
32
32
 
33
33
  /**
34
- * Returns the account interface for this account contract given an instance at the provided address.
35
- * The account interface is responsible for assembling tx requests given requested function calls, and
34
+ * Returns the account implementation for this account contract given an instance at the provided address.
35
+ * The account is responsible for assembling tx requests given requested function calls, and
36
36
  * for creating signed auth witnesses given action identifiers (message hashes).
37
37
  * @param address - Address of this account contract.
38
- * @param chainInfo - Chain id and version of the rollup where the account contract is initialized / published.
39
- * @returns An account interface instance for creating tx requests and authorizing actions.
38
+ * @returns An account instance for creating tx requests and authorizing actions.
40
39
  */
41
- getInterface(address: CompleteAddress, chainInfo: ChainInfo): AccountInterface;
40
+ getAccount(address: CompleteAddress): Account;
42
41
 
43
42
  /**
44
43
  * Returns the auth witness provider for the given address.
@@ -1,23 +1,48 @@
1
+ import type { ChainInfo } from '@aztec/entrypoints/interfaces';
1
2
  import type { Fr } from '@aztec/foundation/curves/bn254';
3
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
4
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
5
+ import type { CompleteAddress } from '@aztec/stdlib/contract';
6
+ import type { GasSettings } from '@aztec/stdlib/gas';
2
7
  import { computeAddressSecret, deriveMasterIncomingViewingSecretKey } from '@aztec/stdlib/keys';
8
+ import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
3
9
 
4
- import { BaseAccount } from './account.js';
5
- import type { Salt } from './index.js';
6
- import type { AccountInterface } from './interface.js';
10
+ import type { CallIntent, IntentInnerHash } from '../utils/authwit.js';
11
+ import type { Account, Salt } from './index.js';
7
12
 
8
13
  /**
9
- * Extends {@link Account} with the encryption private key. Not required for
14
+ * Extends {@link BaseAccount} with the encryption private key. Not required for
10
15
  * implementing the wallet interface but useful for testing purposes or exporting
11
16
  * an account to another pxe.
12
17
  */
13
- export class AccountWithSecretKey extends BaseAccount {
18
+ export class AccountWithSecretKey implements Account {
14
19
  constructor(
15
- account: AccountInterface,
20
+ private account: Account,
16
21
  private secretKey: Fr,
17
22
  /** Deployment salt for this account contract. */
18
23
  public readonly salt: Salt,
19
- ) {
20
- super(account);
24
+ ) {}
25
+
26
+ createTxExecutionRequest(
27
+ exec: ExecutionPayload,
28
+ gasSettings: GasSettings,
29
+ chainInfo: ChainInfo,
30
+ options?: any,
31
+ ): Promise<TxExecutionRequest> {
32
+ return this.account.createTxExecutionRequest(exec, gasSettings, chainInfo, options);
33
+ }
34
+
35
+ wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload> {
36
+ return this.account.wrapExecutionPayload(exec, options);
37
+ }
38
+ createAuthWit(intent: IntentInnerHash | CallIntent, chainInfo: ChainInfo): Promise<AuthWitness> {
39
+ return this.account.createAuthWit(intent, chainInfo);
40
+ }
41
+ getCompleteAddress(): CompleteAddress {
42
+ return this.account.getCompleteAddress();
43
+ }
44
+ getAddress(): AztecAddress {
45
+ return this.account.getAddress();
21
46
  }
22
47
 
23
48
  /** Returns the encryption private key associated with this account. */
@@ -6,7 +6,8 @@
6
6
  import type { Fr } from '@aztec/foundation/curves/bn254';
7
7
 
8
8
  export { type AccountContract, getAccountContractAddress } from './account_contract.js';
9
- export { type AccountInterface } from './interface.js';
9
+ export { type Account, BaseAccount, type AuthorizationProvider } from './account.js';
10
+ export { AccountWithSecretKey } from './account_with_secret_key.js';
10
11
 
11
12
  /** A contract deployment salt. */
12
13
  export type Salt = Fr | number | bigint;
@@ -15,20 +15,25 @@ import type { Account } from './account.js';
15
15
  */
16
16
  export class SignerlessAccount implements Account {
17
17
  private entrypoint: EntrypointInterface;
18
- constructor(chainInfo: ChainInfo) {
19
- this.entrypoint = new DefaultMultiCallEntrypoint(chainInfo.chainId.toNumber(), chainInfo.version.toNumber());
18
+
19
+ constructor() {
20
+ this.entrypoint = new DefaultMultiCallEntrypoint();
20
21
  }
21
22
 
22
- createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings): Promise<TxExecutionRequest> {
23
- return this.entrypoint.createTxExecutionRequest(exec, gasSettings);
23
+ createTxExecutionRequest(
24
+ exec: ExecutionPayload,
25
+ gasSettings: GasSettings,
26
+ chainInfo: ChainInfo,
27
+ ): Promise<TxExecutionRequest> {
28
+ return this.entrypoint.createTxExecutionRequest(exec, gasSettings, chainInfo);
24
29
  }
25
30
 
26
- getChainId(): Fr {
27
- throw new Error('SignerlessAccount: Method getChainId not implemented.');
31
+ wrapExecutionPayload(exec: ExecutionPayload, options?: any): Promise<ExecutionPayload> {
32
+ return this.entrypoint.wrapExecutionPayload(exec, options);
28
33
  }
29
34
 
30
- getVersion(): Fr {
31
- throw new Error('SignerlessAccount: Method getVersion not implemented.');
35
+ createAuthWit(_intent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness> {
36
+ throw new Error('SignerlessAccount: Method createAuthWit not implemented.');
32
37
  }
33
38
 
34
39
  getCompleteAddress(): CompleteAddress {
@@ -38,8 +43,4 @@ export class SignerlessAccount implements Account {
38
43
  getAddress(): AztecAddress {
39
44
  throw new Error('SignerlessAccount: Method getAddress not implemented.');
40
45
  }
41
-
42
- createAuthWit(_intent: Fr | Buffer | IntentInnerHash | CallIntent): Promise<AuthWitness> {
43
- throw new Error('SignerlessAccount: Method createAuthWit not implemented.');
44
- }
45
46
  }
@@ -1,7 +1,13 @@
1
- export { type AccountContract, type AccountInterface, type Salt, getAccountContractAddress } from '../account/index.js';
1
+ export {
2
+ type Account,
3
+ type AccountContract,
4
+ AccountWithSecretKey,
5
+ BaseAccount,
6
+ type AuthorizationProvider,
7
+ getAccountContractAddress,
8
+ type Salt,
9
+ } from '../account/index.js';
2
10
  export type { AuthWitnessProvider, ChainInfo } from '@aztec/entrypoints/interfaces';
3
11
  export { ChainInfoSchema } from '@aztec/entrypoints/interfaces';
4
12
 
5
- export { AccountWithSecretKey } from '../account/account_with_secret_key.js';
6
- export { type Account, BaseAccount } from '../account/account.js';
7
13
  export { SignerlessAccount } from '../account/signerless_account.js';
@@ -2,6 +2,7 @@ export { AuthWitness } from '@aztec/stdlib/auth-witness';
2
2
  export {
3
3
  SetPublicAuthwitContractInteraction,
4
4
  type ContractFunctionInteractionCallIntent,
5
+ isContractFunctionInteractionCallIntent,
5
6
  getMessageHashFromIntent,
6
7
  computeAuthWitMessageHash,
7
8
  computeInnerAuthWitHashFromAction,
package/src/api/block.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { Body, L2BlockNew } from '@aztec/stdlib/block';
1
+ export { Body, L2Block } from '@aztec/stdlib/block';
2
2
  export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
@@ -10,13 +10,21 @@
10
10
  * or can be queried via `simulate()`.
11
11
  *
12
12
  * ```ts
13
- * const contract = await Contract.deploy(wallet, MyContractArtifact, [...constructorArgs]).send().deployed();
13
+ * // Deploy and get the contract instance directly (default behavior)
14
+ * const contract = await Contract.deploy(wallet, MyContractArtifact, [...constructorArgs]).send({ from: accountAddress });
14
15
  * console.log(`Contract deployed at ${contract.address}`);
16
+ *
17
+ * // Or get the full receipt with contract and instance
18
+ * const receipt = await Contract.deploy(wallet, MyContractArtifact, [...constructorArgs]).send({
19
+ * from: accountAddress,
20
+ * wait: { returnReceipt: true }
21
+ * });
22
+ * console.log(`Contract deployed at ${receipt.contract.address}`);
15
23
  * ```
16
24
  *
17
25
  * ```ts
18
26
  * const contract = Contract.at(address, MyContractArtifact, wallet);
19
- * await contract.methods.mint(1000, owner).send().wait();
27
+ * await contract.methods.mint(1000, owner).send({ from: accountAddress });
20
28
  * console.log(`Total supply is now ${await contract.methods.totalSupply().simulate()}`);
21
29
  * ```
22
30
  *
@@ -25,9 +33,8 @@
25
33
  * a transaction to the network via the `send` method, but you can also `simulate` it without sending,
26
34
  * or obtaining the `request` for aggregating into a {@link BatchCall}.
27
35
  *
28
- * The result of `send`ing a transaction is a {@link SentTx} object, from which you can get the
29
- * transaction hash, or simply `wait` until the transaction is mined and the local PXE
30
- * has synchronized its changes.
36
+ * The `send` method returns a {@link TxReceipt} by default (waits for the transaction to be mined).
37
+ * If you pass `wait: NO_WAIT` in the options, it will return a {@link TxHash} immediately without waiting.
31
38
  *
32
39
  * @remarks If you are using typescript, consider using the
33
40
  * {@link https://docs.aztec.network/developers/aztec-nr/how_to_compile_contract#use-generated-interfaces | autogenerated type-safe interfaces}
@@ -39,27 +46,35 @@ export { Contract } from '../contract/contract.js';
39
46
  export { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
40
47
 
41
48
  export {
49
+ NO_WAIT,
50
+ type NoWait,
42
51
  type RequestInteractionOptions,
43
52
  type SendInteractionOptions,
44
53
  type ProfileInteractionOptions,
45
54
  type SimulateInteractionOptions,
46
55
  type InteractionFeeOptions,
56
+ type InteractionWaitOptions,
47
57
  type GasSettingsOption,
58
+ type SendReturn,
59
+ type SimulationReturn,
48
60
  toProfileOptions,
49
61
  toSendOptions,
50
62
  toSimulateOptions,
51
63
  } from '../contract/interaction_options.js';
52
64
 
53
- export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js';
65
+ export { DefaultWaitOpts, type WaitOpts } from '../contract/wait_opts.js';
54
66
  export { ContractBase, type ContractMethod, type ContractStorageLayout } from '../contract/contract_base.js';
55
67
  export { BatchCall } from '../contract/batch_call.js';
56
68
  export {
57
69
  type DeployOptions,
70
+ type DeployReturn,
71
+ type DeployTxReceipt,
72
+ type DeployWaitOptions,
73
+ type DeployInteractionWaitOptions,
58
74
  DeployMethod,
59
75
  type RequestDeployOptions,
60
76
  type SimulateDeployOptions,
61
77
  } from '../contract/deploy_method.js';
62
- export { DeploySentTx } from '../contract/deploy_sent_tx.js';
63
78
  export { waitForProven, type WaitForProvenOpts, DefaultWaitForProvenOpts } from '../contract/wait_for_proven.js';
64
79
  export { getGasLimits } from '../contract/get_gas_limits.js';
65
80
 
package/src/api/keys.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys';
2
2
  export {
3
- computeAppNullifierSecretKey,
3
+ computeAppNullifierHidingKey,
4
4
  deriveKeys,
5
5
  deriveMasterIncomingViewingSecretKey,
6
- deriveMasterNullifierSecretKey,
6
+ deriveMasterNullifierHidingKey,
7
7
  } from '@aztec/stdlib/keys';
8
8
  export { generatePublicKey } from '../utils/pub_key.js';