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

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 (165) 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 +18 -12
  25. package/dest/api/contract.d.ts.map +1 -1
  26. package/dest/api/contract.js +16 -10
  27. package/dest/api/deployment.d.ts +1 -2
  28. package/dest/api/deployment.d.ts.map +1 -1
  29. package/dest/api/deployment.js +0 -1
  30. package/dest/api/events.d.ts +10 -6
  31. package/dest/api/events.d.ts.map +1 -1
  32. package/dest/api/events.js +30 -20
  33. package/dest/api/fields.d.ts +2 -1
  34. package/dest/api/fields.d.ts.map +1 -1
  35. package/dest/api/fields.js +1 -0
  36. package/dest/api/keys.d.ts +1 -1
  37. package/dest/api/keys.js +1 -1
  38. package/dest/api/node.d.ts +8 -4
  39. package/dest/api/node.d.ts.map +1 -1
  40. package/dest/api/node.js +7 -3
  41. package/dest/api/tx.d.ts +2 -2
  42. package/dest/api/tx.d.ts.map +1 -1
  43. package/dest/api/tx.js +1 -1
  44. package/dest/api/wallet.d.ts +3 -2
  45. package/dest/api/wallet.d.ts.map +1 -1
  46. package/dest/api/wallet.js +2 -1
  47. package/dest/contract/base_contract_interaction.d.ts +8 -10
  48. package/dest/contract/base_contract_interaction.d.ts.map +1 -1
  49. package/dest/contract/base_contract_interaction.js +5 -17
  50. package/dest/contract/contract_function_interaction.d.ts +3 -12
  51. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  52. package/dest/contract/contract_function_interaction.js +6 -6
  53. package/dest/contract/deploy_method.d.ts +63 -16
  54. package/dest/contract/deploy_method.d.ts.map +1 -1
  55. package/dest/contract/deploy_method.js +36 -19
  56. package/dest/contract/interaction_options.d.ts +42 -5
  57. package/dest/contract/interaction_options.d.ts.map +1 -1
  58. package/dest/contract/interaction_options.js +8 -1
  59. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -10
  60. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  61. package/dest/contract/protocol_contracts/auth-registry.js +97 -467
  62. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -22
  63. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  64. package/dest/contract/protocol_contracts/contract-class-registry.js +2 -672
  65. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  66. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  67. package/dest/contract/protocol_contracts/contract-instance-registry.js +80 -482
  68. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  69. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  70. package/dest/contract/protocol_contracts/fee-juice.js +14 -412
  71. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +3 -3
  72. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  73. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +23 -14
  74. package/dest/contract/protocol_contracts/public-checks.d.ts +3 -3
  75. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  76. package/dest/contract/protocol_contracts/public-checks.js +23 -22
  77. package/dest/contract/wait_for_proven.js +1 -1
  78. package/dest/contract/wait_opts.d.ts +16 -0
  79. package/dest/contract/wait_opts.d.ts.map +1 -0
  80. package/dest/contract/wait_opts.js +5 -0
  81. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  82. package/dest/fee/private_fee_payment_method.js +10 -10
  83. package/dest/fee/public_fee_payment_method.js +10 -10
  84. package/dest/fee/sponsored_fee_payment.js +3 -3
  85. package/dest/utils/authwit.d.ts +8 -6
  86. package/dest/utils/authwit.d.ts.map +1 -1
  87. package/dest/utils/authwit.js +5 -9
  88. package/dest/utils/node.d.ts +12 -1
  89. package/dest/utils/node.d.ts.map +1 -1
  90. package/dest/utils/node.js +46 -0
  91. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +5 -8
  92. package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
  93. package/dest/wallet/account_entrypoint_meta_payment_method.js +28 -43
  94. package/dest/wallet/account_manager.d.ts +1 -7
  95. package/dest/wallet/account_manager.d.ts.map +1 -1
  96. package/dest/wallet/account_manager.js +5 -11
  97. package/dest/wallet/capabilities.d.ts +444 -0
  98. package/dest/wallet/capabilities.d.ts.map +1 -0
  99. package/dest/wallet/capabilities.js +3 -0
  100. package/dest/wallet/deploy_account_method.d.ts +34 -6
  101. package/dest/wallet/deploy_account_method.d.ts.map +1 -1
  102. package/dest/wallet/deploy_account_method.js +7 -5
  103. package/dest/wallet/index.d.ts +2 -1
  104. package/dest/wallet/index.d.ts.map +1 -1
  105. package/dest/wallet/index.js +1 -0
  106. package/dest/wallet/wallet.d.ts +1493 -94
  107. package/dest/wallet/wallet.d.ts.map +1 -1
  108. package/dest/wallet/wallet.js +158 -26
  109. package/package.json +19 -10
  110. package/src/account/account.ts +34 -58
  111. package/src/account/account_contract.ts +6 -7
  112. package/src/account/account_with_secret_key.ts +33 -8
  113. package/src/account/index.ts +2 -1
  114. package/src/account/signerless_account.ts +13 -12
  115. package/src/api/account.ts +9 -3
  116. package/src/api/authorization.ts +1 -0
  117. package/src/api/block.ts +1 -1
  118. package/src/api/contract.ts +24 -9
  119. package/src/api/deployment.ts +0 -1
  120. package/src/api/events.ts +35 -27
  121. package/src/api/fields.ts +1 -0
  122. package/src/api/keys.ts +2 -2
  123. package/src/api/node.ts +7 -3
  124. package/src/api/tx.ts +2 -0
  125. package/src/api/wallet.ts +47 -1
  126. package/src/contract/base_contract_interaction.ts +27 -15
  127. package/src/contract/contract_function_interaction.ts +13 -6
  128. package/src/contract/deploy_method.ts +115 -23
  129. package/src/contract/interaction_options.ts +49 -4
  130. package/src/contract/protocol_contracts/auth-registry.ts +45 -236
  131. package/src/contract/protocol_contracts/contract-class-registry.ts +1 -347
  132. package/src/contract/protocol_contracts/contract-instance-registry.ts +34 -233
  133. package/src/contract/protocol_contracts/fee-juice.ts +4 -202
  134. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +6 -12
  135. package/src/contract/protocol_contracts/public-checks.ts +6 -14
  136. package/src/contract/wait_for_proven.ts +1 -1
  137. package/src/contract/wait_opts.ts +21 -0
  138. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  139. package/src/fee/private_fee_payment_method.ts +7 -7
  140. package/src/fee/public_fee_payment_method.ts +8 -8
  141. package/src/fee/sponsored_fee_payment.ts +3 -3
  142. package/src/utils/authwit.ts +19 -7
  143. package/src/utils/node.ts +62 -0
  144. package/src/wallet/account_entrypoint_meta_payment_method.ts +28 -60
  145. package/src/wallet/account_manager.ts +5 -13
  146. package/src/wallet/capabilities.ts +491 -0
  147. package/src/wallet/deploy_account_method.ts +37 -13
  148. package/src/wallet/index.ts +1 -0
  149. package/src/wallet/wallet.ts +214 -48
  150. package/dest/account/interface.d.ts +0 -19
  151. package/dest/account/interface.d.ts.map +0 -1
  152. package/dest/account/interface.js +0 -5
  153. package/dest/contract/deploy_sent_tx.d.ts +0 -48
  154. package/dest/contract/deploy_sent_tx.d.ts.map +0 -1
  155. package/dest/contract/deploy_sent_tx.js +0 -46
  156. package/dest/contract/sent_tx.d.ts +0 -50
  157. package/dest/contract/sent_tx.d.ts.map +0 -1
  158. package/dest/contract/sent_tx.js +0 -90
  159. package/dest/deployment/broadcast_function.d.ts +0 -24
  160. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  161. package/dest/deployment/broadcast_function.js +0 -74
  162. package/src/account/interface.ts +0 -25
  163. package/src/contract/deploy_sent_tx.ts +0 -75
  164. package/src/contract/sent_tx.ts +0 -129
  165. package/src/deployment/broadcast_function.ts +0 -148
