@aztec/wallet-sdk 0.0.1-commit.0208eb9

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 (62) hide show
  1. package/README.md +321 -0
  2. package/dest/base-wallet/base_wallet.d.ts +117 -0
  3. package/dest/base-wallet/base_wallet.d.ts.map +1 -0
  4. package/dest/base-wallet/base_wallet.js +271 -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/crypto.d.ts +192 -0
  9. package/dest/crypto.d.ts.map +1 -0
  10. package/dest/crypto.js +394 -0
  11. package/dest/emoji_alphabet.d.ts +35 -0
  12. package/dest/emoji_alphabet.d.ts.map +1 -0
  13. package/dest/emoji_alphabet.js +299 -0
  14. package/dest/extension/handlers/background_connection_handler.d.ts +158 -0
  15. package/dest/extension/handlers/background_connection_handler.d.ts.map +1 -0
  16. package/dest/extension/handlers/background_connection_handler.js +258 -0
  17. package/dest/extension/handlers/content_script_connection_handler.d.ts +56 -0
  18. package/dest/extension/handlers/content_script_connection_handler.d.ts.map +1 -0
  19. package/dest/extension/handlers/content_script_connection_handler.js +174 -0
  20. package/dest/extension/handlers/index.d.ts +12 -0
  21. package/dest/extension/handlers/index.d.ts.map +1 -0
  22. package/dest/extension/handlers/index.js +10 -0
  23. package/dest/extension/handlers/internal_message_types.d.ts +63 -0
  24. package/dest/extension/handlers/internal_message_types.d.ts.map +1 -0
  25. package/dest/extension/handlers/internal_message_types.js +22 -0
  26. package/dest/extension/provider/extension_provider.d.ts +107 -0
  27. package/dest/extension/provider/extension_provider.d.ts.map +1 -0
  28. package/dest/extension/provider/extension_provider.js +160 -0
  29. package/dest/extension/provider/extension_wallet.d.ts +131 -0
  30. package/dest/extension/provider/extension_wallet.d.ts.map +1 -0
  31. package/dest/extension/provider/extension_wallet.js +271 -0
  32. package/dest/extension/provider/index.d.ts +3 -0
  33. package/dest/extension/provider/index.d.ts.map +1 -0
  34. package/dest/extension/provider/index.js +2 -0
  35. package/dest/manager/index.d.ts +3 -0
  36. package/dest/manager/index.d.ts.map +1 -0
  37. package/dest/manager/index.js +1 -0
  38. package/dest/manager/types.d.ts +167 -0
  39. package/dest/manager/types.d.ts.map +1 -0
  40. package/dest/manager/types.js +19 -0
  41. package/dest/manager/wallet_manager.d.ts +70 -0
  42. package/dest/manager/wallet_manager.d.ts.map +1 -0
  43. package/dest/manager/wallet_manager.js +226 -0
  44. package/dest/types.d.ts +123 -0
  45. package/dest/types.d.ts.map +1 -0
  46. package/dest/types.js +11 -0
  47. package/package.json +99 -0
  48. package/src/base-wallet/base_wallet.ts +394 -0
  49. package/src/base-wallet/index.ts +1 -0
  50. package/src/crypto.ts +499 -0
  51. package/src/emoji_alphabet.ts +317 -0
  52. package/src/extension/handlers/background_connection_handler.ts +423 -0
  53. package/src/extension/handlers/content_script_connection_handler.ts +246 -0
  54. package/src/extension/handlers/index.ts +25 -0
  55. package/src/extension/handlers/internal_message_types.ts +69 -0
  56. package/src/extension/provider/extension_provider.ts +233 -0
  57. package/src/extension/provider/extension_wallet.ts +321 -0
  58. package/src/extension/provider/index.ts +7 -0
  59. package/src/manager/index.ts +12 -0
  60. package/src/manager/types.ts +177 -0
  61. package/src/manager/wallet_manager.ts +259 -0
  62. package/src/types.ts +132 -0
