@aztec/aztec.js 0.0.1-commit.c80b6263 → 0.0.1-commit.cd76b27

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 (79) hide show
  1. package/dest/api/contract.d.ts +2 -2
  2. package/dest/api/contract.js +2 -2
  3. package/dest/api/deployment.d.ts +1 -2
  4. package/dest/api/deployment.d.ts.map +1 -1
  5. package/dest/api/deployment.js +0 -1
  6. package/dest/api/events.d.ts +10 -6
  7. package/dest/api/events.d.ts.map +1 -1
  8. package/dest/api/events.js +30 -20
  9. package/dest/api/fields.d.ts +2 -1
  10. package/dest/api/fields.d.ts.map +1 -1
  11. package/dest/api/fields.js +1 -0
  12. package/dest/api/keys.d.ts +1 -1
  13. package/dest/api/keys.js +1 -1
  14. package/dest/api/wallet.d.ts +3 -2
  15. package/dest/api/wallet.d.ts.map +1 -1
  16. package/dest/api/wallet.js +2 -1
  17. package/dest/contract/batch_call.d.ts +3 -3
  18. package/dest/contract/batch_call.d.ts.map +1 -1
  19. package/dest/contract/batch_call.js +8 -5
  20. package/dest/contract/contract_function_interaction.d.ts +3 -12
  21. package/dest/contract/contract_function_interaction.d.ts.map +1 -1
  22. package/dest/contract/contract_function_interaction.js +10 -7
  23. package/dest/contract/protocol_contracts/auth-registry.d.ts +1 -1
  24. package/dest/contract/protocol_contracts/auth-registry.d.ts.map +1 -1
  25. package/dest/contract/protocol_contracts/auth-registry.js +32 -6
  26. package/dest/contract/protocol_contracts/contract-class-registry.d.ts +2 -22
  27. package/dest/contract/protocol_contracts/contract-class-registry.d.ts.map +1 -1
  28. package/dest/contract/protocol_contracts/contract-class-registry.js +13 -658
  29. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts +2 -11
  30. package/dest/contract/protocol_contracts/contract-instance-registry.d.ts.map +1 -1
  31. package/dest/contract/protocol_contracts/contract-instance-registry.js +76 -473
  32. package/dest/contract/protocol_contracts/fee-juice.d.ts +1 -10
  33. package/dest/contract/protocol_contracts/fee-juice.d.ts.map +1 -1
  34. package/dest/contract/protocol_contracts/fee-juice.js +0 -401
  35. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts +1 -1
  36. package/dest/contract/protocol_contracts/multi-call-entrypoint.d.ts.map +1 -1
  37. package/dest/contract/protocol_contracts/multi-call-entrypoint.js +23 -1
  38. package/dest/contract/protocol_contracts/public-checks.d.ts +1 -1
  39. package/dest/contract/protocol_contracts/public-checks.d.ts.map +1 -1
  40. package/dest/contract/protocol_contracts/public-checks.js +23 -9
  41. package/dest/fee/fee_juice_payment_method_with_claim.js +6 -6
  42. package/dest/fee/private_fee_payment_method.js +10 -10
  43. package/dest/fee/public_fee_payment_method.js +10 -10
  44. package/dest/fee/sponsored_fee_payment.js +3 -3
  45. package/dest/wallet/capabilities.d.ts +444 -0
  46. package/dest/wallet/capabilities.d.ts.map +1 -0
  47. package/dest/wallet/capabilities.js +3 -0
  48. package/dest/wallet/index.d.ts +2 -1
  49. package/dest/wallet/index.d.ts.map +1 -1
  50. package/dest/wallet/index.js +1 -0
  51. package/dest/wallet/wallet.d.ts +1452 -89
  52. package/dest/wallet/wallet.d.ts.map +1 -1
  53. package/dest/wallet/wallet.js +146 -23
  54. package/package.json +19 -10
  55. package/src/api/contract.ts +2 -2
  56. package/src/api/deployment.ts +0 -1
  57. package/src/api/events.ts +35 -27
  58. package/src/api/fields.ts +1 -0
  59. package/src/api/keys.ts +2 -2
  60. package/src/api/wallet.ts +43 -1
  61. package/src/contract/batch_call.ts +7 -12
  62. package/src/contract/contract_function_interaction.ts +17 -7
  63. package/src/contract/protocol_contracts/auth-registry.ts +6 -2
  64. package/src/contract/protocol_contracts/contract-class-registry.ts +4 -338
  65. package/src/contract/protocol_contracts/contract-instance-registry.ts +33 -225
  66. package/src/contract/protocol_contracts/fee-juice.ts +0 -193
  67. package/src/contract/protocol_contracts/multi-call-entrypoint.ts +4 -1
  68. package/src/contract/protocol_contracts/public-checks.ts +4 -3
  69. package/src/fee/fee_juice_payment_method_with_claim.ts +5 -5
  70. package/src/fee/private_fee_payment_method.ts +7 -7
  71. package/src/fee/public_fee_payment_method.ts +8 -8
  72. package/src/fee/sponsored_fee_payment.ts +3 -3
  73. package/src/wallet/capabilities.ts +491 -0
  74. package/src/wallet/index.ts +1 -0
  75. package/src/wallet/wallet.ts +201 -38
  76. package/dest/deployment/broadcast_function.d.ts +0 -24
  77. package/dest/deployment/broadcast_function.d.ts.map +0 -1
  78. package/dest/deployment/broadcast_function.js +0 -74
  79. package/src/deployment/broadcast_function.ts +0 -148