@@ -2,10 +2,11 @@ import type { FieldsOf } from '@aztec/foundation/types';
2
2
  import type { AuthWitness } from '@aztec/stdlib/auth-witness';
3
3
  import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import type { GasSettings } from '@aztec/stdlib/gas';
5
- import type { Capsule, OffchainEffect, SimulationStats } from '@aztec/stdlib/tx';
5
+ import type { Capsule, OffchainEffect, SimulationStats, TxHash, TxReceipt } from '@aztec/stdlib/tx';
6
6
 
7
7
  import type { FeePaymentMethod } from '../fee/fee_payment_method.js';
8
8
  import type { ProfileOptions, SendOptions, SimulateOptions } from '../wallet/index.js';
9
+ import type { WaitOpts } from './wait_opts.js';
9
10
 
10
11
  /**
11
12
  * Options used to tweak the simulation and add gas estimation capabilities
@@ -55,15 +56,47 @@ export type RequestInteractionOptions = {
55
56
  };
56
57
 
57
58
  /**
58
- * Represents options for calling a (constrained) function in a contract.
59
+ * Constant for explicitly not waiting for transaction confirmation.
60
+ * We use this instead of false to avoid confusion with falsy checks.
61
+ */
62
+ export const NO_WAIT = 'NO_WAIT' as const;
63
+
64
+ /**
65
+ * Type for the NO_WAIT constant.
66
+ */
67
+ export type NoWait = typeof NO_WAIT;
68
+
69
+ /**
70
+ * Type for wait options in interactions.
71
+ * - NO_WAIT symbol: Don't wait for confirmation, return TxHash immediately
72
+ * - WaitOpts object: Wait with custom options and return receipt/result
73
+ * - undefined: Wait with default options and return receipt/result
74
+ */
75
+ export type InteractionWaitOptions = NoWait | WaitOpts | undefined;
76
+
77
+ /**
78
+ * Base options for calling a (constrained) function in a contract, without wait parameter.
59
79
  */
