@manahippo/aptos-wallet-adapter 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/WalletAdapters/BaseAdapter.js +14 -6
- package/dist/WalletAdapters/BaseAdapter.js.map +1 -1
- package/dist/WalletAdapters/FewchaWallet.js +152 -127
- package/dist/WalletAdapters/FewchaWallet.js.map +1 -1
- package/dist/WalletAdapters/HippoExtensionWallet.js +119 -97
- package/dist/WalletAdapters/HippoExtensionWallet.js.map +1 -1
- package/dist/WalletAdapters/HippoWallet.js +131 -105
- package/dist/WalletAdapters/HippoWallet.js.map +1 -1
- package/dist/WalletAdapters/MartianWallet.js +133 -110
- package/dist/WalletAdapters/MartianWallet.js.map +1 -1
- package/dist/WalletAdapters/NightlyWallet.js +5 -1
- package/dist/WalletAdapters/NightlyWallet.js.map +1 -1
- package/dist/WalletAdapters/PetraWallet.js +127 -101
- package/dist/WalletAdapters/PetraWallet.js.map +1 -1
- package/dist/WalletAdapters/PontemWallet.js +128 -102
- package/dist/WalletAdapters/PontemWallet.js.map +1 -1
- package/dist/WalletAdapters/SpikaWallet.js +136 -111
- package/dist/WalletAdapters/SpikaWallet.js.map +1 -1
- package/dist/WalletAdapters/index.js +24 -8
- package/dist/WalletAdapters/index.js.map +1 -1
- package/dist/WalletProviders/WalletProvider.js +82 -71
- package/dist/WalletProviders/WalletProvider.js.map +1 -1
- package/dist/WalletProviders/errors.js +41 -19
- package/dist/WalletProviders/errors.js.map +1 -1
- package/dist/WalletProviders/index.js +19 -3
- package/dist/WalletProviders/index.js.map +1 -1
- package/dist/WalletProviders/useWallet.js +8 -4
- package/dist/WalletProviders/useWallet.js.map +1 -1
- package/dist/config/aptosConstants.js +13 -10
- package/dist/config/aptosConstants.js.map +1 -1
- package/dist/hooks/useLocalStorage.js +9 -5
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useSSR.js +8 -4
- package/dist/hooks/useSSR.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/utilities/util.js +5 -1
- package/dist/utilities/util.js.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,12 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.scopePollingDetectionStrategy = exports.BaseWalletAdapter = exports.WalletReadyState = exports.EventEmitter = void 0;
|
7
|
+
const eventemitter3_1 = __importDefault(require("eventemitter3"));
|
8
|
+
exports.EventEmitter = eventemitter3_1.default;
|
9
|
+
var WalletReadyState;
|
4
10
|
(function (WalletReadyState) {
|
5
11
|
/**
|
6
12
|
* User-installable wallets can typically be detected by scanning for an API
|
@@ -19,13 +25,14 @@ export var WalletReadyState;
|
|
19
25
|
* mobile) then it will stay in the `Unsupported` state.
|
20
26
|
*/
|
21
27
|
WalletReadyState["Unsupported"] = "Unsupported";
|
22
|
-
})(WalletReadyState || (WalletReadyState = {}));
|
23
|
-
|
28
|
+
})(WalletReadyState = exports.WalletReadyState || (exports.WalletReadyState = {}));
|
29
|
+
class BaseWalletAdapter extends eventemitter3_1.default {
|
24
30
|
get connected() {
|
25
31
|
return !!this.publicAccount.publicKey;
|
26
32
|
}
|
27
33
|
}
|
28
|
-
|
34
|
+
exports.BaseWalletAdapter = BaseWalletAdapter;
|
35
|
+
function scopePollingDetectionStrategy(detect) {
|
29
36
|
// Early return when server-side rendering
|
30
37
|
if (typeof window === 'undefined' || typeof document === 'undefined')
|
31
38
|
return;
|
@@ -60,4 +67,5 @@ export function scopePollingDetectionStrategy(detect) {
|
|
60
67
|
// Strategy #4: Detect synchronously, now.
|
61
68
|
detectAndDispose();
|
62
69
|
}
|
70
|
+
exports.scopePollingDetectionStrategy = scopePollingDetectionStrategy;
|
63
71
|
//# sourceMappingURL=BaseAdapter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BaseAdapter.js","sourceRoot":"","sources":["../../src/WalletAdapters/BaseAdapter.ts"],"names":[],"mappings":"AAEA,
|
1
|
+
{"version":3,"file":"BaseAdapter.js","sourceRoot":"","sources":["../../src/WalletAdapters/BaseAdapter.ts"],"names":[],"mappings":";;;;;;AAEA,kEAAyC;AAQhC,uBARF,uBAAY,CAQE;AAoBrB,IAAY,gBAkBX;AAlBD,WAAY,gBAAgB;IAC1B;;;;OAIG;IACH,2CAAuB,CAAA;IACvB,+CAA2B,CAAA;IAC3B;;;OAGG;IACH,yCAAqB,CAAA;IACrB;;;OAGG;IACH,+CAA2B,CAAA;AAC7B,CAAC,EAlBW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAkB3B;AA8CD,MAAsB,iBACpB,SAAQ,uBAAiC;IAezC,IAAI,SAAS;QACX,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC;IACxC,CAAC;CAaF;AA/BD,8CA+BC;AAED,SAAgB,6BAA6B,CAAC,MAAqB;IACjE,0CAA0C;IAC1C,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAE7E,MAAM,SAAS,GAAmB,EAAE,CAAC;IAErC,SAAS,gBAAgB;QACvB,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC;QAC1B,IAAI,QAAQ,EAAE;YACZ,KAAK,MAAM,OAAO,IAAI,SAAS,EAAE;gBAC/B,OAAO,EAAE,CAAC;aACX;SACF;IACH,CAAC;IAED,2CAA2C;IAC3C,MAAM,QAAQ;IACZ,kDAAkD;IAClD,WAAW,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE9C,wEAAwE;IACxE;IACE,qDAAqD;IACrD,QAAQ,CAAC,UAAU,KAAK,SAAS,EACjC;QACA,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAChF,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC,CAAC;KAC1F;IAED,2DAA2D;IAC3D;IACE,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,KAAK,UAAU,EAClC;QACA,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;KAC5E;IAED,0CAA0C;IAC1C,gBAAgB,EAAE,CAAC;AACrB,CAAC;AAzCD,sEAyCC"}
|
@@ -1,29 +1,44 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.FewchaWalletAdapter = exports.FewchaWalletName = void 0;
|
16
|
+
const errors_1 = require("../WalletProviders/errors");
|
17
|
+
const web3_1 = __importDefault(require("@fewcha/web3"));
|
18
|
+
const BaseAdapter_1 = require("./BaseAdapter");
|
19
|
+
exports.FewchaWalletName = 'Fewcha';
|
20
|
+
class FewchaWalletAdapter extends BaseAdapter_1.BaseWalletAdapter {
|
6
21
|
constructor({
|
7
22
|
// provider = WEBWALLET_URL,
|
8
23
|
// network = WalletAdapterNetwork.Mainnet,
|
9
24
|
timeout = 10000 } = {}) {
|
10
25
|
super();
|
11
|
-
this.name = FewchaWalletName;
|
26
|
+
this.name = exports.FewchaWalletName;
|
12
27
|
this.url = 'https://fewcha.app/';
|
13
28
|
this.icon = 'https://miro.medium.com/fit/c/176/176/1*a0WaY-q7gjCRiuryRG6TkQ.png';
|
14
29
|
this._readyState = typeof window === 'undefined' || typeof document === 'undefined'
|
15
|
-
? WalletReadyState.Unsupported
|
16
|
-
: WalletReadyState.NotDetected;
|
30
|
+
? BaseAdapter_1.WalletReadyState.Unsupported
|
31
|
+
: BaseAdapter_1.WalletReadyState.NotDetected;
|
17
32
|
// this._network = network;
|
18
|
-
this._provider = typeof window !== 'undefined' ? new
|
33
|
+
this._provider = typeof window !== 'undefined' ? new web3_1.default().action : undefined;
|
19
34
|
this._timeout = timeout;
|
20
35
|
this._connecting = false;
|
21
36
|
this._wallet = null;
|
22
37
|
// this._readyState = WalletReadyState.Installed;
|
23
|
-
if (typeof window !== 'undefined' && this._readyState !== WalletReadyState.Unsupported) {
|
24
|
-
scopePollingDetectionStrategy(() => {
|
38
|
+
if (typeof window !== 'undefined' && this._readyState !== BaseAdapter_1.WalletReadyState.Unsupported) {
|
39
|
+
(0, BaseAdapter_1.scopePollingDetectionStrategy)(() => {
|
25
40
|
if (window.fewcha) {
|
26
|
-
this._readyState = WalletReadyState.Installed;
|
41
|
+
this._readyState = BaseAdapter_1.WalletReadyState.Installed;
|
27
42
|
this.emit('readyStateChange', this._readyState);
|
28
43
|
return true;
|
29
44
|
}
|
@@ -32,150 +47,160 @@ export class FewchaWalletAdapter extends BaseWalletAdapter {
|
|
32
47
|
}
|
33
48
|
}
|
34
49
|
get publicAccount() {
|
50
|
+
var _a, _b, _c;
|
35
51
|
return {
|
36
|
-
publicKey: this._wallet
|
37
|
-
address: this._wallet
|
38
|
-
authKey: this._wallet
|
52
|
+
publicKey: ((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.publicKey) || null,
|
53
|
+
address: ((_b = this._wallet) === null || _b === void 0 ? void 0 : _b.address) || null,
|
54
|
+
authKey: ((_c = this._wallet) === null || _c === void 0 ? void 0 : _c.authKey) || null
|
39
55
|
};
|
40
56
|
}
|
41
57
|
get connecting() {
|
42
58
|
return this._connecting;
|
43
59
|
}
|
44
60
|
get connected() {
|
45
|
-
|
61
|
+
var _a;
|
62
|
+
return !!((_a = this._wallet) === null || _a === void 0 ? void 0 : _a.connected);
|
46
63
|
}
|
47
64
|
get readyState() {
|
48
65
|
return this._readyState;
|
49
66
|
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
this._readyState === WalletReadyState.
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
67
|
+
connect() {
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
69
|
+
try {
|
70
|
+
if (this.connected || this.connecting)
|
71
|
+
return;
|
72
|
+
if (!(this._readyState === BaseAdapter_1.WalletReadyState.Loadable ||
|
73
|
+
this._readyState === BaseAdapter_1.WalletReadyState.Installed))
|
74
|
+
throw new errors_1.WalletNotReadyError();
|
75
|
+
this._connecting = true;
|
76
|
+
const provider = this._provider || window.fewcha;
|
77
|
+
const isConnected = yield provider.isConnected();
|
78
|
+
if ((isConnected === null || isConnected === void 0 ? void 0 : isConnected.data) === true) {
|
79
|
+
yield provider.disconnect();
|
80
|
+
}
|
81
|
+
const response = yield provider.connect();
|
82
|
+
if (response.status === 401) {
|
83
|
+
throw new errors_1.WalletConnectionError('User has rejected the connection');
|
84
|
+
}
|
85
|
+
else if (response.status !== 200) {
|
86
|
+
throw new errors_1.WalletConnectionError('Wallet connect issue');
|
87
|
+
}
|
88
|
+
let accountDetail = Object.assign({}, response.data);
|
89
|
+
if (!accountDetail.publicKey) {
|
90
|
+
const accountResp = yield provider.account();
|
91
|
+
if (!accountResp.data.publicKey) {
|
92
|
+
throw new errors_1.WalletConnectionError('Wallet connect issue', response.data);
|
93
|
+
}
|
94
|
+
accountDetail = Object.assign({}, accountResp.data);
|
95
|
+
}
|
96
|
+
this._wallet = Object.assign({ connected: true }, accountDetail);
|
97
|
+
this._provider = provider;
|
98
|
+
this.emit('connect', this._wallet.publicKey);
|
62
99
|
}
|
63
|
-
|
64
|
-
|
65
|
-
throw
|
100
|
+
catch (error) {
|
101
|
+
this.emit('error', error);
|
102
|
+
throw error;
|
66
103
|
}
|
67
|
-
|
68
|
-
|
104
|
+
finally {
|
105
|
+
this._connecting = false;
|
69
106
|
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
107
|
+
});
|
108
|
+
}
|
109
|
+
disconnect() {
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
111
|
+
const provider = this._provider || window.fewcha;
|
112
|
+
if (provider) {
|
113
|
+
try {
|
114
|
+
const isDisconnected = yield provider.disconnect();
|
115
|
+
if (isDisconnected.data === true) {
|
116
|
+
this._provider = undefined;
|
117
|
+
this._wallet = null;
|
118
|
+
}
|
119
|
+
else {
|
120
|
+
throw new Error('Disconnect failed');
|
121
|
+
}
|
122
|
+
}
|
123
|
+
catch (error) {
|
124
|
+
this.emit('error', new errors_1.WalletDisconnectionError(error === null || error === void 0 ? void 0 : error.message, error));
|
125
|
+
throw error;
|
75
126
|
}
|
76
|
-
accountDetail = { ...accountResp.data };
|
77
127
|
}
|
78
|
-
this.
|
79
|
-
|
80
|
-
...accountDetail
|
81
|
-
};
|
82
|
-
this._provider = provider;
|
83
|
-
this.emit('connect', this._wallet.publicKey);
|
84
|
-
}
|
85
|
-
catch (error) {
|
86
|
-
this.emit('error', error);
|
87
|
-
throw error;
|
88
|
-
}
|
89
|
-
finally {
|
90
|
-
this._connecting = false;
|
91
|
-
}
|
128
|
+
this.emit('disconnect');
|
129
|
+
});
|
92
130
|
}
|
93
|
-
|
94
|
-
|
95
|
-
if (provider) {
|
131
|
+
signTransaction(transaction, options) {
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
96
133
|
try {
|
97
|
-
const
|
98
|
-
if (
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
throw new Error('
|
134
|
+
const wallet = this._wallet;
|
135
|
+
if (!wallet)
|
136
|
+
throw new errors_1.WalletNotConnectedError();
|
137
|
+
const provider = this._provider || window.fewcha;
|
138
|
+
const tx = yield provider.generateTransaction(transaction, options);
|
139
|
+
if (!tx)
|
140
|
+
throw new Error('Cannot generate transaction');
|
141
|
+
const response = yield (provider === null || provider === void 0 ? void 0 : provider.signTransaction(tx.data));
|
142
|
+
if (!response || response.status !== 200) {
|
143
|
+
throw new Error('No response');
|
104
144
|
}
|
145
|
+
return response.data;
|
105
146
|
}
|
106
147
|
catch (error) {
|
107
|
-
|
148
|
+
const errMsg = error instanceof Error ? error.message : error.response.data.message;
|
149
|
+
this.emit('error', new errors_1.WalletSignTransactionError(errMsg));
|
108
150
|
throw error;
|
109
151
|
}
|
110
|
-
}
|
111
|
-
this.emit('disconnect');
|
152
|
+
});
|
112
153
|
}
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
}
|
134
|
-
async signAndSubmitTransaction(transaction, options) {
|
135
|
-
try {
|
136
|
-
const wallet = this._wallet;
|
137
|
-
if (!wallet)
|
138
|
-
throw new WalletNotConnectedError();
|
139
|
-
const provider = this._provider || window.fewcha;
|
140
|
-
const tx = await provider.generateTransaction(transaction, options);
|
141
|
-
if (!tx)
|
142
|
-
throw new Error('Cannot generate transaction');
|
143
|
-
const response = await provider?.signAndSubmitTransaction(tx.data);
|
144
|
-
if (response.status === 401) {
|
145
|
-
throw new Error('User has rejected the transaction');
|
154
|
+
signAndSubmitTransaction(transaction, options) {
|
155
|
+
return __awaiter(this, void 0, void 0, function* () {
|
156
|
+
try {
|
157
|
+
const wallet = this._wallet;
|
158
|
+
if (!wallet)
|
159
|
+
throw new errors_1.WalletNotConnectedError();
|
160
|
+
const provider = this._provider || window.fewcha;
|
161
|
+
const tx = yield provider.generateTransaction(transaction, options);
|
162
|
+
if (!tx)
|
163
|
+
throw new Error('Cannot generate transaction');
|
164
|
+
const response = yield (provider === null || provider === void 0 ? void 0 : provider.signAndSubmitTransaction(tx.data));
|
165
|
+
if (response.status === 401) {
|
166
|
+
throw new Error('User has rejected the transaction');
|
167
|
+
}
|
168
|
+
else if (response.status !== 200) {
|
169
|
+
throw new Error('Transaction issue');
|
170
|
+
}
|
171
|
+
return {
|
172
|
+
hash: response.data
|
173
|
+
};
|
146
174
|
}
|
147
|
-
|
148
|
-
|
175
|
+
catch (error) {
|
176
|
+
const errMsg = error instanceof Error ? error.message : error.response.data.message;
|
177
|
+
this.emit('error', new errors_1.WalletSignAndSubmitMessageError(errMsg));
|
178
|
+
throw error;
|
149
179
|
}
|
150
|
-
|
151
|
-
hash: response.data
|
152
|
-
};
|
153
|
-
}
|
154
|
-
catch (error) {
|
155
|
-
const errMsg = error instanceof Error ? error.message : error.response.data.message;
|
156
|
-
this.emit('error', new WalletSignAndSubmitMessageError(errMsg));
|
157
|
-
throw error;
|
158
|
-
}
|
180
|
+
});
|
159
181
|
}
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
182
|
+
signMessage(msgPayload) {
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
184
|
+
try {
|
185
|
+
const wallet = this._wallet;
|
186
|
+
const provider = this._provider || window.fewcha;
|
187
|
+
if (!wallet || !provider)
|
188
|
+
throw new errors_1.WalletNotConnectedError();
|
189
|
+
const response = yield (provider === null || provider === void 0 ? void 0 : provider.signMessage(msgPayload));
|
190
|
+
if (response) {
|
191
|
+
return response.data;
|
192
|
+
}
|
193
|
+
else {
|
194
|
+
throw new Error('Sign Message failed');
|
195
|
+
}
|
169
196
|
}
|
170
|
-
|
171
|
-
|
197
|
+
catch (error) {
|
198
|
+
const errMsg = error.message;
|
199
|
+
this.emit('error', new errors_1.WalletSignMessageError(errMsg));
|
200
|
+
throw error;
|
172
201
|
}
|
173
|
-
}
|
174
|
-
catch (error) {
|
175
|
-
const errMsg = error.message;
|
176
|
-
this.emit('error', new WalletSignMessageError(errMsg));
|
177
|
-
throw error;
|
178
|
-
}
|
202
|
+
});
|
179
203
|
}
|
180
204
|
}
|
205
|
+
exports.FewchaWalletAdapter = FewchaWalletAdapter;
|
181
206
|
//# sourceMappingURL=FewchaWallet.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FewchaWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/FewchaWallet.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"FewchaWallet.js","sourceRoot":"","sources":["../../src/WalletAdapters/FewchaWallet.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAQmC;AACnC,wDAAsD;AACtD,+CAQuB;AAGV,QAAA,gBAAgB,GAAG,QAAgC,CAAC;AAcjE,MAAa,mBAAoB,SAAQ,+BAAiB;IAqBxD,YAAY;IACV,4BAA4B;IAC5B,0CAA0C;IAC1C,OAAO,GAAG,KAAK,KACQ,EAAE;QACzB,KAAK,EAAE,CAAC;QAzBV,SAAI,GAAG,wBAAgB,CAAC;QAExB,QAAG,GAAG,qBAAqB,CAAC;QAE5B,SAAI,GAAG,o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