@@ -1,5 +1,5 @@
1
1
  import { Fr } from '@aztec/foundation/curves/bn254';
2
- import { FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
2
+ import { FunctionCall, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
3
3
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
4
4
  import { ExecutionPayload } from '@aztec/stdlib/tx';
5
5
  import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
@@ -79,26 +79,26 @@ import { SetPublicAuthwitContractInteraction } from '../utils/authwit.js';
79
79
  const maxFee = this.gasSettings.getFeeLimit();
80
80
  const intent = {
81
81
  caller: this.paymentContract,
82
- call: {
82
+ call: FunctionCall.from({
83
83
  name: 'transfer_in_public',
84
+ to: await this.getAsset(),
85
+ selector: await FunctionSelector.fromSignature('transfer_in_public((Field),(Field),u128,Field)'),
86
+ type: FunctionType.PUBLIC,
87
+ hideMsgSender: false,
88
+ isStatic: false,
84
89
  args: [
85
90
  this.sender.toField(),
86
91
  this.paymentContract.toField(),
87
92
  maxFee,
88
93
  txNonce
89
94
  ],
90
- selector: await FunctionSelector.fromSignature('transfer_in_public((Field),(Field),u128,Field)'),
91
- type: FunctionType.PUBLIC,
92
- isStatic: false,
93
- hideMsgSender: false,
94
- to: await this.getAsset(),
95
95
  returnTypes: []
96
- }
96
+ })
97
97
  };
98
98
  const setPublicAuthWitInteraction = await SetPublicAuthwitContractInteraction.create(this.wallet, this.sender, intent, true);
99
99
  return new ExecutionPayload([
100
100
  ...(await setPublicAuthWitInteraction.request()).calls,
101
- {
101
+ FunctionCall.from({
102
102
  name: 'fee_entrypoint_public',
103
103
  to: this.paymentContract,
104
104
  selector: await FunctionSelector.fromSignature('fee_entrypoint_public(u128,Field)'),
@@ -110,7 +110,7 @@ import { SetPublicAuthwitContractInteraction } from '../utils/authwit.js';
110
110
  txNonce
111
111
  ],
112
112
  returnTypes: []
113
- }
113
+ })
114
114
  ], [], [], [], this.paymentContract);
115
115
  }