60
- export type SendInteractionOptions = RequestInteractionOptions & {
80
+ export type SendInteractionOptionsWithoutWait = RequestInteractionOptions & {
61
81
  /** The sender's Aztec address. */
62
82
  from: AztecAddress;
63
83
  /** The fee options for the transaction. */
64
84
  fee?: InteractionFeeOptions;
65
85
  };
66
86
 
87
+ /**
88
+ * Represents options for calling a (constrained) function in a contract.
89
+ */
90
+ export type SendInteractionOptions<W extends InteractionWaitOptions = undefined> = SendInteractionOptionsWithoutWait & {
91
+ /**
92
+ * Whether to wait for the transaction to be mined.
93
+ * - undefined (default): wait with default options and return TxReceipt
94
+ * - WaitOpts object: wait with custom options and return TxReceipt
95
+ * - NO_WAIT: return txHash immediately without waiting
96
+ */
97
+ wait?: W;
98
+ };
99
+
67
100
  /**
68
101
  * Represents the options for simulating a contract function interaction.
69
102
  * Allows specifying the address from which the method should be called.
@@ -110,11 +143,22 @@ export type SimulationReturn<T extends boolean | undefined> = T extends true
110
143
  }
111
144
  : any;
112
145
 
146
+ /**
147
+ * Represents the result type of sending a transaction.
148
+ * If `wait` is NO_WAIT, returns TxHash immediately without waiting.
149
+ * If `wait` is undefined or WaitOpts, returns TReturn (defaults to TxReceipt) after waiting.
150
+ */
151
+ export type SendReturn<T extends InteractionWaitOptions, TReturn = TxReceipt> = T extends NoWait ? TxHash : TReturn;
152
+
113
153
  /**
114
154
  * Transforms and cleans up the higher level SendInteractionOptions defined by the interaction into
115
155
  * SendOptions, which are the ones that can be serialized and forwarded to the wallet
156
+ * @param options - The send interaction options with optional wait parameter
157
+ * @returns The send options to forward to the wallet
116
158
  */
117
- export function toSendOptions(options: SendInteractionOptions): SendOptions {
159
+ export function toSendOptions<W extends InteractionWaitOptions = undefined>(
160
+ options: SendInteractionOptions<W>,
161
+ ): SendOptions<W> {
118
162
  return {
119
163
  ...options,
120
164
  fee: {
@@ -126,6 +170,7 @@ export function toSendOptions(options: SendInteractionOptions): SendOptions {
126
170
  ...options.fee?.gasSettings,
127
171
  },
128
172
  },
173
+ wait: options.wait, // Pass through wait option
129
174
  };
130
175
  }
131
176
 
@@ -21,32 +21,38 @@ const AuthRegistryContractArtifact: ContractArtifact = {
21
21
  functions: [
22
22
  {
23
23
  ...{
24
- functionType: FunctionType.PRIVATE,
25
- name: 'set_authorized_private',
24
+ functionType: FunctionType.PUBLIC,
25
+ name: 'public_dispatch',
26
26
  isOnlySelf: false,
27
27
  isStatic: false,
28
28
  isInitializer: false,
29
- parameters: [
30
- {
31
- name: 'approver',
32
- type: {
33
- kind: 'struct',
34
- fields: [{ name: 'inner', type: { kind: 'field' } }],
35
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
36
- },
37
- visibility: 'private',
38
- },
39
- { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
40
- { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
41
- ],
29
+ parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
42
30
  returnTypes: [],
43
31
  errorTypes: {
44
- '2754040237334517471': { error_kind: 'fmtstring', length: 92, item_types: [] },
45
- '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
46
- '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
32
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
33
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
34
+ '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
35
+ '11691217184967371519': {
36
+ error_kind: 'string',
37
+ string: 'Function is_reject_all can only be called statically',
38
+ },
39
+ '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
40
+ '13455385521185560676': {
41
+ error_kind: 'string',
42
+ string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
43
+ },
44
+ '13929691561421487185': {
45
+ error_kind: 'string',
46
+ string: 'Function _set_authorized can only be called by the same contract',
47
+ },
47
48
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
48
49
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
49
50
  '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
51
+ '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
52
+ '17312933876399746100': {
53
+ error_kind: 'string',
54
+ string: 'Function is_consumable can only be called statically',
55
+ },
50
56
  },
51
57
  },
52
58
  bytecode: Buffer.from([]),
@@ -54,14 +60,14 @@ const AuthRegistryContractArtifact: ContractArtifact = {
54
60
  },
55
61
  {
56
62
  ...{
57
- functionType: FunctionType.UTILITY,
58
- name: 'utility_is_consumable',
63
+ functionType: FunctionType.PRIVATE,
64
+ name: 'set_authorized_private',
59
65
  isOnlySelf: false,
60
66
  isStatic: false,
61
67
  isInitializer: false,
62
68
  parameters: [
63
69
  {
64
- name: 'on_behalf_of',
70
+ name: 'approver',
65
71
  type: {
66
72
  kind: 'struct',
67
73
  fields: [{ name: 'inner', type: { kind: 'field' } }],
@@ -70,16 +76,14 @@ const AuthRegistryContractArtifact: ContractArtifact = {
70
76
  visibility: 'private',
71
77
  },
72
78
  { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
79
+ { name: 'authorize', type: { kind: 'boolean' }, visibility: 'private' },
73
80
  ],
74
- returnTypes: [{ kind: 'boolean' }],
81
+ returnTypes: [],
75
82
  errorTypes: {
76
- '13455385521185560676': {
77
- error_kind: 'string',
78
- string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
79
- },
83
+ '7555607922535724711': { error_kind: 'string', string: 'Preimage mismatch' },
84
+ '9894212961085021188': { error_kind: 'string', string: 'Message not authorized by account' },
80
85
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
81
86
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
82
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
83
87
  },
84
88
  },
85
89
  bytecode: Buffer.from([]),
@@ -88,221 +92,33 @@ const AuthRegistryContractArtifact: ContractArtifact = {
88
92
  {
89
93
  ...{
90
94
  functionType: FunctionType.UTILITY,
91
- name: 'process_message',
95
+ name: 'utility_is_consumable',
92
96
  isOnlySelf: false,
93
97
  isStatic: false,
94
98
  isInitializer: false,
95
99
  parameters: [
96
100
  {
97
- name: 'message_ciphertext',
98
- type: {
99
- kind: 'struct',
100
- fields: [
101
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
102
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
103
- ],
104
- path: 'std::collections::bounded_vec::BoundedVec',
105
- },
106
- visibility: 'private',
107
- },
108
- {
109
- name: 'message_context',
101
+ name: 'on_behalf_of',
110
102
  type: {
111
103
  kind: 'struct',
112
- fields: [
113
- { name: 'tx_hash', type: { kind: 'field' } },
114
- {
115
- name: 'unique_note_hashes_in_tx',
116
- type: {
117
- kind: 'struct',
118
- fields: [
119
- { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
120
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
121
- ],
122
- path: 'std::collections::bounded_vec::BoundedVec',
123
- },
124
- },
125
- { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
126
- {
127
- name: 'recipient',
128
- type: {
129
- kind: 'struct',
130
- fields: [{ name: 'inner', type: { kind: 'field' } }],
131
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
132
- },
133
- },
134
- ],
135
- path: 'aztec::messages::processing::message_context::MessageContext',
104
+ fields: [{ name: 'inner', type: { kind: 'field' } }],
105
+ path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
136
106
  },
137
107
  visibility: 'private',
138
108
  },
109
+ { name: 'message_hash', type: { kind: 'field' }, visibility: 'private' },
139
110
  ],
140
- returnTypes: [],
111
+ returnTypes: [{ kind: 'boolean' }],
141
112
  errorTypes: {
142
113
  '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
143
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
144
114
  '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
145
- '2967937905572420042': {
146
- error_kind: 'fmtstring',
147
- length: 61,
148
- item_types: [{ kind: 'field' }, { kind: 'field' }],
149
- },
150
- '3330370348214585450': {
151
- error_kind: 'fmtstring',
152
- length: 48,
153
- item_types: [{ kind: 'field' }, { kind: 'field' }],
154
- },
155
- '3670003311596808700': {
156
- error_kind: 'fmtstring',
157
- length: 77,
158
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
159
- },
160
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
161
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
162
- '9791669845391776238': {
163
- error_kind: 'string',
164
- string: '0 has a square root; you cannot claim it is not square',
165
- },
166
- '9885968605480832328': {
167
- error_kind: 'string',
168
- string: 'Attempted to read past the length of a CapsuleArray',
169
- },
170
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
171
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
172
- '11021520179822076911': {
173
- error_kind: 'string',
174
- string: 'Attempted to delete past the length of a CapsuleArray',
175
- },
176
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
177
- '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
178
- '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
179
- '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
180
- '13557316507370296400': {
181
- error_kind: 'fmtstring',
182
- length: 130,
183
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
184
- },
185
- '14938672389828944159': {
186
- error_kind: 'fmtstring',
187
- length: 146,
188
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
189
- },
190
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
191
- '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
192
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
193
- '17531474008201752295': {
194
- error_kind: 'fmtstring',
195
- length: 133,
196
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
197
- },
198
- },
199
- },
200
- bytecode: Buffer.from([]),
201
- debugSymbols: '',
202
- },
203
- {
204
- ...{
205
- functionType: FunctionType.PUBLIC,
206
- name: 'public_dispatch',
207
- isOnlySelf: false,
208
- isStatic: false,
209
- isInitializer: false,
210
- parameters: [{ name: 'selector', type: { kind: 'field' }, visibility: 'private' }],
211
- returnTypes: [],
212
- errorTypes: {
213
- '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
214
- '11691217184967371519': {
215
- error_kind: 'string',
216
- string: 'Function is_reject_all can only be called statically',
217
- },
218
- '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
219
115
  '13455385521185560676': {
220
116
  error_kind: 'string',
221
117
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
222
118
  },
223
- '13929691561421487185': {
224
- error_kind: 'string',
225
- string: 'Function _set_authorized can only be called by the same contract',
226
- },
227
119
  '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
228
120
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
229
121
  '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
230
- '17089945683942782951': { error_kind: 'string', string: 'unauthorized' },
231
- '17312933876399746100': {
232
- error_kind: 'string',
233
- string: 'Function is_consumable can only be called statically',
234
- },
235
- },
236
- },
237
- bytecode: Buffer.from([]),
238
- debugSymbols: '',
239
- },
240
- {
241
- ...{
242
- functionType: FunctionType.UTILITY,
243
- name: 'sync_private_state',
244
- isOnlySelf: false,
245
- isStatic: false,
246
- isInitializer: false,
247
- parameters: [],
248
- returnTypes: [],
249
- errorTypes: {
250
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
251
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
252
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
253
- '2967937905572420042': {
254
- error_kind: 'fmtstring',
255
- length: 61,
256
- item_types: [{ kind: 'field' }, { kind: 'field' }],
257
- },
258
- '3330370348214585450': {
259
- error_kind: 'fmtstring',
260
- length: 48,
261
- item_types: [{ kind: 'field' }, { kind: 'field' }],
262
- },
263
- '3670003311596808700': {
264
- error_kind: 'fmtstring',
265
- length: 77,
266
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
267
- },
268
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
269
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
270
- '9791669845391776238': {
271
- error_kind: 'string',
272
- string: '0 has a square root; you cannot claim it is not square',
273
- },
274
- '9885968605480832328': {
275
- error_kind: 'string',
276
- string: 'Attempted to read past the length of a CapsuleArray',
277
- },
278
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
279
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
280
- '11021520179822076911': {
281
- error_kind: 'string',
282
- string: 'Attempted to delete past the length of a CapsuleArray',
283
- },
284
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
285
- '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
286
- '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
287
- '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
288
- '13557316507370296400': {
289
- error_kind: 'fmtstring',
290
- length: 130,
291
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
292
- },
293
- '14938672389828944159': {
294
- error_kind: 'fmtstring',
295
- length: 146,
296
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
297
- },
298
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
299
- '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
300
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
301
- '17531474008201752295': {
302
- error_kind: 'fmtstring',
303
- length: 133,
304
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
305
- },
306
122
  },
307
123
  },
308
124
  bytecode: Buffer.from([]),
@@ -331,6 +147,8 @@ const AuthRegistryContractArtifact: ContractArtifact = {
331
147
  ],
332
148
  returnTypes: [],
333
149
  errorTypes: {
150
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
151
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
334
152
  '13455385521185560676': {
335
153
  error_kind: 'string',
336
154
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
@@ -364,6 +182,8 @@ const AuthRegistryContractArtifact: ContractArtifact = {
364
182
  ],
365
183
  returnTypes: [{ kind: 'field' }],
366
184
  errorTypes: {
185
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
186
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
367
187
  '5525725861591553972': { error_kind: 'string', string: 'rejecting all' },
368
188
  '13455385521185560676': {
369
189
  error_kind: 'string',
@@ -395,6 +215,8 @@ const AuthRegistryContractArtifact: ContractArtifact = {
395
215
  ],
396
216
  returnTypes: [{ kind: 'boolean' }],
397
217
  errorTypes: {
218
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
219
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
398
220
  '13455385521185560676': {
399
221
  error_kind: 'string',
400
222
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
@@ -450,6 +272,8 @@ const AuthRegistryContractArtifact: ContractArtifact = {
450
272
  ],
451
273
  returnTypes: [],
452
274
  errorTypes: {
275
+ '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
276
+ '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
453
277
  '13455385521185560676': {
454
278
  error_kind: 'string',
455
279
  string: 'Storage slot 0 not allowed. Storage slots must start from 1.',
@@ -502,18 +326,6 @@ export class AuthRegistryContract extends ContractBase {
502
326
  /** is_reject_all(on_behalf_of: struct) */
503
327
  is_reject_all: ((on_behalf_of: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
504
328
 
505
- /** process_message(message_ciphertext: struct, message_context: struct) */
506
- process_message: ((
507
- message_ciphertext: FieldLike[],
508
- message_context: {
509
- tx_hash: FieldLike;
510
- unique_note_hashes_in_tx: FieldLike[];
511
- first_nullifier_in_tx: FieldLike;
512
- recipient: AztecAddressLike;
513
- },
514
- ) => ContractFunctionInteraction) &
515
- Pick<ContractMethod, 'selector'>;
516
-
517
329
  /** public_dispatch(selector: field) */
518
330
  public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
519
331
 
@@ -532,9 +344,6 @@ export class AuthRegistryContract extends ContractBase {
532
344
  /** set_reject_all(reject: boolean) */
533
345
  set_reject_all: ((reject: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
534
346
 
535
- /** sync_private_state() */
536
- sync_private_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
537
-
538
347
  /** utility_is_consumable(on_behalf_of: struct, message_hash: field) */
539
348
  utility_is_consumable: ((on_behalf_of: AztecAddressLike, message_hash: FieldLike) => ContractFunctionInteraction) &
540
349
  Pick<ContractMethod, 'selector'>;