@aztec/wallet-sdk 0.0.1-commit.5476d83

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 (38) hide show
  1. package/README.md +424 -0
  2. package/dest/base-wallet/base_wallet.d.ts +94 -0
  3. package/dest/base-wallet/base_wallet.d.ts.map +1 -0
  4. package/dest/base-wallet/base_wallet.js +225 -0
  5. package/dest/base-wallet/index.d.ts +2 -0
  6. package/dest/base-wallet/index.d.ts.map +1 -0
  7. package/dest/base-wallet/index.js +1 -0
  8. package/dest/manager/index.d.ts +8 -0
  9. package/dest/manager/index.d.ts.map +1 -0
  10. package/dest/manager/index.js +5 -0
  11. package/dest/manager/types.d.ts +64 -0
  12. package/dest/manager/types.d.ts.map +1 -0
  13. package/dest/manager/types.js +3 -0
  14. package/dest/manager/wallet_manager.d.ts +27 -0
  15. package/dest/manager/wallet_manager.d.ts.map +1 -0
  16. package/dest/manager/wallet_manager.js +77 -0
  17. package/dest/providers/extension/extension_provider.d.ts +17 -0
  18. package/dest/providers/extension/extension_provider.d.ts.map +1 -0
  19. package/dest/providers/extension/extension_provider.js +56 -0
  20. package/dest/providers/extension/extension_wallet.d.ts +23 -0
  21. package/dest/providers/extension/extension_wallet.d.ts.map +1 -0
  22. package/dest/providers/extension/extension_wallet.js +96 -0
  23. package/dest/providers/extension/index.d.ts +4 -0
  24. package/dest/providers/extension/index.d.ts.map +1 -0
  25. package/dest/providers/extension/index.js +2 -0
  26. package/dest/providers/types.d.ts +67 -0
  27. package/dest/providers/types.d.ts.map +1 -0
  28. package/dest/providers/types.js +3 -0
  29. package/package.json +96 -0
  30. package/src/base-wallet/base_wallet.ts +342 -0
  31. package/src/base-wallet/index.ts +1 -0
  32. package/src/manager/index.ts +24 -0
  33. package/src/manager/types.ts +69 -0
  34. package/src/manager/wallet_manager.ts +86 -0
  35. package/src/providers/extension/extension_provider.ts +72 -0
  36. package/src/providers/extension/extension_wallet.ts +124 -0
  37. package/src/providers/extension/index.ts +3 -0
  38. package/src/providers/types.ts +71 -0
