@aztec/aztec.js 0.0.1-commit.e6bd8901 → 0.0.1-commit.ee80a48

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 (44) hide show
  1. package/dest/api/keys.d.ts +1 -1
  2. package/dest/api/keys.js +1 -1
  3. package/dest/api/wallet.d.ts +3 -2
  4. package/dest/api/wallet.d.ts.map +1 -1
  5. package/dest/api/wallet.js +2 -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 +61 -466
  9. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -11
  10. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  11. package/dest/contract/protocol_contracts/contract-class-registry.js +10 -409
  12. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  13. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  14. package/dest/contract/protocol_contracts/contract-instance-registry.js +80 -473
  15. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  16. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  17. package/dest/contract/protocol_contracts/fee-juice.js +0 -401
  18. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  19. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  20. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +12 -0
  21. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  22. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  23. package/dest/contract/protocol_contracts/public-checks.js +12 -8
  24. package/dest/wallet/capabilities.d.ts +444 -0
  25. package/dest/wallet/capabilities.d.ts.map +1 -0
  26. package/dest/wallet/capabilities.js +3 -0
  27. package/dest/wallet/index.d.ts +2 -1
  28. package/dest/wallet/index.d.ts.map +1 -1
  29. package/dest/wallet/index.js +1 -0
  30. package/dest/wallet/wallet.d.ts +1307 -14
  31. package/dest/wallet/wallet.d.ts.map +1 -1
  32. package/dest/wallet/wallet.js +120 -1
  33. package/package.json +9 -9
  34. package/src/api/keys.ts +2 -2
  35. package/src/api/wallet.ts +38 -0
  36. package/src/contract/protocol_contracts/auth-registry.ts +37 -231
  37. package/src/contract/protocol_contracts/contract-class-registry.ts +3 -195
  38. package/src/contract/protocol_contracts/contract-instance-registry.ts +34 -225
  39. package/src/contract/protocol_contracts/fee-juice.ts +0 -193
  40. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +3 -0
  41. package/src/contract/protocol_contracts/public-checks.ts +3 -2
  42. package/src/wallet/capabilities.ts +491 -0
  43. package/src/wallet/index.ts +1 -0
  44. package/src/wallet/wallet.ts +117 -1
@@ -44,7 +44,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
44
44
  errorTypes: {
45
45
  '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
46
46
  '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
47
- '2754040237334517471': { error_kind: 'fmtstring', length: 92, item_types: [] },
48
47
  '6609888949476313245': { error_kind: 'string', string: 'Message not in state' },
49
48
  '11019205087382408538': { error_kind: 'string', string: 'Field failed to decompose into specified 4 limbs' },
50
49
  '12370419938245003393': { error_kind: 'string', string: 'Field failed to decompose into specified 36 limbs' },
@@ -94,112 +93,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
94
93
  bytecode: Buffer.from([]),
95
94
  debugSymbols: '',
96
95
  },
