@aztec/aztec.js 0.0.1-commit.96dac018d → 0.0.1-commit.993d52e

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 (31) hide show
  1. package/dest/contract/deploy_method.d.ts +4 -16
  2. package/dest/contract/deploy_method.d.ts.map +1 -1
  3. package/dest/contract/deploy_method.js +6 -14
  4. package/dest/contract/interaction_options.d.ts +1 -8
  5. package/dest/contract/interaction_options.d.ts.map +1 -1
  6. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -10
  7. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  8. package/dest/contract/protocol_contracts/auth-registry.js +59 -498
  9. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  10. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  11. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +0 -8
  12. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  13. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  14. package/dest/contract/protocol_contracts/public-checks.js +0 -8
  15. package/dest/wallet/capabilities.d.ts +1 -9
  16. package/dest/wallet/capabilities.d.ts.map +1 -1
  17. package/dest/wallet/deploy_account_method.d.ts +4 -15
  18. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  19. package/dest/wallet/deploy_account_method.js +0 -26
  20. package/dest/wallet/wallet.d.ts +1 -139
  21. package/dest/wallet/wallet.d.ts.map +1 -1
  22. package/dest/wallet/wallet.js +3 -9
  23. package/package.json +10 -10
  24. package/src/contract/deploy_method.ts +9 -26
  25. package/src/contract/interaction_options.ts +0 -7
  26. package/src/contract/protocol_contracts/auth-registry.ts +37 -237
  27. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +0 -2
  28. package/src/contract/protocol_contracts/public-checks.ts +0 -2
  29. package/src/wallet/capabilities.ts +0 -9
  30. package/src/wallet/deploy_account_method.ts +2 -39
  31. package/src/wallet/wallet.ts +0 -3
@@ -9,22 +9,15 @@ import type { Account } from '../account/account.js';
9
9
  import type { Contract } from '../contract/contract.js';
10
10
  import type { ContractBase } from '../contract/contract_base.js';
11
11
  import {
12
- type DeployInteractionWaitOptions,
13
12
  DeployMethod,
14
- type DeployOptions,
15
13
  type DeployOptionsWithoutWait,
16
14
  type RequestDeployOptions,
17
15
  type SimulateDeployOptions,
18
16
  } from '../contract/deploy_method.js';
19
- import type {
20
- FeePaymentMethodOption,
21
- InteractionWaitOptions,
22
- ProfileInteractionOptions,
23
- } from '../contract/interaction_options.js';
24
- import type { WaitOpts } from '../contract/wait_opts.js';
17
+ import type { FeePaymentMethodOption, InteractionWaitOptions } from '../contract/interaction_options.js';
25
18
  import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
26
19
  import { AccountEntrypointMetaPaymentMethod } from './account_entrypoint_meta_payment_method.js';
27
- import type { ProfileOptions, SendOptions, SimulateOptions, Wallet } from './index.js';
20
+ import type { Wallet } from './index.js';
28
21
 
29
22
  /**
30
23
  * Extended fee payment method option for account deployments that includes entrypoint wrapping options
@@ -154,34 +147,4 @@ export class DeployAccountMethod<TContract extends ContractBase = Contract> exte
154
147
  deployer: options.from,
155
148
  };
156
149
  }
157
-
158
- protected override convertDeployOptionsToSendOptions<W extends DeployInteractionWaitOptions>(
159
- options: DeployOptions<W>,
160
- // eslint-disable-next-line jsdoc/require-jsdoc
161
- ): SendOptions<W extends { returnReceipt: true } ? WaitOpts : W> {
162
- return super.convertDeployOptionsToSendOptions(this.injectContractAddressIntoScopes(options));
163
- }
164
-
165
- protected override convertDeployOptionsToSimulateOptions(options: SimulateDeployOptions): SimulateOptions {
166
- return super.convertDeployOptionsToSimulateOptions(this.injectContractAddressIntoScopes(options));
167
- }
168
-
169
- protected override convertDeployOptionsToProfileOptions(
170
- options: DeployOptionsWithoutWait & ProfileInteractionOptions,
171
- ): ProfileOptions {
172
- return super.convertDeployOptionsToProfileOptions(this.injectContractAddressIntoScopes(options));
173
- }
174
-
175
- /**
176
- * Injects the contract's own address into scopes so the constructor can access its own keys.
177
- * @param options - The deploy options to augment with the contract address.
178
- */
179
- // eslint-disable-next-line jsdoc/require-jsdoc
180
- private injectContractAddressIntoScopes<T extends { additionalScopes?: AztecAddress[] }>(options: T): T {
181
- if (!this.address) {
182
- throw new Error('Instance not yet constructed. This is a bug!');
183
- }
184
- const existing = options.additionalScopes ?? [];
185
- return { ...options, additionalScopes: [...existing, this.address] };
186
- }
187
150
  }
@@ -303,7 +303,6 @@ export const SendOptionsSchema = z.object({
303
303
  capsules: optional(z.array(Capsule.schema)),
304
304
  fee: optional(GasSettingsOptionSchema),
305
305
  wait: optional(z.union([z.literal(NO_WAIT), WaitOptsSchema])),
306
- additionalScopes: optional(z.array(schemas.AztecAddress)),
307
306
  });
308
307
 
309
308
  export const SimulateOptionsSchema = z.object({
@@ -314,7 +313,6 @@ export const SimulateOptionsSchema = z.object({
314
313
  skipTxValidation: optional(z.boolean()),
315
314
  skipFeeEnforcement: optional(z.boolean()),
316
315
  includeMetadata: optional(z.boolean()),
317
- additionalScopes: optional(z.array(schemas.AztecAddress)),
318
316
  });
319
317
 
320
318
  export const ProfileOptionsSchema = SimulateOptionsSchema.extend({
@@ -381,7 +379,6 @@ export const ContractClassMetadataSchema = z.object({
381
379
  export const ContractFunctionPatternSchema = z.object({
382
380
  contract: z.union([schemas.AztecAddress, z.literal('*')]),
383
381
  function: z.union([z.string(), z.literal('*')]),
384
- additionalScopes: optional(z.union([z.array(schemas.AztecAddress), z.literal('*')])),
385
382
  });
386
383
 
387
384
  export const AccountsCapabilitySchema = z.object({