package/README.md ADDED
@@ -0,0 +1,424 @@
1
+ # Wallet SDK Integration Guide for Third-Party Wallet Developers
2
+
3
+ This guide explains how to integrate your wallet with the Aztec Wallet SDK, enabling dApps to discover and interact with your wallet implementation.
4
+
5
+ ## Available Types
6
+
7
+ All types and utilities needed for wallet integration are exported from `@aztec/wallet-sdk/manager`:
8
+
9
+ ```typescript
10
+ import type {
11
+ ChainInfo,
12
+ DiscoveryRequest,
13
+ DiscoveryResponse,
14
+ WalletInfo,
15
+ WalletMessage,
16
+ WalletResponse,
17
+ } from '@aztec/wallet-sdk/manager';
18
+ import { ChainInfoSchema, WalletSchema, jsonStringify } from '@aztec/wallet-sdk/manager';
19
+ ```
20
+
21
+ ## Overview
22
+
23
+ The Wallet SDK uses a **request-based discovery** model:
24
+
25
+ 1. **dApp requests wallets** for a specific chain/version via `WalletManager.getAvailableWallets({ chainInfo })`
26
+ 2. **SDK broadcasts** a discovery message with chain information
27
+ 3. **Your wallet responds** ONLY if it supports that specific network
28
+ 4. **dApp receives** only compatible wallets
29
+ 5. **dApp calls wallet methods** which your wallet handles and responds to
30
+
31
+ ### Transport Mechanisms
32
+
33
+ This guide uses **browser extension wallets** as the primary example, which communicate via `window.postMessage`. However, the same message protocol can be used with other transport mechanisms:
34
+
35
+ - **Extension wallets**: Use `window.postMessage` (examples shown throughout this guide)
36
+ - **Web wallets**: Could use WebSockets, HTTP, or other protocols (see comments in examples for hypothetical WebSocket usage)
37
+ - **Mobile wallets**: Could use deep links, app-to-app communication, or custom protocols
38
+
39
+ The message format remains the same regardless of transport - only the delivery mechanism changes.
40
+
41
+ ## Discovery Protocol
42
+
43
+ ### 1. Listen for Discovery Requests
44
+
45
+ **Extension wallet example:**
46
+
47
+ ```typescript
48
+ window.addEventListener('message', event => {
49
+ if (event.source !== window) {
50
+ return;
51
+ }
52
+
53
+ const data = JSON.parse(event.data);
54
+
55
+ if (data.type === 'aztec-wallet-discovery') {
56
+ handleDiscovery(data);
57
+ }
58
+ });
59
+
60
+ // Using WebSocket:
61
+ // websocket.on('message', (message) => {
62
+ // const data = JSON.parse(message);
63
+ // if (data.type === 'aztec-wallet-discovery') {
64
+ // handleDiscovery(data);
65
+ // }
66
+ // });
67
+ ```
68
+
69
+ ### 2. Discovery Message Format
70
+
71
+ Discovery messages have this structure:
72
+
73
+ ```typescript
74
+ {
75
+ type: 'aztec-wallet-discovery',
76
+ requestId: string, // UUID for tracking this request
77
+ chainInfo: {
78
+ chainId: Fr, // Chain ID
79
+ version: Fr // Protocol version
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### 3. Check Network Support
85
+
86
+ Before responding, verify your wallet supports the requested network:
87
+
88
+ ```typescript
89
+ import { ChainInfoSchema } from '@aztec/wallet-sdk/manager';
90
+
91
+ function handleDiscovery(message: any) {
92
+ const { requestId, chainInfo } = message;
93
+
94
+ // Parse and validate chain info
95
+ const { chainId, version } = ChainInfoSchema.parse(chainInfo);
96
+
97
+ // Check if your wallet supports this network
98
+ const isSupported = checkNetworkSupport(chainId, version);
99
+
100
+ if (!isSupported) {
101
+ // Do NOT respond if you don't support this network
102
+ return;
103
+ }
104
+
105
+ // Respond if supported
106
+ respondToDiscovery(requestId);
107
+ }
108
+ ```
109
+
110
+ ### 4. Respond to Discovery
111
+
112
+ If your wallet supports the network, respond with your wallet information:
113
+
114
+ **Extension wallet example:**
115
+
116
+ ```typescript
117
+ import { jsonStringify } from '@aztec/wallet-sdk/manager';
118
+
119
+ function respondToDiscovery(requestId: string) {
120
+ const response = {
121
+ type: 'aztec-wallet-discovery-response',
122
+ requestId,
123
+ walletInfo: {
124
+ id: 'my-aztec-wallet', // Unique wallet identifier
125
+ name: 'My Aztec Wallet', // Display name
126
+ icon: 'https://example.com/icon.png', // Optional icon URL
127
+ version: '1.0.0', // Wallet version
128
+ },
129
+ };
130
+
131
+ // Send as JSON string via window.postMessage
132
+ window.postMessage(jsonStringify(response), '*');
133
+ }
134
+
135
+ // Using WebSocket:
136
+ // websocket.send(jsonStringify(response));
137
+ ```
138
+
139
+ **Important Notes:**
140
+
141
+ - Both the SDK and wallets send messages as JSON strings (using `jsonStringify`)
142
+ - Both the SDK and wallets must parse incoming JSON strings
143
+ - Always use `jsonStringify` from `@aztec/foundation/json-rpc` for sending messages
144
+ - Always parse incoming messages with `JSON.parse` and the proper schemas
145
+
146
+ ## Message Format
147
+
148
+ ### Wallet Method Request
149
+
150
+ After discovery, dApps will call wallet methods. These arrive as:
151
+
152
+ ```typescript
153
+ {
154
+ type: string, // Wallet method name from the Wallet interface
155
+ messageId: string, // UUID for tracking this request
156
+ args: unknown[], // Method arguments
157
+ chainInfo: {
158
+ chainId: Fr, // Same chain that was used in discovery
159
+ version: Fr
160
+ },
161
+ appId: string, // Application identifier
162
+ walletId: string // Your wallet's ID (from discovery response)
163
+ }
164
+ ```
165
+
166
+ Example method calls:
167
+
168
+ - `type: 'getAccounts'` - Get list of accounts
169
+ - `type: 'getChainInfo'` - Get chain information
170
+ - `type: 'sendTx'` - Send a transaction
171
+ - `type: 'registerContract'` - Register a contract instance
172
+
173
+ ### Wallet Method Response
174
+
175
+ Your wallet must respond with:
176
+
177
+ ```typescript
178
+ {
179
+ messageId: string, // MUST match the request's messageId
180
+ result?: unknown, // Method result (if successful)
181
+ error?: unknown, // Error (if failed)
182
+ walletId: string // Your wallet's ID
183
+ }
184
+ ```
185
+
186
+ ## Handling Wallet Methods
187
+
188
+ ### 1. Set Up Message Listener
189
+
190
+ **Extension wallet example:**
191
+
192
+ ```typescript
193
+ window.addEventListener('message', event => {
194
+ if (event.source !== window) {
195
+ return;
196
+ }
197
+
198
+ let data;
199
+ try {
200
+ data = JSON.parse(event.data);
201
+ } catch {
202
+ return; // Not a valid JSON message
203
+ }
204
+
205
+ // Handle discovery
206
+ if (data.type === 'aztec-wallet-discovery') {
207
+ handleDiscovery(data);
208
+ return;
209
+ }
210
+
211
+ // Handle wallet methods
212
+ if (data.messageId && data.type && data.walletId === 'my-aztec-wallet') {
213
+ handleWalletMethod(data);
214
+ }
215
+ });
216
+
217
+ // Using WebSocket:
218
+ // websocket.on('message', (message) => {
219
+ // const data = JSON.parse(message);
220
+ // if (data.type === 'aztec-wallet-discovery') {
221
+ // handleDiscovery(data);
222
+ // } else if (data.messageId && data.type) {
223
+ // handleWalletMethod(data);
224
+ // }
225
+ // });
226
+ ```
227
+
228
+ ### 2. Route to Wallet Implementation
229
+
230
+ ```typescript
231
+ import { ChainInfoSchema } from '@aztec/wallet-sdk/manager';
232
+
233
+ async function handleWalletMethod(message: any) {
234
+ const { type, messageId, args, chainInfo, appId, walletId } = message;
235
+
236
+ try {
237
+ // Parse and validate chain info
238
+ const parsedChainInfo = ChainInfoSchema.parse(chainInfo);
239
+
240
+ // Get the wallet instance for this chain
241
+ const wallet = await getWalletForChain(parsedChainInfo);
242
+
243
+ // Verify the method exists on the Wallet interface
244
+ if (typeof wallet[type] !== 'function') {
245
+ throw new Error(`Unknown wallet method: ${type}`);
246
+ }
247
+
248
+ // Call the wallet method
249
+ const result = await wallet[type](...args);
250
+
251
+ // Send success response
252
+ sendResponse(messageId, walletId, result);
253
+ } catch (error) {
254
+ // Send error response
255
+ sendError(messageId, walletId, error);
256
+ }
257
+ }
258
+ ```
259
+
260
+ ### 3. Send Response
261
+
262
+ **Extension wallet example:**
263
+
264
+ ```typescript
265
+ import { jsonStringify } from '@aztec/wallet-sdk/manager';
266
+
267
+ function sendResponse(messageId: string, walletId: string, result: unknown) {
268
+ const response = {
269
+ messageId,
270
+ result,
271
+ walletId,
272
+ };
273
+
274
+ // Send as JSON string
275
+ window.postMessage(jsonStringify(response), '*');
276
+ }
277
+
278
+ function sendError(messageId: string, walletId: string, error: Error) {
279
+ const response = {
280
+ messageId,
281
+ error: {
282
+ message: error.message,
283
+ stack: error.stack,
284
+ },
285
+ walletId,
286
+ };
287
+
288
+ window.postMessage(jsonStringify(response), '*');
289
+ }
290
+
291
+ // Using WebSocket:
292
+ // websocket.send(jsonStringify({ messageId, result, walletId }));
293
+ ```
294
+
295
+ ## Parsing Messages
296
+
297
+ ### Using Zod Schemas
298
+
299
+ Use the provided Zod schemas to parse and validate incoming messages:
300
+
301
+ ```typescript
302
+ import { ChainInfoSchema, WalletSchema } from '@aztec/wallet-sdk/manager';
303
+
304
+ // Parse chain info
305
+ const chainInfo = ChainInfoSchema.parse(message.chainInfo);
306
+
307
+ // Validate result against expected schema for a method
308
+ const accountsResult = await wallet.getAccounts(...args);
309
+ // The SDK handles schema validation on the client side
310
+ ```
311
+
312
+ The Wallet SDK automatically validates return values using `WalletSchema` on the client side, so your wallet implementation should return values that match the `Wallet` interface specification.
313
+
314
+ ## Error Handling
315
+
316
+ ### Error Response Format
317
+
318
+ Always send error responses with this structure:
319
+
320
+ ```typescript
321
+ {
322
+ messageId: string, // Match the request
323
+ error: {
324
+ message: string, // Error message
325
+ code?: string, // Optional error code
326
+ stack?: string // Optional stack trace
327
+ },
328
+ walletId: string
329
+ }
330
+ ```
331
+
332
+ ### Common Error Scenarios
333
+
334
+ ```typescript
335
+ import { ChainInfoSchema } from '@aztec/wallet-sdk/manager';
336
+
337
+ async function handleWalletMethod(message: any) {
338
+ const { type, messageId, args, chainInfo, walletId } = message;
339
+
340
+ try {
341
+ // 1. Parse and validate chain info
342
+ const parsedChainInfo = ChainInfoSchema.parse(chainInfo);
343
+
344
+ // 2. Check network support
345
+ if (!isNetworkSupported(parsedChainInfo)) {
346
+ throw new Error('Network not supported by wallet');
347
+ }
348
+
349
+ // 3. Get wallet instance
350
+ const wallet = await getWalletForChain(parsedChainInfo);
351
+
352
+ // 4. Validate method exists
353
+ if (typeof wallet[type] !== 'function') {
354
+ throw new Error(`Unknown wallet method: ${type}`);
355
+ }
356
+
357
+ // 5. Execute method
358
+ const result = await wallet[type](...args);
359
+ sendResponse(messageId, walletId, result);
360
+ } catch (error) {
361
+ sendError(messageId, walletId, error);
362
+ }
363
+ }
364
+ ```
365
+
366
+ ### User Rejection Handling
367
+
368
+ If a user rejects an action:
369
+
370
+ ```typescript
371
+ {
372
+ messageId: 'abc-123',
373
+ error: {
374
+ message: 'User rejected the request',
375
+ code: 'USER_REJECTED'
376
+ },
377
+ walletId: 'my-wallet'
378
+ }
379
+ ```
380
+
381
+ ## Testing Your Integration
382
+
383
+ ### WalletManager
384
+
385
+ In a dApp using the Wallet SDK:
386
+
387
+ ```typescript
388
+ import { Fr } from '@aztec/foundation/fields';
389
+ import { WalletManager } from '@aztec/wallet-sdk/manager';
390
+
391
+ const manager = WalletManager.configure({
392
+ extensions: { enabled: true },
393
+ });
394
+
395
+ // Discover wallets
396
+ const wallets = await manager.getAvailableWallets({
397
+ chainInfo: {
398
+ chainId: new Fr(31337),
399
+ version: new Fr(0),
400
+ },
401
+ timeout: 2000,
402
+ });
403
+
404
+ console.log('Discovered wallets:', wallets);
405
+
406
+ // Connect to your wallet
407
+ const walletProvider = wallets.find(w => w.id === 'my-aztec-wallet');
408
+ if (walletProvider) {
409
+ const wallet = await walletProvider.connect('test-app');
410
+
411
+ // Test wallet methods from the Wallet interface
412
+ const accounts = await wallet.getAccounts();
413
+ console.log('Accounts:', accounts);
414
+
415
+ const chainInfo = await wallet.getChainInfo();
416
+ console.log('Chain info:', chainInfo);
417
+ }
418
+ ```
419
+
420
+ ## Reference Implementation
421
+
422
+ For a complete reference implementation, see the demo wallet at:
423
+
424
+ - Repository: `~/repos/demo-wallet`
@@ -0,0 +1,94 @@
1
+ import type { Account } from '@aztec/aztec.js/account';
2
+ import type { CallIntent, IntentInnerHash } from '@aztec/aztec.js/authorization';
3
+ import type { FeePaymentMethod } from '@aztec/aztec.js/fee';
4
+ import type { Aliased, BatchResults, BatchableMethods, BatchedMethod, ProfileOptions, SendOptions, SimulateOptions, Wallet } from '@aztec/aztec.js/wallet';
5
+ import { AccountFeePaymentMethodOptions } from '@aztec/entrypoints/account';
6
+ import type { ChainInfo } from '@aztec/entrypoints/interfaces';
7
+ import { Fr } from '@aztec/foundation/fields';
8
+ import type { FieldsOf } from '@aztec/foundation/types';
9
+ import type { PXE } from '@aztec/pxe/server';
10
+ import { type ContractArtifact, type EventMetadataDefinition, type FunctionCall } from '@aztec/stdlib/abi';
11
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
12
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
13
+ import { type ContractClassMetadata, type ContractInstanceWithAddress, type ContractMetadata } from '@aztec/stdlib/contract';
14
+ import { GasSettings } from '@aztec/stdlib/gas';
15
+ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
16
+ import type { TxExecutionRequest, TxHash, TxProfileResult, TxReceipt, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
17
+ import { ExecutionPayload } from '@aztec/stdlib/tx';
18
+ /**
19
+ * Options to configure fee payment for a transaction
20
+ */
21
+ export type FeeOptions = {
22
+ /**
23
+ * A wallet-provided fallback fee payment method that is used only if the transaction that is being constructed
24
+ * doesn't already include one
25
+ */
26
+ walletFeePaymentMethod?: FeePaymentMethod;
27
+ /** Configuration options for the account to properly handle the selected fee payment method */
28
+ accountFeePaymentMethodOptions: AccountFeePaymentMethodOptions;
29
+ /** The gas settings to use for the transaction */
30
+ gasSettings: GasSettings;
31
+ };
32
+ /**
33
+ * A base class for Wallet implementations
34
+ */
35
+ export declare abstract class BaseWallet implements Wallet {
36
+ protected readonly pxe: PXE;
37
+ protected readonly aztecNode: AztecNode;
38
+ protected log: import("@aztec/foundation/log").Logger;
39
+ protected baseFeePadding: number;
40
+ protected cancellableTransactions: boolean;
41
+ protected constructor(pxe: PXE, aztecNode: AztecNode);
42
+ protected abstract getAccountFromAddress(address: AztecAddress): Promise<Account>;
43
+ abstract getAccounts(): Promise<Aliased<AztecAddress>[]>;
44
+ /**
45
+ * Returns the list of aliased contacts associated with the wallet.
46
+ * This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
47
+ * - Senders: Addresses we check during synching in case they sent us notes,
48
+ * - Contacts: more general concept akin to a phone's contact list.
49
+ * @returns The aliased collection of AztecAddresses that form this wallet's address book
50
+ */
51
+ getAddressBook(): Promise<Aliased<AztecAddress>[]>;
52
+ getChainInfo(): Promise<ChainInfo>;
53
+ protected createTxExecutionRequestFromPayloadAndFee(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions): Promise<TxExecutionRequest>;
54
+ createAuthWit(from: AztecAddress, messageHashOrIntent: Fr | IntentInnerHash | CallIntent): Promise<AuthWitness>;
55
+ batch<const T extends readonly BatchedMethod<keyof BatchableMethods>[]>(methods: T): Promise<BatchResults<T>>;
56
+ /**
57
+ * Completes partial user-provided fee options with wallet defaults.
58
+ * @param from - The address where the transaction is being sent from
59
+ * @param feePayer - The address paying for fees (if any fee payment method is embedded in the execution payload)
60
+ * @param gasSettings - User-provided partial gas settings
61
+ * @returns - Complete fee options that can be used to create a transaction execution request
62
+ */
63
+ protected completeFeeOptions(from: AztecAddress, feePayer?: AztecAddress, gasSettings?: Partial<FieldsOf<GasSettings>>): Promise<FeeOptions>;
64
+ /**
65
+ * Completes partial user-provided fee options with unreasonably high gas limits
66
+ * for gas estimation. Uses the same logic as completeFeeOptions but sets high limits
67
+ * to avoid running out of gas during estimation.
68
+ * @param from - The address where the transaction is being sent from
69
+ * @param feePayer - The address paying for fees (if any fee payment method is embedded in the execution payload)
70
+ * @param gasSettings - User-provided partial gas settings
71
+ */
72
+ protected completeFeeOptionsForEstimation(from: AztecAddress, feePayer?: AztecAddress, gasSettings?: Partial<FieldsOf<GasSettings>>): Promise<{
73
+ /**
74
+ * A wallet-provided fallback fee payment method that is used only if the transaction that is being constructed
75
+ * doesn't already include one
76
+ */
77
+ walletFeePaymentMethod?: FeePaymentMethod | undefined;
78
+ /** Configuration options for the account to properly handle the selected fee payment method */
79
+ accountFeePaymentMethodOptions: AccountFeePaymentMethodOptions;
80
+ gasSettings: GasSettings;
81
+ }>;
82
+ registerSender(address: AztecAddress, _alias?: string): Promise<AztecAddress>;
83
+ registerContract(instance: ContractInstanceWithAddress, artifact?: ContractArtifact, secretKey?: Fr): Promise<ContractInstanceWithAddress>;
84
+ simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
85
+ profileTx(executionPayload: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
86
+ sendTx(executionPayload: ExecutionPayload, opts: SendOptions): Promise<TxHash>;
87
+ protected contextualizeError(err: Error, ...context: string[]): Error;
88
+ simulateUtility(call: FunctionCall, authwits?: AuthWitness[]): Promise<UtilitySimulationResult>;
89
+ getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<ContractClassMetadata>;
90
+ getContractMetadata(address: AztecAddress): Promise<ContractMetadata>;
91
+ getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
92
+ getPrivateEvents<T>(contractAddress: AztecAddress, eventDef: EventMetadataDefinition, from: number, limit: number, recipients?: AztecAddress[]): Promise<T[]>;
93
+ }
94
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZV93YWxsZXQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iYXNlLXdhbGxldC9iYXNlX3dhbGxldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxPQUFPLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN2RCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsZUFBZSxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFDakYsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUM1RCxPQUFPLEtBQUssRUFDVixPQUFPLEVBQ1AsWUFBWSxFQUNaLGdCQUFnQixFQUNoQixhQUFhLEVBQ2IsY0FBYyxFQUNkLFdBQVcsRUFDWCxlQUFlLEVBQ2YsTUFBTSxFQUNQLE1BQU0sd0JBQXdCLENBQUM7QUFPaEMsT0FBT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