97
- {
98
- ...{
99
- functionType: FunctionType.UTILITY,
100
- name: 'process_message',
101
- isOnlySelf: false,
102
- isStatic: false,
103
- isInitializer: false,
104
- parameters: [
105
- {
106
- name: 'message_ciphertext',
107
- type: {
108
- kind: 'struct',
109
- fields: [
110
- { name: 'storage', type: { kind: 'array', length: 17, type: { kind: 'field' } } },
111
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
112
- ],
113
- path: 'std::collections::bounded_vec::BoundedVec',
114
- },
115
- visibility: 'private',
116
- },
117
- {
118
- name: 'message_context',
119
- type: {
120
- kind: 'struct',
121
- fields: [
122
- { name: 'tx_hash', type: { kind: 'field' } },
123
- {
124
- name: 'unique_note_hashes_in_tx',
125
- type: {
126
- kind: 'struct',
127
- fields: [
128
- { name: 'storage', type: { kind: 'array', length: 64, type: { kind: 'field' } } },
129
- { name: 'len', type: { kind: 'integer', sign: 'unsigned', width: 32 } },
130
- ],
131
- path: 'std::collections::bounded_vec::BoundedVec',
132
- },
133
- },
134
- { name: 'first_nullifier_in_tx', type: { kind: 'field' } },
135
- {
136
- name: 'recipient',
137
- type: {
138
- kind: 'struct',
139
- fields: [{ name: 'inner', type: { kind: 'field' } }],
140
- path: 'aztec::protocol_types::address::aztec_address::AztecAddress',
141
- },
142
- },
143
- ],
144
- path: 'aztec::messages::processing::message_context::MessageContext',
145
- },
146
- visibility: 'private',
147
- },
148
- ],
149
- returnTypes: [],
150
- errorTypes: {
151
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
152
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
153
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
154
- '2967937905572420042': {
155
- error_kind: 'fmtstring',
156
- length: 61,
157
- item_types: [{ kind: 'field' }, { kind: 'field' }],
158
- },
159
- '3330370348214585450': {
160
- error_kind: 'fmtstring',
161
- length: 48,
162
- item_types: [{ kind: 'field' }, { kind: 'field' }],
163
- },
164
- '3670003311596808700': {
165
- error_kind: 'fmtstring',
166
- length: 77,
167
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
168
- },
169
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
170
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
171
- '9791669845391776238': {
172
- error_kind: 'string',
173
- string: '0 has a square root; you cannot claim it is not square',
174
- },
175
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
176
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
177
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, 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
96
  {
204
97
  ...{
205
98
  functionType: FunctionType.PUBLIC,
@@ -238,77 +131,6 @@ const FeeJuiceContractArtifact: ContractArtifact = {
238
131
  bytecode: Buffer.from([]),
239
132
  debugSymbols: '',
240
133
  },
241
- {
242
- ...{
243
- functionType: FunctionType.UTILITY,
244
- name: 'sync_state',
245
- isOnlySelf: false,
246
- isStatic: false,
247
- isInitializer: false,
248
- parameters: [],
249
- returnTypes: [],
250
- errorTypes: {
251
- '361444214588792908': { error_kind: 'string', string: 'attempt to multiply with overflow' },
252
- '992401946138144806': { error_kind: 'string', string: 'Attempted to read past end of BoundedVec' },
253
- '1998584279744703196': { error_kind: 'string', string: 'attempt to subtract with overflow' },
254
- '2967937905572420042': {
255
- error_kind: 'fmtstring',
256
- length: 61,
257
- item_types: [{ kind: 'field' }, { kind: 'field' }],
258
- },
259
- '3330370348214585450': {
260
- error_kind: 'fmtstring',
261
- length: 48,
262
- item_types: [{ kind: 'field' }, { kind: 'field' }],
263
- },
264
- '3670003311596808700': {
265
- error_kind: 'fmtstring',
266
- length: 77,
267
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
268
- },
269
- '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
270
- '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
271
- '9791669845391776238': {
272
- error_kind: 'string',
273
- string: '0 has a square root; you cannot claim it is not square',
274
- },
275
- '9885968605480832328': {
276
- error_kind: 'string',
277
- string: 'Attempted to read past the length of a CapsuleArray',
278
- },
279
- '10135509984888824963': { error_kind: 'fmtstring', length: 58, item_types: [{ kind: 'field' }] },
280
- '10791800398362570014': { error_kind: 'string', string: 'extend_from_bounded_vec out of bounds' },
281
- '11021520179822076911': {
282
- error_kind: 'string',
283
- string: 'Attempted to delete past the length of a CapsuleArray',
284
- },
285
- '11692359521570349358': { error_kind: 'fmtstring', length: 40, item_types: [] },
286
- '12327971061804302172': { error_kind: 'fmtstring', length: 98, item_types: [] },
287
- '12469291177396340830': { error_kind: 'string', string: 'call to assert_max_bit_size' },
288
- '12913276134398371456': { error_kind: 'string', string: 'push out of bounds' },
289
- '13557316507370296400': {
290
- error_kind: 'fmtstring',
291
- length: 130,
292
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
293
- },
294
- '14938672389828944159': {
295
- error_kind: 'fmtstring',
296
- length: 146,
297
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
298
- },
299
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
300
- '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
301
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
302
- '17531474008201752295': {
303
- error_kind: 'fmtstring',
304
- length: 133,
305
- item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
306
- },
307
- },
308
- },
309
- bytecode: Buffer.from([]),
310
- debugSymbols: '',
311
- },
312
134
  ],
313
135
  nonDispatchPublicFunctions: [
314
136
  {
@@ -436,22 +258,7 @@ export class FeeJuiceContract extends ContractBase {
436
258
  ) => ContractFunctionInteraction) &
437
259
  Pick<ContractMethod, 'selector'>;
438
260
 
439
- /** process_message(message_ciphertext: struct, message_context: struct) */
440
- process_message: ((
441
- message_ciphertext: FieldLike[],
442
- message_context: {
443
- tx_hash: FieldLike;
444
- unique_note_hashes_in_tx: FieldLike[];
445
- first_nullifier_in_tx: FieldLike;
446
- recipient: AztecAddressLike;
447
- },
448
- ) => ContractFunctionInteraction) &
449
- Pick<ContractMethod, 'selector'>;
450
-
451
261
  /** public_dispatch(selector: field) */
452
262
  public_dispatch: ((selector: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
453
-
454
- /** sync_state() */
455
- sync_state: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
456
263
  };
457
264
  }
@@ -160,6 +160,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
160
160
  },
161
161
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
162
162
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
163
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
163
164
  '9791669845391776238': {
164
165
  error_kind: 'string',
165
166
  string: '0 has a square root; you cannot claim it is not square',
@@ -222,6 +223,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
222
223
  },
223
224
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
224
225
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
226
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
225
227
  '9791669845391776238': {
226
228
  error_kind: 'string',
227
229
  string: '0 has a square root; you cannot claim it is not square',
@@ -258,6 +260,7 @@ const MultiCallEntrypointContractArtifact: ContractArtifact = {
258
260
  length: 133,
259
261
  item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
260
262
  },
263
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
261
264
  },
262
265
  },
263
266
  bytecode: Buffer.from([]),
@@ -93,6 +93,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
93
93
  },
94
94
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
95
95
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
96
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
96
97
  '9791669845391776238': {
97
98
  error_kind: 'string',
98
99
  string: '0 has a square root; you cannot claim it is not square',
@@ -146,10 +147,8 @@ const PublicChecksContractArtifact: ContractArtifact = {
146
147
  },
147
148
  '12511970388699677811': { error_kind: 'fmtstring', length: 27, item_types: [{ kind: 'field' }] },
148
149
  '13950240626967988787': { error_kind: 'string', string: 'Timestamp mismatch.' },
149
- '14990209321349310352': { error_kind: 'string', string: 'attempt to add with overflow' },
150
150
  '15015303112667403944': { error_kind: 'fmtstring', length: 17, item_types: [] },
151
151
  '15764276373176857197': { error_kind: 'string', string: 'Stack too deep' },
152
- '16431471497789672479': { error_kind: 'string', string: 'Index out of bounds' },
153
152
  },
154
153
  },
155
154
  bytecode: Buffer.from([]),
@@ -185,6 +184,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
185
184
  },
186
185
  '4261968856572588300': { error_kind: 'string', string: 'Value does not fit in field' },
187
186
  '4440399188109668273': { error_kind: 'string', string: 'Input length must be a multiple of 32' },
187
+ '9530675838293881722': { error_kind: 'string', string: 'Writer did not write all data' },
188
188
  '9791669845391776238': {
189
189
  error_kind: 'string',
190
190
  string: '0 has a square root; you cannot claim it is not square',
@@ -221,6 +221,7 @@ const PublicChecksContractArtifact: ContractArtifact = {
221
221
  length: 133,
222
222
  item_types: [{ kind: 'integer', sign: 'unsigned', width: 32 }],
223
223
  },
224
+ '17655676068928457687': { error_kind: 'string', string: 'Reader did not read all data' },
224
225
  },
225
226
  },
226
227
  bytecode: Buffer.from([]),