@airgap/wallet 0.13.45-beta.1 → 0.13.45-beta.3
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.
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/utils/address.js +2 -3
- package/utils/address.js.map +1 -1
- package/utils/protocol.js +8 -60
- package/utils/protocol.js.map +1 -1
- package/wallet/AirGapWallet.js +60 -133
- package/wallet/AirGapWallet.js.map +1 -1
- package/wallet/offline/AirGapOfflineWallet.js +5 -25
- package/wallet/offline/AirGapOfflineWallet.js.map +1 -1
- package/wallet/online/AirGapCoinWallet.js +72 -186
- package/wallet/online/AirGapCoinWallet.js.map +1 -1
- package/wallet/online/AirGapNFTWallet.js +56 -168
- package/wallet/online/AirGapNFTWallet.js.map +1 -1
- package/wallet/online/AirGapOnlineWallet.js +110 -237
- package/wallet/online/AirGapOnlineWallet.js.map +1 -1
|
@@ -1,259 +1,132 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
var __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
-
function step(op) {
|
|
42
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
-
while (_) try {
|
|
44
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
45
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
-
switch (op[0]) {
|
|
47
|
-
case 0: case 1: t = op; break;
|
|
48
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
-
default:
|
|
52
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
-
if (t[2]) _.ops.pop();
|
|
57
|
-
_.trys.pop(); continue;
|
|
58
|
-
}
|
|
59
|
-
op = body.call(thisArg, _);
|
|
60
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
3
|
exports.AirGapOnlineWallet = void 0;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
_this.priceService = priceService;
|
|
75
|
-
return _this;
|
|
4
|
+
const coinlib_core_1 = require("@airgap/coinlib-core");
|
|
5
|
+
const module_kit_1 = require("@airgap/module-kit");
|
|
6
|
+
const protocol_1 = require("@airgap/module-kit/utils/protocol");
|
|
7
|
+
const AirGapWallet_1 = require("../AirGapWallet");
|
|
8
|
+
class AirGapOnlineWallet extends AirGapWallet_1.AirGapWallet {
|
|
9
|
+
constructor(protocol, publicKey, derivationPath, masterFingerprint, status, priceService, addressIndex) {
|
|
10
|
+
super(protocol, publicKey, derivationPath, masterFingerprint, status, addressIndex);
|
|
11
|
+
this.priceService = priceService;
|
|
76
12
|
}
|
|
77
|
-
|
|
78
|
-
|
|
13
|
+
addressesToCheck() {
|
|
14
|
+
const addressesToReceive = this.addressIndex !== undefined ? [this.addresses[this.addressIndex]] : this.addresses;
|
|
79
15
|
return addressesToReceive;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
case 2:
|
|
91
|
-
_a.sent();
|
|
92
|
-
return [2 /*return*/];
|
|
93
|
-
}
|
|
16
|
+
}
|
|
17
|
+
async setProtocol(protocol) {
|
|
18
|
+
await super.setProtocol(protocol);
|
|
19
|
+
this.reset();
|
|
20
|
+
await this.synchronize();
|
|
21
|
+
}
|
|
22
|
+
async synchronize(...args) {
|
|
23
|
+
if (this.synchronizePromise === undefined) {
|
|
24
|
+
this.synchronizePromise = this._synchronize(...args).finally(() => {
|
|
25
|
+
this.synchronizePromise = undefined;
|
|
94
26
|
});
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
AirGapOnlineWallet.prototype.synchronize = function () {
|
|
98
|
-
var args = [];
|
|
99
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
100
|
-
args[_i] = arguments[_i];
|
|
101
27
|
}
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (!(0, protocol_1.canFetchDataForMultipleAddresses)(this.protocol)) return [3 /*break*/, 5];
|
|
145
|
-
return [4 /*yield*/, this.protocol.getTransactionsForAddresses(this.addressesToCheck(), limit, cursor)];
|
|
146
|
-
case 4:
|
|
147
|
-
_a = _b.sent();
|
|
148
|
-
return [3 /*break*/, 7];
|
|
149
|
-
case 5: return [4 /*yield*/, this.protocol.getTransactionsForAddress(this.addressesToCheck()[0], limit, cursor)];
|
|
150
|
-
case 6:
|
|
151
|
-
_a = _b.sent();
|
|
152
|
-
_b.label = 7;
|
|
153
|
-
case 7:
|
|
154
|
-
transactions = _a;
|
|
155
|
-
return [3 /*break*/, 12];
|
|
156
|
-
case 8:
|
|
157
|
-
if (!(this.publicKey.type === 'xpub')) return [3 /*break*/, 10];
|
|
158
|
-
if (!(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
159
|
-
// This *should* never happen because of how the constructor is typed, but the compiler doesn't know it.
|
|
160
|
-
// TODO: check if there's a way to tell the compiler here that `publicKey: ExtendedPublicKey => protocol: AirGapOnlineExtendedProtocol`
|
|
161
|
-
throw this.xpubRequiresExtendedProtocolError();
|
|
162
|
-
}
|
|
163
|
-
return [4 /*yield*/, this.protocol.getTransactionsForPublicKey(this.publicKey, limit, cursor)];
|
|
164
|
-
case 9:
|
|
165
|
-
transactions = _b.sent();
|
|
166
|
-
return [3 /*break*/, 12];
|
|
167
|
-
case 10: return [4 /*yield*/, this.protocol.getTransactionsForPublicKey(this.publicKey, limit, cursor)];
|
|
168
|
-
case 11:
|
|
169
|
-
transactions = _b.sent();
|
|
170
|
-
_b.label = 12;
|
|
171
|
-
case 12: return [2 /*return*/, transactions];
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
AirGapOnlineWallet.prototype.prepareTransaction = function (details, fee, data) {
|
|
177
|
-
if (data === void 0) { data = {}; }
|
|
28
|
+
return this.synchronizePromise;
|
|
29
|
+
}
|
|
30
|
+
async fetchTransactions(limit, cursor) {
|
|
31
|
+
const protocolIdentifier = (await this.protocol.getMetadata()).identifier;
|
|
32
|
+
let transactions;
|
|
33
|
+
if ((protocolIdentifier === coinlib_core_1.MainProtocolSymbols.BTC ||
|
|
34
|
+
protocolIdentifier === coinlib_core_1.MainProtocolSymbols.BTC_SEGWIT ||
|
|
35
|
+
protocolIdentifier === coinlib_core_1.MainProtocolSymbols.BTC_TAPROOT ||
|
|
36
|
+
protocolIdentifier === coinlib_core_1.MainProtocolSymbols.GRS) &&
|
|
37
|
+
this.publicKey.type === 'xpub' &&
|
|
38
|
+
(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
39
|
+
// TODO: Remove and test
|
|
40
|
+
/*
|
|
41
|
+
We should remove this if BTC also uses blockbook. (And change the order of the if/else below)
|
|
42
|
+
|
|
43
|
+
The problem is that we have addresses cached for all protocols. But blockbook (grs) doesn't allow
|
|
44
|
+
multiple addresses to be checked at once, so we need to xPub key there (or we would do 100s of requests).
|
|
45
|
+
|
|
46
|
+
We can also not simply change the order of the following if/else, because then it would use the xPub method for
|
|
47
|
+
BTC as well, which results in the addresses being derived again, which causes massive lags in the apps.
|
|
48
|
+
*/
|
|
49
|
+
transactions = await this.protocol.getTransactionsForPublicKey(this.publicKey, limit, cursor);
|
|
50
|
+
}
|
|
51
|
+
else if ((this.addresses.length > 0 && (0, protocol_1.canFetchDataForAddress)(this.protocol)) || (0, protocol_1.canFetchDataForMultipleAddresses)(this.protocol)) {
|
|
52
|
+
transactions = (0, protocol_1.canFetchDataForMultipleAddresses)(this.protocol)
|
|
53
|
+
? await this.protocol.getTransactionsForAddresses(this.addressesToCheck(), limit, cursor)
|
|
54
|
+
: await this.protocol.getTransactionsForAddress(this.addressesToCheck()[0], limit, cursor);
|
|
55
|
+
}
|
|
56
|
+
else if (this.publicKey.type === 'xpub') {
|
|
57
|
+
if (!(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
58
|
+
// This *should* never happen because of how the constructor is typed, but the compiler doesn't know it.
|
|
59
|
+
// TODO: check if there's a way to tell the compiler here that `publicKey: ExtendedPublicKey => protocol: AirGapOnlineExtendedProtocol`
|
|
60
|
+
throw this.xpubRequiresExtendedProtocolError();
|
|
61
|
+
}
|
|
62
|
+
transactions = await this.protocol.getTransactionsForPublicKey(this.publicKey, limit, cursor);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
transactions = await this.protocol.getTransactionsForPublicKey(this.publicKey, limit, cursor);
|
|
66
|
+
}
|
|
67
|
+
return transactions;
|
|
68
|
+
}
|
|
69
|
+
prepareTransaction(details, fee, data = {}) {
|
|
178
70
|
if (this.publicKey.type === 'xpub') {
|
|
179
71
|
if (!(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
180
72
|
// This *should* never happen because of how the constructor is typed, but the compiler doesn't know it.
|
|
181
73
|
// TODO: check if there's a way to tell the compiler here that `publicKey: ExtendedPublicKey => protocol: AirGapOnlineExtendedProtocol`
|
|
182
74
|
throw this.xpubRequiresExtendedProtocolError();
|
|
183
75
|
}
|
|
184
|
-
return this.protocol.prepareTransactionWithPublicKey(this.publicKey, details, { fee
|
|
76
|
+
return this.protocol.prepareTransactionWithPublicKey(this.publicKey, details, { fee });
|
|
185
77
|
}
|
|
186
78
|
else {
|
|
187
79
|
if (this.addressIndex) {
|
|
188
80
|
// TODO: what should we do with addressIndex?
|
|
189
81
|
data = Object.assign(data, { addressIndex: this.addressIndex });
|
|
190
82
|
}
|
|
191
|
-
return this.protocol.prepareTransactionWithPublicKey(this.publicKey, details, { fee
|
|
83
|
+
return this.protocol.prepareTransactionWithPublicKey(this.publicKey, details, { fee });
|
|
192
84
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
if
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
};
|
|
240
|
-
AirGapOnlineWallet.prototype.toJSON = function () {
|
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
var _a, base, networkIdentifier;
|
|
243
|
-
return __generator(this, function (_b) {
|
|
244
|
-
switch (_b.label) {
|
|
245
|
-
case 0: return [4 /*yield*/, Promise.all([
|
|
246
|
-
_super.prototype.toJSON.call(this),
|
|
247
|
-
this.protocol.getNetwork().then(function (network) { return (0, module_kit_1.protocolNetworkIdentifier)(network); })
|
|
248
|
-
])];
|
|
249
|
-
case 1:
|
|
250
|
-
_a = _b.sent(), base = _a[0], networkIdentifier = _a[1];
|
|
251
|
-
return [2 /*return*/, __assign(__assign({}, base), { networkIdentifier: networkIdentifier })];
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
return AirGapOnlineWallet;
|
|
257
|
-
}(AirGapWallet_1.AirGapWallet));
|
|
85
|
+
}
|
|
86
|
+
async getMaxTransferValue(recipients, fee, data = {}) {
|
|
87
|
+
if (this.publicKey.type === 'xpub') {
|
|
88
|
+
if (!(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
89
|
+
// This *should* never happen because of how the constructor is typed, but the compiler doesn't know it.
|
|
90
|
+
// TODO: check if there's a way to tell the compiler here that `publicKey: ExtendedPublicKey => protocol: AirGapOnlineExtendedProtocol`
|
|
91
|
+
throw this.xpubRequiresExtendedProtocolError();
|
|
92
|
+
}
|
|
93
|
+
return this.protocol.getTransactionMaxAmountWithPublicKey(this.publicKey, recipients, { fee });
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
if (this.addressIndex) {
|
|
97
|
+
// TODO: what should we do with addressIndex?
|
|
98
|
+
data = Object.assign(data, { addressIndex: this.addressIndex });
|
|
99
|
+
}
|
|
100
|
+
return this.protocol.getTransactionMaxAmountWithPublicKey(this.publicKey, recipients, { fee });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async estimateFees(details, data = {}) {
|
|
104
|
+
if (this.publicKey.type === 'xpub') {
|
|
105
|
+
if (!(0, module_kit_1.isBip32Protocol)(this.protocol)) {
|
|
106
|
+
// This *should* never happen because of how the constructor is typed, but the compiler doesn't know it.
|
|
107
|
+
// TODO: check if there's a way to tell the compiler here that `publicKey: ExtendedPublicKey => protocol: AirGapOnlineExtendedProtocol`
|
|
108
|
+
throw this.xpubRequiresExtendedProtocolError();
|
|
109
|
+
}
|
|
110
|
+
return this.protocol.getTransactionFeeWithPublicKey(this.publicKey, details);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
if (this.addressIndex) {
|
|
114
|
+
// TODO: what should we do with addressIndex?
|
|
115
|
+
data = Object.assign(data, { addressIndex: this.addressIndex });
|
|
116
|
+
}
|
|
117
|
+
return this.protocol.getTransactionFeeWithPublicKey(this.publicKey, details);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async toJSON() {
|
|
121
|
+
const [base, networkIdentifier] = await Promise.all([
|
|
122
|
+
super.toJSON(),
|
|
123
|
+
this.protocol.getNetwork().then((network) => (0, module_kit_1.protocolNetworkIdentifier)(network))
|
|
124
|
+
]);
|
|
125
|
+
return {
|
|
126
|
+
...base,
|
|
127
|
+
networkIdentifier
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
258
131
|
exports.AirGapOnlineWallet = AirGapOnlineWallet;
|
|
259
132
|
//# sourceMappingURL=AirGapOnlineWallet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AirGapOnlineWallet.js","sourceRoot":"","sources":["../../../src/wallet/online/AirGapOnlineWallet.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AirGapOnlineWallet.js","sourceRoot":"","sources":["../../../src/wallet/online/AirGapOnlineWallet.ts"],"names":[],"mappings":";;;AAAA,uDAA0D;AAE1D,mDAa2B;AAC3B,gEAA4G;AAE5G,kDAA0F;AAW1F,MAAsB,kBAEpB,SAAQ,2BAAqC;IAG7C,YACE,QAAW,EACX,SAIW,EACX,cAAsB,EACtB,iBAAyB,EACzB,MAA0B,EACV,YAAsC,EACtD,YAAqB;QAErB,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,CAAC,CAAA;QAHnE,iBAAY,GAAZ,YAAY,CAA0B;IAIxD,CAAC;IAcS,gBAAgB;QACxB,MAAM,kBAAkB,GAAa,IAAI,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAA;QAE3H,OAAO,kBAAkB,CAAA;IAC3B,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,QAAW;QAClC,MAAM,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;QACjC,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,MAAM,IAAI,CAAC,WAAW,EAAE,CAAA;IAC1B,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,GAAG,IAAS;QACnC,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YAC1C,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,YAAY,CA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