116
116
  getGasSettings() {
@@ -1,4 +1,4 @@
1
- import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
1
+ import { FunctionCall, FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
2
2
  import { ExecutionPayload } from '@aztec/stdlib/tx';
3
3
  /**
4
4
  * A fee payment method that uses a contract that blindly sponsors transactions.
@@ -16,7 +16,7 @@ import { ExecutionPayload } from '@aztec/stdlib/tx';
16
16
  }
17
17
  async getExecutionPayload() {
18
18
  return new ExecutionPayload([
19
- {
19
+ FunctionCall.from({
20
20
  name: 'sponsor_unconditionally',
21
21
  to: this.paymentContract,
22
22
  selector: await FunctionSelector.fromSignature('sponsor_unconditionally()'),
@@ -25,7 +25,7 @@ import { ExecutionPayload } from '@aztec/stdlib/tx';
25
25
  isStatic: false,
26
26
  args: [],
27
27
  returnTypes: []
28
- }
28
+ })
29
29
  ], [], [], [], this.paymentContract);
30
30
  }
31
31
  getGasSettings() {
@@ -0,0 +1,444 @@
1
+ import type { Fr } from '@aztec/foundation/curves/bn254';
2
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
3
+ import type { Aliased } from './wallet.js';
4
+ /**
5
+ * Current capability manifest version.
6
+ */
7
+ export declare const CAPABILITY_VERSION: "1.0";
8
+ /**
9
+ * Pattern for matching contract functions with wildcards.
10
+ *
11
+ * Used in simulation and transaction capabilities to specify which
12
+ * contract functions are allowed.
13
+ *
14
+ * @example
15
+ * // Allow any function on a specific contract
16
+ * \{ contract: ammAddress, function: '*' \}
17
+ *
18
+ * @example
19
+ * // Allow only 'swap' function on a specific contract
20
+ * \{ contract: ammAddress, function: 'swap' \}
21
+ *
22
+ * @example
23
+ * // Allow 'transfer' on any contract
24
+ * \{ contract: '*', function: 'transfer' \}
25
+ */
26
+ export interface ContractFunctionPattern {
27
+ /** Contract address or '*' for any contract */
28
+ contract: AztecAddress | '*';
29
+ /** Function name or '*' for any function */
30
+ function: string;
31
+ }
32
+ /**
33
+ * Account access capability - grants access to user accounts.
34
+ *
35
+ * Maps to wallet methods:
36
+ * - getAccounts (when canGet: true)
37
+ * - createAuthWit (when canCreateAuthWit: true)
38
+ *
39
+ * The wallet decides which accounts to reveal to the app.
40
+ * Apps don't specify which accounts they want - they just request
41
+ * the capability and the wallet shows them the available accounts.
42
+ */
43
+ export interface AccountsCapability {
44
+ /** Discriminator for capability type */
45
+ type: 'accounts';
46
+ /** Can get accounts from wallet. Maps to: getAccounts */
47
+ canGet?: boolean;
48
+ /** Can create auth witnesses for accounts. Maps to: createAuthWit */
49
+ canCreateAuthWit?: boolean;
50
+ }
51
+ /**
52
+ * Granted account access capability.
53
+ *
54
+ * Extends the request with specific accounts that were granted by the wallet.
55
+ */
56
+ export interface GrantedAccountsCapability extends AccountsCapability {
57
+ /** Specific accounts granted by the wallet with their aliases. The wallet adds this when granting the capability. */
58
+ accounts: Aliased<AztecAddress>[];
59
+ }
60
+ /**
61
+ * Contract interaction capability - for registering and querying contracts.
62
+ *
63
+ * Maps to wallet methods:
64
+ * - registerContract (when canRegister: true)
65
+ * - getContractMetadata (when canGetMetadata: true)
66
+ *
67
+ * Matching is done by contract address, not class ID. This allows updating
68
+ * existing contracts with new artifacts (e.g., when contract is upgraded
69
+ * to a new contractClassId on-chain).
70
+ *
71
+ * Note: For querying contract class metadata, use ContractClassesCapability instead.
72
+ *
73
+ * @example
74
+ * // Register and query specific contracts
75
+ * \{
76
+ * type: 'contracts',
77
+ * contracts: [ammAddress, tokenAddress],
78
+ * canRegister: true,
79
+ * canGetMetadata: true
80
+ * \}
81
+ *
82
+ * @example
83
+ * // Query any contract (read-only)
84
+ * \{
85
+ * type: 'contracts',
86
+ * contracts: '*',
87
+ * canGetMetadata: true
88
+ * \}
89
+ */
90
+ export interface ContractsCapability {
91
+ /** Discriminator for capability type */
92
+ type: 'contracts';
93
+ /**
94
+ * Which contracts this applies to:
95
+ * - '*': Any contract address
96
+ * - AztecAddress[]: Specific contract addresses
97
+ */
98
+ contracts: '*' | AztecAddress[];
99
+ /**
100
+ * Can register contracts and update existing registrations.
101
+ * Maps to: registerContract
102
+ *
103
+ * When true, allows:
104
+ * - Registering new contract instances at specified addresses
105
+ * - Re-registering existing contracts with updated artifacts (e.g., after upgrade)
106
+ */
107
+ canRegister?: boolean;
108
+ /** Can query contract metadata. Maps to: getContractMetadata */
109
+ canGetMetadata?: boolean;
110
+ }
111
+ /**
112
+ * Granted contract interaction capability.
113
+ *
114
+ * The wallet may reduce the scope (e.g., from '*' to specific addresses).
115
+ */
116
+ export interface GrantedContractsCapability extends ContractsCapability {
117
+ }
118
+ /**
119
+ * Contract class capability - for querying contract class metadata.
120
+ *
121
+ * Maps to wallet methods:
122
+ * - getContractClassMetadata
123
+ *
124
+ * Contract classes are identified by their class ID (Fr), not by contract address.
125
+ * Multiple contract instances can share the same class. This capability grants
126
+ * permission to query metadata for specific contract classes.
127
+ *
128
+ * Apps typically acquire this permission automatically when registering a contract
129
+ * with an artifact (the wallet auto-grants permission for that contract's class ID).
130
+ *
131
+ * @example
132
+ * // Query specific contract classes
133
+ * \{
134
+ * type: 'contractClasses',
135
+ * classes: [classId1, classId2],
136
+ * canGetMetadata: true
137
+ * \}
138
+ *
139
+ * @example
140
+ * // Query any contract class (wildcard)
141
+ * \{
142
+ * type: 'contractClasses',
143
+ * classes: '*',
144
+ * canGetMetadata: true
145
+ * \}
146
+ */
147
+ export interface ContractClassesCapability {
148
+ /** Discriminator for capability type */
149
+ type: 'contractClasses';
150
+ /**
151
+ * Which contract classes this applies to:
152
+ * - '*': Any contract class ID
153
+ * - Fr[]: Specific contract class IDs
154
+ */
155
+ classes: '*' | Fr[];
156
+ /** Can query contract class metadata. Maps to: getContractClassMetadata */
157
+ canGetMetadata: boolean;
158
+ }
159
+ /**
160
+ * Granted contract class capability.
161
+ *
162
+ * The wallet may reduce the scope (e.g., from '*' to specific class IDs).
163
+ */
164
+ export interface GrantedContractClassesCapability extends ContractClassesCapability {
165
+ }
166
+ /**
167
+ * Transaction simulation capability - for simulating transactions and executing utilities.
168
+ *
169
+ * Maps to wallet methods:
170
+ * - simulateTx (when transactions scope specified)
171
+ * - executeUtility (when utilities scope specified)
172
+ * - profileTx (when transactions scope specified)
173
+ *
174
+ * @example
175
+ * // Simulate any transaction on specific contracts
176
+ * \{
177
+ * type: 'simulation',
178
+ * transactions: \{
179
+ * scope: [
180
+ * \{ contract: ammAddress, function: '*' \},
181
+ * \{ contract: tokenAddress, function: 'transfer' \}
182
+ * ]
183
+ * \}
184
+ * \}
185
+ *
186
+ * @example
187
+ * // Simulate any transaction and execute any utility call
188
+ * \{
189
+ * type: 'simulation',
190
+ * transactions: \{ scope: '*' \},
191
+ * utilities: \{ scope: '*' \}
192
+ * \}
193
+ */
194
+ export interface SimulationCapability {
195
+ /** Discriminator for capability type */
196
+ type: 'simulation';
197
+ /** Transaction simulation scope. Maps to: simulateTx, profileTx */
198
+ transactions?: {
199
+ /**
200
+ * Which contracts/functions to allow:
201
+ * - '*': Any transaction
202
+ * - ContractFunctionPattern[]: Specific contract functions
203
+ */
204
+ scope: '*' | ContractFunctionPattern[];
205
+ };
206
+ /** Utility execution scope (unconstrained calls). Maps to: executeUtility */
207
+ utilities?: {
208
+ /**
209
+ * Which contracts/functions to allow:
210
+ * - '*': Any utility call
211
+ * - ContractFunctionPattern[]: Specific contract functions
212
+ */
213
+ scope: '*' | ContractFunctionPattern[];
214
+ };
215
+ }
216
+ /**
217
+ * Granted transaction simulation capability.
218
+ *
219
+ * The wallet may reduce the scope (e.g., from '*' to specific patterns).
220
+ */
221
+ export interface GrantedSimulationCapability extends SimulationCapability {
222
+ }
223
+ /**
224
+ * Transaction execution capability - for sending transactions.
225
+ *
226
+ * Maps to wallet methods:
227
+ * - sendTx
228
+ *
229
+ * Policy enforcement (rate limits, spending limits) should be handled
230
+ * at the contract level in Aztec, not at the wallet level.
231
+ *
232
+ * @example
233
+ * // Send specific transactions with approval
234
+ * \{
235
+ * type: 'transaction',
236
+ * scope: [
237
+ * \{ contract: ammAddress, function: 'swap' \},
238
+ * \{ contract: ammAddress, function: 'addLiquidity' \}
239
+ * ]
240
+ * \}
241
+ *
242
+ * @example
243
+ * // Send any transaction
244
+ * \{
245
+ * type: 'transaction',
246
+ * scope: '*'
247
+ * \}
248
+ */
249
+ export interface TransactionCapability {
250
+ /** Discriminator for capability type */
251
+ type: 'transaction';
252
+ /**
253
+ * Which contracts/functions to allow:
254
+ * - '*': Any transaction
255
+ * - ContractFunctionPattern[]: Specific patterns
256
+ */
257
+ scope: '*' | ContractFunctionPattern[];
258
+ }
259
+ /**
260
+ * Granted transaction execution capability.
261
+ *
262
+ * The wallet may reduce the scope (e.g., from '*' to specific patterns).
263
+ */
264
+ export interface GrantedTransactionCapability extends TransactionCapability {
265
+ }
266
+ /**
267
+ * Data access capability - for querying private data.
268
+ *
269
+ * Maps to wallet methods:
270
+ * - getAddressBook (when addressBook: true)
271
+ * - getPrivateEvents (when privateEvents specified)
272
+ *
273
+ * @example
274
+ * // Access address book and events from specific contract
275
+ * \{
276
+ * type: 'data',
277
+ * addressBook: true,
278
+ * privateEvents: \{
279
+ * contracts: [ammAddress],
280
+ * events: ['Swap', 'LiquidityAdded']
281
+ * \}
282
+ * \}
283
+ *
284
+ * @example
285
+ * // Access all events from any contract
286
+ * \{
287
+ * type: 'data',
288
+ * privateEvents: \{
289
+ * contracts: '*',
290
+ * events: '*'
291
+ * \}
292
+ * \}
293
+ */
294
+ export interface DataCapability {
295
+ /** Discriminator for capability type */
296
+ type: 'data';
297
+ /** Access to address book. Maps to: getAddressBook */
298
+ addressBook?: boolean;
299
+ /** Access to private events. Maps to: getPrivateEvents */
300
+ privateEvents?: {
301
+ /**
302
+ * Which contracts to allow event queries from:
303
+ * - '*': Any contract
304
+ * - AztecAddress[]: Specific contracts
305
+ */
306
+ contracts: '*' | AztecAddress[];
307
+ };
308
+ }
309
+ /**
310
+ * Granted data access capability.
311
+ *
312
+ * The wallet may reduce the scope (e.g., from '*' to specific contracts).
313
+ */
314
+ export interface GrantedDataCapability extends DataCapability {
315
+ }
316
+ /**
317
+ * Union type of all capability scopes (app request).
318
+ *
319
+ * Capabilities group wallet operations by their security sensitivity
320
+ * and functional cohesion, making permission requests understandable
321
+ * to users.
322
+ */
323
+ export type Capability = AccountsCapability | ContractsCapability | ContractClassesCapability | SimulationCapability | TransactionCapability | DataCapability;
324
+ /**
325
+ * Union type of all granted capabilities (wallet response).
326
+ *
327
+ * The wallet may augment capabilities with additional information:
328
+ * - AccountsCapability: adds specific accounts granted
329
+ * - Other capabilities: may reduce scope (e.g., '*' to specific addresses)
330
+ */
331
+ export type GrantedCapability = GrantedAccountsCapability | GrantedContractsCapability | GrantedContractClassesCapability | GrantedSimulationCapability | GrantedTransactionCapability | GrantedDataCapability;
332
+ /**
333
+ * Application capability manifest.
334
+ *
335
+ * Sent by dApp to declare all operations it needs. This reduces authorization
336
+ * friction from multiple dialogs to a single comprehensive permission request.
337
+ *
338
+ * @example
339
+ * // DEX application manifest
340
+ * const manifest: AppCapabilities = \{
341
+ * version: CAPABILITY_VERSION,
342
+ * metadata: \{
343
+ * name: 'MyDEX',
344
+ * version: '1.0.0',
345
+ * description: 'Decentralized exchange for private token swaps',
346
+ * url: 'https://example.com',
347
+ * icon: 'https://example.com/icon.png'
348
+ * \},
349
+ * capabilities: [
350
+ * \{
351
+ * type: 'accounts',
352
+ * canGet: true,
353
+ * canCreateAuthWit: true
354
+ * \},
355
+ * \{
356
+ * type: 'contracts',
357
+ * contracts: [ammAddress, tokenAAddress, tokenBAddress],
358
+ * canRegister: true,
359
+ * canGetMetadata: true
360
+ * \},
361
+ * \{
362
+ * type: 'simulation',
363
+ * transactions: \{
364
+ * scope: [\{ contract: ammAddress, function: '*' \}]
365
+ * \}
366
+ * \},
367
+ * \{
368
+ * type: 'transaction',
369
+ * scope: [\{ contract: ammAddress, function: 'swap' \}]
370
+ * \}
371
+ * ]
372
+ * \};
373
+ */
374
+ export interface AppCapabilities {
375
+ /**
376
+ * Manifest version for forward compatibility.
377
+ * Currently only '1.0' is supported.
378
+ */
379
+ version: typeof CAPABILITY_VERSION;
380
+ /** Application metadata for display in authorization dialogs. */
381
+ metadata: {
382
+ /** Human-readable app name */
383
+ name: string;
384
+ /** App version */
385
+ version: string;
386
+ /** Optional description of what the app does */
387
+ description?: string;
388
+ /** Optional website URL */
389
+ url?: string;
390
+ /** Optional icon URL or data URI */
391
+ icon?: string;
392
+ };
393
+ /**
394
+ * Requested capabilities grouped by scope.
395
+ */
396
+ capabilities: Capability[];
397
+ }
398
+ /**
399
+ * Wallet capability response.
400
+ *
401
+ * Returned by wallet after user reviews and approves/denies the capability request.
402
+ *
403
+ * The wallet can modify requested capabilities:
404
+ * - Reduce scope (e.g., restrict to specific contracts instead of '*')
405
+ * - Add information (e.g., specify which accounts are granted)
406
+ * - Deny capabilities (by omitting them from the `granted` array)
407
+ *
408
+ * @example
409
+ * // App requests
410
+ * const manifest: AppCapabilities = \{
411
+ * version: '1.0',
412
+ * metadata: \{ name: 'MyDApp', version: '1.0.0' \},
413
+ * capabilities: [
414
+ * \{ type: 'accounts', canGet: true \},
415
+ * \{ type: 'contracts', contracts: '*', canRegister: true \}
416
+ * ]
417
+ * \};
418
+ *
419
+ * // Wallet responds with specific accounts and restricted contracts
420
+ * const response = await wallet.requestCapabilities(manifest);
421
+ * console.log(response.granted);
422
+ * // [
423
+ * // \{ type: 'accounts', canGet: true, accounts: [addr1, addr2] \},
424
+ * // \{ type: 'contracts', contracts: [specificContract], canRegister: true \}
425
+ * // ]
426
+ */
427
+ export interface WalletCapabilities {
428
+ /** Response version for forward compatibility. */
429
+ version: typeof CAPABILITY_VERSION;
430
+ /**
431
+ * Capabilities granted by the wallet.
432
+ * Capabilities not in this array were implicitly denied.
433
+ * Empty array means the user denied all capabilities.
434
+ */
435
+ granted: GrantedCapability[];
436
+ /** Wallet implementation details. */
437
+ wallet: {
438
+ /** Wallet name/implementation */
439
+ name: string;
440
+ /** Wallet version */
441
+ version: string;
442
+ };
443
+ }
444
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FwYWJpbGl0aWVzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvd2FsbGV0L2NhcGFiaWxpdGllcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxFQUFFLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUVoRSxPQUFPLEtBQUssRUFBRSxPQUFPLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFFM0M7O0dBRUc7QUFDSCxlQUFPLE1BQU0sa0JBQWtCLE9BQWlCLENBQUM7QUFFakQ7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBaUJHO0FBQ0gsTUFBTSxXQUFXLHVCQUF1QjtJQUN0QywrQ0FBK0M7SUFDL0MsUUFBUSxFQUFFLFlBQVksR0FBRyxHQUFHLENBQUM7SUFFN0IsNENBQTRDO0lBQzVDLFFBQVEsRUFBRSxNQUFNLENBQUM7Q0FDbEI7QUFFRDs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBTSxXQUFXLGtCQUFrQjtJQUNqQyx3Q0FBd0M7SUFDeEMsSUFBSSxFQUFFLFVBQVUsQ0FBQztJQUVqQix5REFBeUQ7SUFDek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;IACjC,kDAAkD;IAClD,OAAO,EAAE,OAAO,kBAAkB,CAAC;IAEnC;;;;OAIG;IACH,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAE7B,qCAAqC;IACrC,MAAM,EAAE;QACN,iCAAiC;QACjC,IAAI,EAAE,MAAM,CAAC;QAEb,qBAAqB;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH"}
@@ -0,0 +1,3 @@
1
+ /**
2
+ * Current capability manifest version.
3
+ */ export const CAPABILITY_VERSION = '1.0';
@@ -1,3 +1,4 @@
1
1
  export * from './wallet.js';
2
2
  export * from './account_manager.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy93YWxsZXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxzQkFBc0IsQ0FBQyJ9
3
+ export * from './capabilities.js';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy93YWxsZXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxjQUFjLG1CQUFtQixDQUFDIn0=
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wallet/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './wallet.js';
2
2
  export * from './account_manager.js';
3
+ export * from './capabilities.js';