package/README.md ADDED
@@ -0,0 +1,321 @@
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/types`:
8
+
9
+ ```typescript
10
+ import type {
11
+ DiscoveryRequest,
12
+ DiscoveryResponse,
13
+ KeyExchangeRequest,
14
+ KeyExchangeResponse,
15
+ WalletInfo,
16
+ WalletMessage,
17
+ WalletResponse,
18
+ } from '@aztec/wallet-sdk/types';
19
+ ```
20
+
21
+ Cryptographic utilities for secure channel establishment are exported from `@aztec/wallet-sdk/crypto`:
22
+
23
+ ```typescript
24
+ import type { EncryptedPayload, ExportedPublicKey } from '@aztec/wallet-sdk/crypto';
25
+ import {
26
+ decrypt,
27
+ deriveSessionKeys,
28
+ encrypt,
29
+ exportPublicKey,
30
+ generateKeyPair,
31
+ hashToEmoji,
32
+ importPublicKey,
33
+ } from '@aztec/wallet-sdk/crypto';
34
+ ```
35
+
36
+ **For extension wallets**, pre-built connection handlers are available:
37
+
38
+ ```typescript
39
+ import {
40
+ BackgroundConnectionHandler,
41
+ ContentScriptConnectionHandler,
42
+ } from '@aztec/wallet-sdk/extension/handlers';
43
+ ```
44
+
45
+ ## Overview
46
+
47
+ The Wallet SDK uses a **two-phase connection model** with **end-to-end encryption**:
48
+
49
+ ### Phase 1: Discovery
50
+
51
+ 1. **dApp broadcasts** a discovery request with chain information (NO public keys)
52
+ 2. **Your wallet shows** a pending connection request to the user
53
+ 3. **User approves** the connection request
54
+ 4. **Your wallet responds** with basic wallet info and a MessagePort
55
+
56
+ ### Phase 2: Secure Channel Establishment
57
+
58
+ 5. **dApp initiates key exchange** by sending its ECDH public key over the MessagePort
59
+ 6. **Wallet generates** ephemeral key pair and derives session keys using HKDF
60
+ 7. **Both parties compute** the same verification hash independently
61
+ 8. **User verifies** the has matches on both sides. A util for conversion to an emoji grid is provided
62
+ 9. **User confirms** the connection in the dApp
63
+ 10. **All subsequent communication** is encrypted using AES-256-GCM
64
+
65
+ ### Key Security Features
66
+
67
+ - **User approval required**: Wallet never reveals itself without explicit user consent
68
+ - **Ephemeral keys**: New key pairs generated for each session
69
+ - **Anti-MITM verification**: 3x3 emoji grid (72 bits of security) for visual confirmation
70
+
71
+ ## Architecture for Extension Wallets
72
+
73
+ ```
74
+ ┌─────────────┐ window.postMessage ┌─────────────────┐ browser.runtime ┌──────────────────┐
75
+ │ dApp │◄──(discovery + port)────►│ Content Script │◄────────────────────►│ Background Script│
76
+ │ (web page) │ │ (message relay)│ │ (crypto+state) │
77
+ └─────────────┘ └─────────────────┘ └──────────────────┘
78
+ │ │
79
+ │ MessagePort │
80
+ └──────────(key exchange + encrypted)──────┘
81
+ ```
82
+
83
+ **Security model:**
84
+
85
+ - The MessagePort is transferred via `window.postMessage` - other scripts on the page could intercept it
86
+ - **Security comes from encryption**: After key exchange, all communication is AES-256-GCM encrypted
87
+ - Content script never has access to private keys or session secrets
88
+ - All cryptographic operations happen in the background script (service worker)
89
+ - Anti-MITM verification (emoji grid) ensures both parties derived the same keys
90
+
91
+ ## Using Pre-built Connection Handlers
92
+
93
+ The SDK provides `BackgroundConnectionHandler` and `ContentScriptConnectionHandler` to handle the connection flow. These are the recommended way to build extension wallets.
94
+
95
+ ### Background Script Setup
96
+
97
+ ```typescript
98
+ import {
99
+ BackgroundConnectionHandler,
100
+ type BackgroundConnectionConfig,
101
+ type BackgroundConnectionCallbacks,
102
+ type BackgroundTransport,
103
+ } from '@aztec/wallet-sdk/extension/handlers';
104
+ import { hashToEmoji } from '@aztec/wallet-sdk/crypto';
105
+
106
+ // Configuration for your wallet
107
+ const config: BackgroundConnectionConfig = {
108
+ walletId: 'my-aztec-wallet',
109
+ walletName: 'My Aztec Wallet',
110
+ walletVersion: '1.0.0',
111
+ walletIcon: 'https://example.com/icon.png',
112
+ };
113
+
114
+ // Transport for browser extension APIs
115
+ const transport: BackgroundTransport = {
116
+ sendToTab: (tabId, message) => browser.tabs.sendMessage(tabId, message),
117
+ addContentListener: (handler) => browser.runtime.onMessage.addListener(handler),
118
+ };
119
+
120
+ // Event callbacks (all optional)
121
+ const callbacks: BackgroundConnectionCallbacks = {
122
+ // Called when a new discovery request is received
123
+ onPendingDiscovery: (discovery) => {
124
+ // Show pending connection in wallet UI
125
+ // Check if wallet supports this network (chainId AND version)
126
+ const supported = supportedNetworks.some(
127
+ n => n.chainId === discovery.chainInfo.chainId.toString() &&
128
+ n.version === discovery.chainInfo.version.toString()
129
+ );
130
+ if (supported) {
131
+ // Show the user so they can approve or reject
132
+ }
133
+ },
134
+
135
+ // Called when key exchange completes and session is ready
136
+ onSessionEstablished: (session) => {
137
+ // Display verification emojis for user reference
138
+ console.log('Session emojis:', hashToEmoji(session.verificationHash));
139
+ },
140
+
141
+ // Called when a session is terminated
142
+ onSessionTerminated: (requestId) => {
143
+ console.log('Session terminated:', requestId);
144
+ },
145
+
146
+ // Called when a decrypted wallet message is received
147
+ onWalletMessage: (session, message) => {
148
+ // Forward to your wallet backend
149
+ wallet.postMessage(message);
150
+ },
151
+ };
152
+
153
+ const handler = new BackgroundConnectionHandler(config, transport, callbacks);
154
+
155
+ // Initialize the handler to start listening
156
+ handler.initialize();
157
+
158
+ // User approves connection from wallet UI
159
+ function approveConnection(requestId: string) {
160
+ handler.approveDiscovery(requestId);
161
+ }
162
+
163
+ // User denies connection
164
+ function denyConnection(requestId: string) {
165
+ handler.rejectDiscovery(requestId);
166
+ }
167
+
168
+ // Send response back to dApp
169
+ async function sendWalletResponse(requestId: string, response: WalletResponse) {
170
+ await handler.sendResponse(requestId, response);
171
+ }
172
+
173
+ // Clean up on tab close/navigate
174
+ browser.tabs.onRemoved.addListener((tabId) => {
175
+ handler.terminateForTab(tabId);
176
+ });
177
+ ```
178
+
179
+ ### Content Script Setup
180
+
181
+ ```typescript
182
+ import {
183
+ ContentScriptConnectionHandler,
184
+ type ContentScriptTransport,
185
+ } from '@aztec/wallet-sdk/extension/handlers';
186
+
187
+ const transport: ContentScriptTransport = {
188
+ sendToBackground: (message) => browser.runtime.sendMessage(message),
189
+ addBackgroundListener: (handler) => browser.runtime.onMessage.addListener(handler),
190
+ };
191
+
192
+ const handler = new ContentScriptConnectionHandler(transport);
193
+
194
+ // Start listening for discovery requests and background messages
195
+ handler.start();
196
+ ```
197
+
198
+ ## Testing Your Integration (dApp Side)
199
+
200
+ The `WalletManager` supports two patterns for consuming discovered wallets.
201
+
202
+ ### Async Iterator Pattern
203
+
204
+ ```typescript
205
+ import { Fr } from '@aztec/foundation/fields';
206
+ import { WalletManager } from '@aztec/wallet-sdk/manager';
207
+ import { hashToEmoji } from '@aztec/wallet-sdk/crypto';
208
+
209
+ const discovery = WalletManager.configure({
210
+ extensions: { enabled: true },
211
+ }).getAvailableWallets({
212
+ chainInfo: {
213
+ chainId: new Fr(31337),
214
+ version: new Fr(1),
215
+ },
216
+ appId: 'my-dapp',
217
+ timeout: 60000,
218
+ });
219
+
220
+ // Iterate over discovered wallets as they're approved
221
+ for await (const provider of discovery.wallets) {
222
+ console.log(`Found: ${provider.name}`);
223
+
224
+ // Establish secure channel (key exchange)
225
+ const pending = await provider.establishSecureChannel('my-dapp');
226
+
227
+ // Display verification emojis to user
228
+ const emojis = hashToEmoji(pending.verificationHash);
229
+ console.log('Verify this matches your wallet:', emojis);
230
+
231
+ // User confirms emojis match
232
+ const wallet = await pending.confirm();
233
+
234
+ // All calls are now encrypted
235
+ const accounts = await wallet.getAccounts();
236
+ console.log('Accounts:', accounts);
237
+ }
238
+
239
+ // Cancel discovery when done or on cleanup
240
+ discovery.cancel();
241
+ ```
242
+
243
+ ### Callback Pattern
244
+
245
+ ```typescript
246
+ import { Fr } from '@aztec/foundation/fields';
247
+ import { WalletManager, type WalletProvider } from '@aztec/wallet-sdk/manager';
248
+ import { hashToEmoji } from '@aztec/wallet-sdk/crypto';
249
+
250
+ const discoveredProviders: WalletProvider[] = [];
251
+
252
+ const discovery = WalletManager.configure({
253
+ extensions: { enabled: true },
254
+ }).getAvailableWallets({
255
+ chainInfo: {
256
+ chainId: new Fr(31337),
257
+ version: new Fr(1),
258
+ },
259
+ appId: 'my-dapp',
260
+ timeout: 60000,
261
+ // Callback fires as each wallet is discovered
262
+ onWalletDiscovered: (provider) => {
263
+ discoveredProviders.push(provider);
264
+ updateUI(); // Your UI update function
265
+ },
266
+ });
267
+
268
+ // Wait for discovery to complete (or cancel early with discovery.cancel())
269
+ await discovery.done;
270
+ console.log('Discovery complete, found:', discoveredProviders.length);
271
+
272
+ // Connect to a selected provider
273
+ async function connectToWallet(provider: WalletProvider) {
274
+ const pending = await provider.establishSecureChannel('my-dapp');
275
+
276
+ // Show verification UI
277
+ const emojis = hashToEmoji(pending.verificationHash);
278
+ showVerificationDialog(emojis);
279
+
280
+ // User confirms
281
+ const wallet = await pending.confirm();
282
+ return wallet;
283
+ }
284
+ ```
285
+
286
+ ### React Hook Example
287
+
288
+ ```typescript
289
+ function useWalletDiscovery(chainInfo: ChainInfo, appId: string) {
290
+ const [providers, setProviders] = useState<WalletProvider[]>([]);
291
+ const [isDiscovering, setIsDiscovering] = useState(true);
292
+ const discoveryRef = useRef<DiscoverySession | null>(null);
293
+
294
+ useEffect(() => {
295
+ setProviders([]);
296
+ setIsDiscovering(true);
297
+
298
+ const discovery = WalletManager.configure({
299
+ extensions: { enabled: true },
300
+ }).getAvailableWallets({
301
+ chainInfo,
302
+ appId,
303
+ timeout: 60000,
304
+ onWalletDiscovered: (provider) => {
305
+ setProviders(prev => [...prev, provider]);
306
+ },
307
+ });
308
+
309
+ discoveryRef.current = discovery;
310
+
311
+ discovery.done.then(() => setIsDiscovering(false));
312
+
313
+ return () => {
314
+ discovery.cancel();
315
+ discoveryRef.current = null;
316
+ };
317
+ }, [chainInfo.chainId.toString(), chainInfo.version.toString(), appId]);
318
+
319
+ return { providers, isDiscovering, cancel: () => discoveryRef.current?.cancel() };
320
+ }
321
+ ```
@@ -0,0 +1,117 @@
1
+ import type { Account } from '@aztec/aztec.js/account';
2
+ import type { CallIntent, IntentInnerHash } from '@aztec/aztec.js/authorization';
3
+ import { type InteractionWaitOptions, type SendReturn } from '@aztec/aztec.js/contracts';
4
+ import type { FeePaymentMethod } from '@aztec/aztec.js/fee';
5
+ import type { Aliased, AppCapabilities, BatchResults, BatchedMethod, PrivateEvent, PrivateEventFilter, ProfileOptions, SendOptions, SimulateOptions, Wallet, WalletCapabilities } from '@aztec/aztec.js/wallet';
6
+ import { AccountFeePaymentMethodOptions } from '@aztec/entrypoints/account';
7
+ import type { ChainInfo } from '@aztec/entrypoints/interfaces';
8
+ import { Fr } from '@aztec/foundation/curves/bn254';
9
+ import type { FieldsOf } from '@aztec/foundation/types';
10
+ import type { PXE } from '@aztec/pxe/server';
11
+ import { type ContractArtifact, type EventMetadataDefinition, type FunctionCall } from '@aztec/stdlib/abi';
12
+ import type { AuthWitness } from '@aztec/stdlib/auth-witness';
13
+ import type { AztecAddress } from '@aztec/stdlib/aztec-address';
14
+ import { type ContractInstanceWithAddress } from '@aztec/stdlib/contract';
15
+ import { GasSettings } from '@aztec/stdlib/gas';
16
+ import type { AztecNode } from '@aztec/stdlib/interfaces/client';
17
+ import type { TxExecutionRequest, TxProfileResult, TxSimulationResult, UtilitySimulationResult } from '@aztec/stdlib/tx';
18
+ import { ExecutionPayload } from '@aztec/stdlib/tx';
19
+ /**
20
+ * Options to configure fee payment for a transaction
21
+ */
22
+ export type FeeOptions = {
23
+ /**
24
+ * A wallet-provided fallback fee payment method that is used only if the transaction that is being constructed
25
+ * doesn't already include one
26
+ */
27
+ walletFeePaymentMethod?: FeePaymentMethod;
28
+ /** Configuration options for the account to properly handle the selected fee payment method */
29
+ accountFeePaymentMethodOptions: AccountFeePaymentMethodOptions;
30
+ /** The gas settings to use for the transaction */
31
+ gasSettings: GasSettings;
32
+ };
33
+ /**
34
+ * A base class for Wallet implementations
35
+ */
36
+ export declare abstract class BaseWallet implements Wallet {
37
+ protected readonly pxe: PXE;
38
+ protected readonly aztecNode: AztecNode;
39
+ protected log: import("@aztec/foundation/log").Logger;
40
+ protected minFeePadding: number;
41
+ protected cancellableTransactions: boolean;
42
+ protected constructor(pxe: PXE, aztecNode: AztecNode);
43
+ protected abstract getAccountFromAddress(address: AztecAddress): Promise<Account>;
44
+ abstract getAccounts(): Promise<Aliased<AztecAddress>[]>;
45
+ /**
46
+ * Returns the list of aliased contacts associated with the wallet.
47
+ * This base implementation directly returns PXE's senders, but note that in general contacts are a superset of senders.
48
+ * - Senders: Addresses we check during synching in case they sent us notes,
49
+ * - Contacts: more general concept akin to a phone's contact list.
50
+ * @returns The aliased collection of AztecAddresses that form this wallet's address book
51
+ */
52
+ getAddressBook(): Promise<Aliased<AztecAddress>[]>;
53
+ getChainInfo(): Promise<ChainInfo>;
54
+ protected createTxExecutionRequestFromPayloadAndFee(executionPayload: ExecutionPayload, from: AztecAddress, feeOptions: FeeOptions): Promise<TxExecutionRequest>;
55
+ createAuthWit(from: AztecAddress, messageHashOrIntent: IntentInnerHash | CallIntent): Promise<AuthWitness>;
56
+ /**
57
+ * Request capabilities from the wallet.
58
+ *
59
+ * This method is wallet-implementation-dependent and must be provided by classes extending BaseWallet.
60
+ * Embedded wallets typically don't support capability-based authorization (no user authorization flow),
61
+ * while external wallets (browser extensions, hardware wallets) implement this to reduce authorization
62
+ * friction by allowing apps to request permissions upfront.
63
+ *
64
+ * TODO: Consider making it abstract so implementing it is a conscious decision. Leaving it as-is
65
+ * while the feature stabilizes.
66
+ *
67
+ * @param _manifest - Application capability manifest declaring what operations the app needs
68
+ */
69
+ requestCapabilities(_manifest: AppCapabilities): Promise<WalletCapabilities>;
70
+ batch<const T extends readonly BatchedMethod[]>(methods: T): Promise<BatchResults<T>>;
71
+ /**
72
+ * Completes partial user-provided fee options with wallet defaults.
73
+ * @param from - The address where the transaction is being sent from
74
+ * @param feePayer - The address paying for fees (if any fee payment method is embedded in the execution payload)
75
+ * @param gasSettings - User-provided partial gas settings
76
+ * @returns - Complete fee options that can be used to create a transaction execution request
77
+ */
78
+ protected completeFeeOptions(from: AztecAddress, feePayer?: AztecAddress, gasSettings?: Partial<FieldsOf<GasSettings>>): Promise<FeeOptions>;
79
+ /**
80
+ * Completes partial user-provided fee options with unreasonably high gas limits
81
+ * for gas estimation. Uses the same logic as completeFeeOptions but sets high limits
82
+ * to avoid running out of gas during estimation.
83
+ * @param from - The address where the transaction is being sent from
84
+ * @param feePayer - The address paying for fees (if any fee payment method is embedded in the execution payload)
85
+ * @param gasSettings - User-provided partial gas settings
86
+ */
87
+ protected completeFeeOptionsForEstimation(from: AztecAddress, feePayer?: AztecAddress, gasSettings?: Partial<FieldsOf<GasSettings>>): Promise<{
88
+ /**
89
+ * A wallet-provided fallback fee payment method that is used only if the transaction that is being constructed
90
+ * doesn't already include one
91
+ */
92
+ walletFeePaymentMethod?: FeePaymentMethod | undefined;
93
+ /** Configuration options for the account to properly handle the selected fee payment method */
94
+ accountFeePaymentMethodOptions: AccountFeePaymentMethodOptions;
95
+ gasSettings: GasSettings;
96
+ }>;
97
+ registerSender(address: AztecAddress, _alias?: string): Promise<AztecAddress>;
98
+ registerContract(instance: ContractInstanceWithAddress, artifact?: ContractArtifact, secretKey?: Fr): Promise<ContractInstanceWithAddress>;
99
+ simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
100
+ profileTx(executionPayload: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
101
+ sendTx<W extends InteractionWaitOptions = undefined>(executionPayload: ExecutionPayload, opts: SendOptions<W>): Promise<SendReturn<W>>;
102
+ protected contextualizeError(err: Error, ...context: string[]): Error;
103
+ simulateUtility(call: FunctionCall, authwits?: AuthWitness[]): Promise<UtilitySimulationResult>;
104
+ getPrivateEvents<T>(eventDef: EventMetadataDefinition, eventFilter: PrivateEventFilter): Promise<PrivateEvent<T>[]>;
105
+ getContractMetadata(address: AztecAddress): Promise<{
106
+ instance: ContractInstanceWithAddress | undefined;
107
+ isContractInitialized: boolean;
108
+ isContractPublished: boolean;
109
+ isContractUpdated: boolean;
110
+ updatedContractClassId: Fr | undefined;
111
+ }>;
112
+ getContractClassMetadata(id: Fr): Promise<{
113
+ isArtifactRegistered: boolean;
114
+ isContractClassPubliclyRegistered: boolean;
115
+ }>;
116
+ }
117
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZV93YWxsZXQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iYXNlLXdhbGxldC9iYXNlX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