@getpara/core-sdk 2.11.0 → 2.13.0
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/dist/cjs/ParaCore.js +809 -2003
- package/dist/cjs/constants.js +4 -1
- package/dist/cjs/services/AuthService.js +787 -0
- package/dist/cjs/services/BaseAuthFlowService.js +78 -0
- package/dist/cjs/services/ExternalWalletService.js +386 -0
- package/dist/cjs/services/LoginFlowService.js +163 -0
- package/dist/cjs/services/PollingService.js +448 -0
- package/dist/cjs/services/PortalUrlService.js +379 -0
- package/dist/cjs/services/PregenWalletService.js +442 -0
- package/dist/cjs/services/SessionManagementService.js +280 -0
- package/dist/cjs/services/SignupFlowService.js +185 -0
- package/dist/cjs/services/VerificationFlowService.js +242 -0
- package/dist/cjs/services/WalletService.js +577 -0
- package/dist/cjs/services/types/AuthServiceTypes.js +15 -0
- package/dist/cjs/services/types/BaseAuthFlowServiceTypes.js +15 -0
- package/dist/cjs/services/types/ExternalWalletServiceTypes.js +15 -0
- package/dist/cjs/services/types/LoginFlowServiceTypes.js +15 -0
- package/dist/cjs/services/types/PollingServiceTypes.js +15 -0
- package/dist/cjs/services/types/PortalUrlServiceTypes.js +15 -0
- package/dist/cjs/services/types/PregenWalletServiceTypes.js +15 -0
- package/dist/cjs/services/types/SessionManagementServiceTypes.js +15 -0
- package/dist/cjs/services/types/SignupFlowServiceTypes.js +15 -0
- package/dist/cjs/services/types/VerificationFlowServiceTypes.js +15 -0
- package/dist/cjs/services/types/WalletServiceTypes.js +15 -0
- package/dist/cjs/services/types/index.js +15 -0
- package/dist/cjs/state/CoreStateManager.js +297 -0
- package/dist/cjs/state/actors/authenticateWithEmailOrPhone.js +50 -0
- package/dist/cjs/state/actors/authenticateWithExternalWallet.js +50 -0
- package/dist/cjs/state/actors/authenticateWithFarcaster.js +50 -0
- package/dist/cjs/state/actors/authenticateWithFarcasterLegacy.js +50 -0
- package/dist/cjs/state/actors/authenticateWithTelegram.js +50 -0
- package/dist/cjs/state/actors/authenticateWithTelegramLegacy.js +50 -0
- package/dist/cjs/state/actors/checkUserState.js +53 -0
- package/dist/cjs/state/actors/claimWallets.js +56 -0
- package/dist/cjs/state/actors/connectExternalConnectors.js +54 -0
- package/dist/cjs/state/actors/connectExternalWallet.js +50 -0
- package/dist/cjs/state/actors/createGuestWallets.js +50 -0
- package/dist/cjs/state/actors/createWallets.js +73 -0
- package/dist/cjs/state/actors/polling.js +91 -0
- package/dist/cjs/state/actors/processAuthentication.js +50 -0
- package/dist/cjs/state/actors/setupAfterLogin.js +52 -0
- package/dist/cjs/state/actors/setupPara.js +50 -0
- package/dist/cjs/state/actors/signExternalWalletVerification.js +79 -0
- package/dist/cjs/state/actors/switchExternalWallet.js +50 -0
- package/dist/cjs/state/actors/verifyExternalWallet.js +50 -0
- package/dist/cjs/state/actors/verifyNewAccount.js +50 -0
- package/dist/cjs/state/actors/waitForExternalWalletProviders.js +54 -0
- package/dist/cjs/state/machines/authStateMachine.helpers.js +137 -0
- package/dist/cjs/state/machines/authStateMachine.js +1084 -0
- package/dist/cjs/state/machines/coreStateMachine.js +383 -0
- package/dist/cjs/state/machines/walletStateMachine.js +437 -0
- package/dist/cjs/state/types/auth.js +15 -0
- package/dist/cjs/state/types/core.js +15 -0
- package/dist/cjs/state/types/wallet.js +15 -0
- package/dist/cjs/types/{auth.js → accountLinking.js} +3 -3
- package/dist/cjs/types/authState.js +15 -0
- package/dist/cjs/types/coreApi.js +3 -1
- package/dist/cjs/types/index.js +2 -2
- package/dist/cjs/types/serviceInterfaces.js +15 -0
- package/dist/cjs/types/util.js +15 -0
- package/dist/cjs/utils/formatting.js +6 -0
- package/dist/cjs/utils/retryBackoff.js +30 -0
- package/dist/cjs/utils/stateErrorHelpers.js +60 -0
- package/dist/cjs/utils/stateListener.js +129 -0
- package/dist/esm/ParaCore.js +812 -2031
- package/dist/esm/constants.js +3 -1
- package/dist/esm/services/AuthService.js +717 -0
- package/dist/esm/services/BaseAuthFlowService.js +25 -0
- package/dist/esm/services/ExternalWalletService.js +327 -0
- package/dist/esm/services/LoginFlowService.js +97 -0
- package/dist/esm/services/PollingService.js +389 -0
- package/dist/esm/services/PortalUrlService.js +320 -0
- package/dist/esm/services/PregenWalletService.js +393 -0
- package/dist/esm/services/SessionManagementService.js +236 -0
- package/dist/esm/services/SignupFlowService.js +119 -0
- package/dist/esm/services/VerificationFlowService.js +178 -0
- package/dist/esm/services/WalletService.js +514 -0
- package/dist/esm/services/types/AuthServiceTypes.js +0 -0
- package/dist/esm/services/types/BaseAuthFlowServiceTypes.js +0 -0
- package/dist/esm/services/types/ExternalWalletServiceTypes.js +0 -0
- package/dist/esm/services/types/LoginFlowServiceTypes.js +0 -0
- package/dist/esm/services/types/PollingServiceTypes.js +0 -0
- package/dist/esm/services/types/PortalUrlServiceTypes.js +0 -0
- package/dist/esm/services/types/PregenWalletServiceTypes.js +0 -0
- package/dist/esm/services/types/SessionManagementServiceTypes.js +0 -0
- package/dist/esm/services/types/SignupFlowServiceTypes.js +0 -0
- package/dist/esm/services/types/VerificationFlowServiceTypes.js +0 -0
- package/dist/esm/services/types/WalletServiceTypes.js +0 -0
- package/dist/esm/services/types/index.js +0 -0
- package/dist/esm/state/CoreStateManager.js +261 -0
- package/dist/esm/state/actors/authenticateWithEmailOrPhone.js +10 -0
- package/dist/esm/state/actors/authenticateWithExternalWallet.js +10 -0
- package/dist/esm/state/actors/authenticateWithFarcaster.js +10 -0
- package/dist/esm/state/actors/authenticateWithFarcasterLegacy.js +10 -0
- package/dist/esm/state/actors/authenticateWithTelegram.js +10 -0
- package/dist/esm/state/actors/authenticateWithTelegramLegacy.js +10 -0
- package/dist/esm/state/actors/checkUserState.js +13 -0
- package/dist/esm/state/actors/claimWallets.js +16 -0
- package/dist/esm/state/actors/connectExternalConnectors.js +14 -0
- package/dist/esm/state/actors/connectExternalWallet.js +10 -0
- package/dist/esm/state/actors/createGuestWallets.js +10 -0
- package/dist/esm/state/actors/createWallets.js +20 -0
- package/dist/esm/state/actors/polling.js +55 -0
- package/dist/esm/state/actors/processAuthentication.js +10 -0
- package/dist/esm/state/actors/setupAfterLogin.js +12 -0
- package/dist/esm/state/actors/setupPara.js +10 -0
- package/dist/esm/state/actors/signExternalWalletVerification.js +15 -0
- package/dist/esm/state/actors/switchExternalWallet.js +10 -0
- package/dist/esm/state/actors/verifyExternalWallet.js +10 -0
- package/dist/esm/state/actors/verifyNewAccount.js +10 -0
- package/dist/esm/state/actors/waitForExternalWalletProviders.js +14 -0
- package/dist/esm/state/machines/authStateMachine.helpers.js +92 -0
- package/dist/esm/state/machines/authStateMachine.js +1039 -0
- package/dist/esm/state/machines/coreStateMachine.js +343 -0
- package/dist/esm/state/machines/walletStateMachine.js +382 -0
- package/dist/esm/state/types/auth.js +0 -0
- package/dist/esm/state/types/core.js +0 -0
- package/dist/esm/state/types/wallet.js +0 -0
- package/dist/esm/types/authState.js +0 -0
- package/dist/esm/types/coreApi.js +3 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/serviceInterfaces.js +0 -0
- package/dist/esm/types/util.js +0 -0
- package/dist/esm/utils/formatting.js +6 -0
- package/dist/esm/utils/retryBackoff.js +7 -0
- package/dist/esm/utils/stateErrorHelpers.js +37 -0
- package/dist/esm/utils/stateListener.js +106 -0
- package/dist/types/ParaCore.d.ts +190 -119
- package/dist/types/PlatformUtils.d.ts +23 -0
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/services/AuthService.d.ts +72 -0
- package/dist/types/services/BaseAuthFlowService.d.ts +28 -0
- package/dist/types/services/ExternalWalletService.d.ts +44 -0
- package/dist/types/services/LoginFlowService.d.ts +9 -0
- package/dist/types/services/PollingService.d.ts +35 -0
- package/dist/types/services/PortalUrlService.d.ts +26 -0
- package/dist/types/services/PregenWalletService.d.ts +38 -0
- package/dist/types/services/SessionManagementService.d.ts +28 -0
- package/dist/types/services/SignupFlowService.d.ts +10 -0
- package/dist/types/services/VerificationFlowService.d.ts +17 -0
- package/dist/types/services/WalletService.d.ts +54 -0
- package/dist/types/services/types/AuthServiceTypes.d.ts +147 -0
- package/dist/types/services/types/BaseAuthFlowServiceTypes.d.ts +4 -0
- package/dist/types/services/types/ExternalWalletServiceTypes.d.ts +67 -0
- package/dist/types/services/types/LoginFlowServiceTypes.d.ts +19 -0
- package/dist/types/services/types/PollingServiceTypes.d.ts +82 -0
- package/dist/types/services/types/PortalUrlServiceTypes.d.ts +46 -0
- package/dist/types/services/types/PregenWalletServiceTypes.d.ts +73 -0
- package/dist/types/services/types/SessionManagementServiceTypes.d.ts +27 -0
- package/dist/types/services/types/SignupFlowServiceTypes.d.ts +18 -0
- package/dist/types/services/types/VerificationFlowServiceTypes.d.ts +90 -0
- package/dist/types/services/types/WalletServiceTypes.d.ts +109 -0
- package/dist/types/services/types/index.d.ts +11 -0
- package/dist/types/state/CoreStateManager.d.ts +36 -0
- package/dist/types/state/actors/authenticateWithEmailOrPhone.d.ts +8 -0
- package/dist/types/state/actors/authenticateWithExternalWallet.d.ts +8 -0
- package/dist/types/state/actors/authenticateWithFarcaster.d.ts +3 -0
- package/dist/types/state/actors/authenticateWithFarcasterLegacy.d.ts +3 -0
- package/dist/types/state/actors/authenticateWithTelegram.d.ts +3 -0
- package/dist/types/state/actors/authenticateWithTelegramLegacy.d.ts +8 -0
- package/dist/types/state/actors/checkUserState.d.ts +6 -0
- package/dist/types/state/actors/claimWallets.d.ts +8 -0
- package/dist/types/state/actors/connectExternalConnectors.d.ts +4 -0
- package/dist/types/state/actors/connectExternalWallet.d.ts +3 -0
- package/dist/types/state/actors/createGuestWallets.d.ts +3 -0
- package/dist/types/state/actors/createWallets.d.ts +10 -0
- package/dist/types/state/actors/polling.d.ts +3 -0
- package/dist/types/state/actors/processAuthentication.d.ts +10 -0
- package/dist/types/state/actors/setupAfterLogin.d.ts +5 -0
- package/dist/types/state/actors/setupPara.d.ts +2 -0
- package/dist/types/state/actors/signExternalWalletVerification.d.ts +7 -0
- package/dist/types/state/actors/switchExternalWallet.d.ts +3 -0
- package/dist/types/state/actors/verifyExternalWallet.d.ts +8 -0
- package/dist/types/state/actors/verifyNewAccount.d.ts +8 -0
- package/dist/types/state/actors/waitForExternalWalletProviders.d.ts +2 -0
- package/dist/types/state/machines/authStateMachine.d.ts +2570 -0
- package/dist/types/state/machines/authStateMachine.helpers.d.ts +57 -0
- package/dist/types/state/machines/coreStateMachine.d.ts +22033 -0
- package/dist/types/state/machines/walletStateMachine.d.ts +1049 -0
- package/dist/types/state/types/auth.d.ts +113 -0
- package/dist/types/state/types/core.d.ts +114 -0
- package/dist/types/state/types/wallet.d.ts +76 -0
- package/dist/types/types/authState.d.ts +66 -0
- package/dist/types/types/config.d.ts +5 -0
- package/dist/types/types/coreApi.d.ts +148 -298
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/types/methods.d.ts +1 -191
- package/dist/types/types/serviceInterfaces.d.ts +125 -0
- package/dist/types/types/util.d.ts +43 -0
- package/dist/types/types/wallet.d.ts +3 -1
- package/dist/types/utils/retryBackoff.d.ts +2 -0
- package/dist/types/utils/stateErrorHelpers.d.ts +2 -0
- package/dist/types/utils/stateListener.d.ts +47 -0
- package/package.json +5 -4
- /package/dist/esm/types/{auth.js → accountLinking.js} +0 -0
- /package/dist/types/types/{auth.d.ts → accountLinking.d.ts} +0 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__async,
|
|
3
|
+
__objRest,
|
|
4
|
+
__privateAdd,
|
|
5
|
+
__privateGet,
|
|
6
|
+
__privateSet,
|
|
7
|
+
__spreadProps,
|
|
8
|
+
__spreadValues
|
|
9
|
+
} from "../chunk-7B52C2XE.js";
|
|
10
|
+
var _authService, _pollingService, _pregenWalletService, _externalWalletService, _paraCoreInterface, _wallets, _currentWalletIds, _isWalletOwned, _getMissingTypes, _encodeWalletBase64;
|
|
11
|
+
import { WALLET_TYPES } from "@getpara/user-management-client";
|
|
12
|
+
import {
|
|
13
|
+
entityToWallet,
|
|
14
|
+
getEquivalentTypes,
|
|
15
|
+
getSchemes,
|
|
16
|
+
isWalletSupported,
|
|
17
|
+
migrateWallet,
|
|
18
|
+
WalletSchemeTypeMap
|
|
19
|
+
} from "../utils/wallet.js";
|
|
20
|
+
import { dispatchEvent, getCosmosAddress, truncateAddress } from "../utils/index.js";
|
|
21
|
+
import { ParaEvent } from "../types/events.js";
|
|
22
|
+
import { LOCAL_STORAGE_CURRENT_WALLET_IDS, LOCAL_STORAGE_WALLETS, SHORT_POLLING_INTERVAL_MS } from "../constants.js";
|
|
23
|
+
import { distributeNewShare } from "../shares/shareDistribution.js";
|
|
24
|
+
import { sendRecoveryForShare } from "../shares/recovery.js";
|
|
25
|
+
class WalletService {
|
|
26
|
+
constructor(paraCore) {
|
|
27
|
+
__privateAdd(this, _authService);
|
|
28
|
+
__privateAdd(this, _pollingService);
|
|
29
|
+
__privateAdd(this, _pregenWalletService);
|
|
30
|
+
__privateAdd(this, _externalWalletService);
|
|
31
|
+
__privateAdd(this, _paraCoreInterface);
|
|
32
|
+
__privateAdd(this, _wallets);
|
|
33
|
+
__privateAdd(this, _currentWalletIds, {});
|
|
34
|
+
this.init = ({
|
|
35
|
+
authService,
|
|
36
|
+
pollingService,
|
|
37
|
+
pregenWalletService,
|
|
38
|
+
externalWalletService
|
|
39
|
+
}) => {
|
|
40
|
+
__privateSet(this, _authService, authService);
|
|
41
|
+
__privateSet(this, _pollingService, pollingService);
|
|
42
|
+
__privateSet(this, _pregenWalletService, pregenWalletService);
|
|
43
|
+
__privateSet(this, _externalWalletService, externalWalletService);
|
|
44
|
+
};
|
|
45
|
+
this.setWallets = (wallets) => __async(this, null, function* () {
|
|
46
|
+
this.wallets = wallets;
|
|
47
|
+
if (__privateGet(this, _paraCoreInterface).platformUtils.secureStorage) {
|
|
48
|
+
yield __privateGet(this, _paraCoreInterface).platformUtils.secureStorage.set(LOCAL_STORAGE_WALLETS, JSON.stringify(wallets));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
yield __privateGet(this, _paraCoreInterface).localStorageSetItem(LOCAL_STORAGE_WALLETS, JSON.stringify(wallets));
|
|
52
|
+
});
|
|
53
|
+
this.refreshShare = (_0) => __async(this, [_0], function* ({
|
|
54
|
+
walletId,
|
|
55
|
+
share,
|
|
56
|
+
oldPartnerId,
|
|
57
|
+
newPartnerId,
|
|
58
|
+
keyShareProtocolId,
|
|
59
|
+
redistributeBackupEncryptedShares
|
|
60
|
+
}) {
|
|
61
|
+
const { signer, protocolId } = yield __privateGet(this, _paraCoreInterface).platformUtils.refresh(
|
|
62
|
+
__privateGet(this, _paraCoreInterface).ctx,
|
|
63
|
+
__privateGet(this, _paraCoreInterface).retrieveSessionCookie(),
|
|
64
|
+
__privateGet(this, _authService).userId,
|
|
65
|
+
walletId,
|
|
66
|
+
share,
|
|
67
|
+
oldPartnerId,
|
|
68
|
+
newPartnerId,
|
|
69
|
+
keyShareProtocolId
|
|
70
|
+
);
|
|
71
|
+
const recoverySecret = yield distributeNewShare({
|
|
72
|
+
ctx: __privateGet(this, _paraCoreInterface).ctx,
|
|
73
|
+
userId: __privateGet(this, _authService).userId,
|
|
74
|
+
walletId,
|
|
75
|
+
userShare: signer,
|
|
76
|
+
ignoreRedistributingBackupEncryptedShare: !redistributeBackupEncryptedShares,
|
|
77
|
+
emailProps: __privateGet(this, _paraCoreInterface).getBackupKitEmailProps(),
|
|
78
|
+
partnerId: newPartnerId,
|
|
79
|
+
protocolId,
|
|
80
|
+
isEnclaveUser: __privateGet(this, _authService).isEnclaveUser,
|
|
81
|
+
walletScheme: this.wallets[walletId].scheme
|
|
82
|
+
});
|
|
83
|
+
return { signer, recoverySecret, protocolId };
|
|
84
|
+
});
|
|
85
|
+
__privateAdd(this, _isWalletOwned, (wallet) => {
|
|
86
|
+
return this.isWalletSupported(wallet) && !(wallet == null ? void 0 : wallet.pregenIdentifier) && !(wallet == null ? void 0 : wallet.pregenIdentifierType) && !!__privateGet(this, _authService).userId && (wallet == null ? void 0 : wallet.userId) === __privateGet(this, _authService).userId;
|
|
87
|
+
});
|
|
88
|
+
__privateAdd(this, _getMissingTypes, () => __async(this, null, function* () {
|
|
89
|
+
const { supportedWalletTypes } = yield __privateGet(this, _paraCoreInterface).assertPartner();
|
|
90
|
+
return supportedWalletTypes.filter(
|
|
91
|
+
({ type: t, optional }) => !optional && Object.values(this.wallets).every((w) => !__privateGet(this, _isWalletOwned).call(this, w) || !WalletSchemeTypeMap[w.scheme][t])
|
|
92
|
+
).map(({ type }) => type);
|
|
93
|
+
}));
|
|
94
|
+
this.getTypesToCreate = (types) => __async(this, null, function* () {
|
|
95
|
+
const { supportedWalletTypes } = yield __privateGet(this, _paraCoreInterface).assertPartner();
|
|
96
|
+
return getSchemes(types != null ? types : yield __privateGet(this, _getMissingTypes).call(this)).map((scheme) => {
|
|
97
|
+
switch (scheme) {
|
|
98
|
+
case "ED25519":
|
|
99
|
+
return "SOLANA";
|
|
100
|
+
default:
|
|
101
|
+
return supportedWalletTypes.some(({ type, optional }) => type === "COSMOS" && !optional) ? "COSMOS" : "EVM";
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
this.populateWalletAddresses = () => __async(this, null, function* () {
|
|
106
|
+
const res = yield (__privateGet(this, _paraCoreInterface).isPortal() ? __privateGet(this, _paraCoreInterface).ctx.client.getAllWallets : __privateGet(this, _paraCoreInterface).ctx.client.getWallets)(__privateGet(this, _authService).userId, true);
|
|
107
|
+
const wallets = res.data.wallets;
|
|
108
|
+
wallets.forEach((entity) => {
|
|
109
|
+
if (this.wallets[entity.id]) {
|
|
110
|
+
this.wallets[entity.id] = __spreadValues(__spreadValues({}, entityToWallet(entity)), this.wallets[entity.id]);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
yield this.setWallets(this.wallets);
|
|
114
|
+
});
|
|
115
|
+
this.addToCurrentWalletIds = (walletIds, options) => __async(this, null, function* () {
|
|
116
|
+
const updatedWalletIds = __spreadValues({}, this.currentWalletIds);
|
|
117
|
+
Object.entries(walletIds).forEach(([type, ids]) => {
|
|
118
|
+
var _a;
|
|
119
|
+
updatedWalletIds[type] = [.../* @__PURE__ */ new Set([...(_a = updatedWalletIds[type]) != null ? _a : [], ...ids])];
|
|
120
|
+
});
|
|
121
|
+
yield this.setCurrentWalletIds(updatedWalletIds, options);
|
|
122
|
+
});
|
|
123
|
+
this.setCurrentWalletIds = (_0, ..._1) => __async(this, [_0, ..._1], function* (currentWalletIds, { needsWallet = false, sessionLookupId, newDeviceSessionLookupId } = {}) {
|
|
124
|
+
this.currentWalletIds = currentWalletIds;
|
|
125
|
+
yield __privateGet(this, _paraCoreInterface).localStorageSetItem(
|
|
126
|
+
LOCAL_STORAGE_CURRENT_WALLET_IDS,
|
|
127
|
+
JSON.stringify(this.currentWalletIds)
|
|
128
|
+
);
|
|
129
|
+
if (sessionLookupId) {
|
|
130
|
+
yield __privateGet(this, _paraCoreInterface).ctx.client.setCurrentWalletIds(
|
|
131
|
+
__privateGet(this, _authService).userId,
|
|
132
|
+
this.currentWalletIds,
|
|
133
|
+
needsWallet,
|
|
134
|
+
sessionLookupId,
|
|
135
|
+
newDeviceSessionLookupId
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
dispatchEvent(ParaEvent.WALLETS_CHANGE_EVENT, null);
|
|
139
|
+
});
|
|
140
|
+
this.createWallet = (..._0) => __async(this, [..._0], function* ({ type: _type, skipDistribute = false } = {}) {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
__privateGet(this, _paraCoreInterface).requireApiKey();
|
|
143
|
+
const { supportedWalletTypes } = yield __privateGet(this, _paraCoreInterface).assertPartner();
|
|
144
|
+
const walletType = yield this.assertIsValidWalletType(
|
|
145
|
+
_type != null ? _type : (_a = supportedWalletTypes.find(({ optional }) => !optional)) == null ? void 0 : _a.type
|
|
146
|
+
);
|
|
147
|
+
let signer;
|
|
148
|
+
let wallet;
|
|
149
|
+
let keygenRes;
|
|
150
|
+
switch (walletType) {
|
|
151
|
+
case "SOLANA": {
|
|
152
|
+
keygenRes = yield __privateGet(this, _paraCoreInterface).platformUtils.ed25519Keygen(
|
|
153
|
+
__privateGet(this, _paraCoreInterface).ctx,
|
|
154
|
+
__privateGet(this, _authService).userId,
|
|
155
|
+
__privateGet(this, _paraCoreInterface).retrieveSessionCookie(),
|
|
156
|
+
__privateGet(this, _paraCoreInterface).getBackupKitEmailProps()
|
|
157
|
+
);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
default: {
|
|
161
|
+
keygenRes = yield __privateGet(this, _paraCoreInterface).platformUtils.keygen(
|
|
162
|
+
__privateGet(this, _paraCoreInterface).ctx,
|
|
163
|
+
__privateGet(this, _authService).userId,
|
|
164
|
+
walletType,
|
|
165
|
+
null,
|
|
166
|
+
__privateGet(this, _paraCoreInterface).retrieveSessionCookie(),
|
|
167
|
+
__privateGet(this, _paraCoreInterface).getBackupKitEmailProps()
|
|
168
|
+
);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const walletId = keygenRes.walletId;
|
|
173
|
+
const walletScheme = walletType === "SOLANA" ? "ED25519" : "DKLS";
|
|
174
|
+
signer = keygenRes.signer;
|
|
175
|
+
yield __privateGet(this, _pollingService).poll({
|
|
176
|
+
checkCondition: __privateGet(this, _pollingService).waitForWalletAddress({ walletId }),
|
|
177
|
+
intervalMs: SHORT_POLLING_INTERVAL_MS,
|
|
178
|
+
maxPolls: 10
|
|
179
|
+
});
|
|
180
|
+
let recoveryShare = null;
|
|
181
|
+
if (!skipDistribute) {
|
|
182
|
+
recoveryShare = yield distributeNewShare({
|
|
183
|
+
ctx: __privateGet(this, _paraCoreInterface).ctx,
|
|
184
|
+
userId: __privateGet(this, _authService).userId,
|
|
185
|
+
walletId,
|
|
186
|
+
userShare: signer,
|
|
187
|
+
emailProps: __privateGet(this, _paraCoreInterface).getBackupKitEmailProps(),
|
|
188
|
+
isEnclaveUser: __privateGet(this, _authService).isEnclaveUser,
|
|
189
|
+
walletScheme
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
this.wallets[walletId] = {
|
|
193
|
+
id: walletId,
|
|
194
|
+
signer,
|
|
195
|
+
scheme: walletScheme,
|
|
196
|
+
type: walletType
|
|
197
|
+
};
|
|
198
|
+
wallet = this.wallets[walletId];
|
|
199
|
+
yield this.populateWalletAddresses();
|
|
200
|
+
yield this.addToCurrentWalletIds({
|
|
201
|
+
[walletType]: [.../* @__PURE__ */ new Set([...(_b = this.currentWalletIds[walletType]) != null ? _b : [], walletId])]
|
|
202
|
+
});
|
|
203
|
+
const walletNoSigner = __spreadValues({}, wallet);
|
|
204
|
+
delete walletNoSigner.signer;
|
|
205
|
+
dispatchEvent(ParaEvent.WALLET_CREATED, {
|
|
206
|
+
wallet: walletNoSigner,
|
|
207
|
+
recoverySecret: recoveryShare
|
|
208
|
+
});
|
|
209
|
+
return [wallet, recoveryShare];
|
|
210
|
+
});
|
|
211
|
+
this.createWalletPerType = (..._0) => __async(this, [..._0], function* ({ skipDistribute = false, types } = {}) {
|
|
212
|
+
const wallets = [];
|
|
213
|
+
const walletIds = {};
|
|
214
|
+
let recoverySecret;
|
|
215
|
+
for (const type of yield this.getTypesToCreate(types)) {
|
|
216
|
+
const [wallet, recoveryShare] = yield this.createWallet({ type, skipDistribute });
|
|
217
|
+
wallets.push(wallet);
|
|
218
|
+
getEquivalentTypes(type).filter((t) => !!this.isWalletTypeEnabled[t]).forEach((t) => {
|
|
219
|
+
walletIds[t] = [wallet.id];
|
|
220
|
+
});
|
|
221
|
+
if (recoveryShare) {
|
|
222
|
+
recoverySecret = recoveryShare;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return { wallets, walletIds, recoverySecret };
|
|
226
|
+
});
|
|
227
|
+
this.findWalletId = (walletId, filter = {}) => {
|
|
228
|
+
if (walletId) {
|
|
229
|
+
this.assertIsValidWalletId(walletId, filter);
|
|
230
|
+
} else {
|
|
231
|
+
for (const id of [...this.currentWalletIdsUnique, ...Object.keys(this.wallets)]) {
|
|
232
|
+
if (this.isWalletUsable(id, filter)) {
|
|
233
|
+
walletId = id;
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (!walletId) {
|
|
238
|
+
throw new Error(`no valid wallet id found`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return walletId;
|
|
242
|
+
};
|
|
243
|
+
this.findWalletByAddress = (address, filter) => {
|
|
244
|
+
if (__privateGet(this, _externalWalletService).externalWallets[address]) {
|
|
245
|
+
return __privateGet(this, _externalWalletService).externalWallets[address];
|
|
246
|
+
}
|
|
247
|
+
let wallet;
|
|
248
|
+
Object.entries(this.currentWalletIds).forEach(([type, walletIds]) => {
|
|
249
|
+
const pregenWalletIds = Object.keys(this.wallets).filter(
|
|
250
|
+
(id) => this.wallets[id].type === type && __privateGet(this, _pregenWalletService).isPregenWalletClaimable(this.wallets[id])
|
|
251
|
+
);
|
|
252
|
+
[...walletIds, ...pregenWalletIds].forEach((id) => {
|
|
253
|
+
if (address.toLowerCase() === this.getDisplayAddress(id, { addressType: type }).toLowerCase()) {
|
|
254
|
+
wallet = this.wallets[id];
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
if (!wallet) {
|
|
259
|
+
throw new Error(`wallet with address ${address} not found`);
|
|
260
|
+
}
|
|
261
|
+
this.assertIsValidWalletId(wallet.id, filter);
|
|
262
|
+
return wallet;
|
|
263
|
+
};
|
|
264
|
+
this.findWallet = (idOrAddress, overrideType, filter = {}) => {
|
|
265
|
+
var _a, _c, _d;
|
|
266
|
+
if (!__privateGet(this, _authService).isExternalWalletAuth) {
|
|
267
|
+
if (!idOrAddress && Object.keys(__privateGet(this, _externalWalletService).externalWallets).length > 0) {
|
|
268
|
+
return Object.values(__privateGet(this, _externalWalletService).externalWallets)[0];
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
if ((_a = __privateGet(this, _externalWalletService).externalWallets) == null ? void 0 : _a[idOrAddress]) {
|
|
272
|
+
return __privateGet(this, _externalWalletService).externalWallets[idOrAddress];
|
|
273
|
+
}
|
|
274
|
+
try {
|
|
275
|
+
const walletId = this.findWalletId(idOrAddress, filter);
|
|
276
|
+
if (walletId && !!this.wallets[walletId]) {
|
|
277
|
+
const _b = this.wallets[walletId], { signer: _signer } = _b, wallet = __objRest(_b, ["signer"]);
|
|
278
|
+
const type = (_d = overrideType != null ? overrideType : (_c = this.currentWalletIdsArray.find(([id]) => id === walletId)) == null ? void 0 : _c[1]) != null ? _d : wallet.type;
|
|
279
|
+
return __spreadProps(__spreadValues({}, wallet), {
|
|
280
|
+
type
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
} catch (e) {
|
|
284
|
+
return void 0;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
this.getDisplayAddress = (walletId, options = {}) => {
|
|
288
|
+
var _a, _b;
|
|
289
|
+
if (__privateGet(this, _externalWalletService).externalWallets[walletId]) {
|
|
290
|
+
const wallet2 = __privateGet(this, _externalWalletService).externalWallets[walletId];
|
|
291
|
+
return options.truncate ? truncateAddress(wallet2.address, wallet2.type, {
|
|
292
|
+
prefix: __privateGet(this, _paraCoreInterface).cosmosPrefix,
|
|
293
|
+
targetLength: options.targetLength
|
|
294
|
+
}) : wallet2.address;
|
|
295
|
+
}
|
|
296
|
+
const wallet = this.findWallet(walletId, options.addressType);
|
|
297
|
+
if (!wallet) {
|
|
298
|
+
return void 0;
|
|
299
|
+
}
|
|
300
|
+
let str;
|
|
301
|
+
let prefix;
|
|
302
|
+
switch (wallet.type) {
|
|
303
|
+
case "COSMOS":
|
|
304
|
+
prefix = (_b = (_a = options.cosmosPrefix) != null ? _a : __privateGet(this, _paraCoreInterface).cosmosPrefix) != null ? _b : "cosmos";
|
|
305
|
+
str = getCosmosAddress(wallet.publicKey, prefix);
|
|
306
|
+
break;
|
|
307
|
+
default:
|
|
308
|
+
prefix = __privateGet(this, _paraCoreInterface).cosmosPrefix;
|
|
309
|
+
str = wallet.address;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
return options.truncate ? truncateAddress(str, wallet.type, { prefix, targetLength: options.targetLength }) : str;
|
|
313
|
+
};
|
|
314
|
+
this.getIdenticonHash = (walletId, overrideType) => {
|
|
315
|
+
if (__privateGet(this, _externalWalletService).externalWallets[walletId]) {
|
|
316
|
+
const wallet2 = __privateGet(this, _externalWalletService).externalWallets[walletId];
|
|
317
|
+
return `${wallet2.id}-${wallet2.address}-${wallet2.type}`;
|
|
318
|
+
}
|
|
319
|
+
const wallet = this.findWallet(walletId, overrideType);
|
|
320
|
+
return wallet ? `${wallet.id}-${wallet.address}-${wallet.type}` : void 0;
|
|
321
|
+
};
|
|
322
|
+
this.isWalletSupported = (wallet) => {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
return !((_a = __privateGet(this, _paraCoreInterface).partner) == null ? void 0 : _a.supportedWalletTypes) || isWalletSupported((_b = __privateGet(this, _paraCoreInterface).partner.supportedWalletTypes.map(({ type }) => type)) != null ? _b : [], wallet);
|
|
325
|
+
};
|
|
326
|
+
this.isWalletOwned = (wallet) => {
|
|
327
|
+
return this.isWalletSupported(wallet) && !(wallet == null ? void 0 : wallet.pregenIdentifier) && !(wallet == null ? void 0 : wallet.pregenIdentifierType) && !!__privateGet(this, _authService).userId && (wallet == null ? void 0 : wallet.userId) === __privateGet(this, _authService).userId;
|
|
328
|
+
};
|
|
329
|
+
this.isWalletUsable = (walletId, { type: types, scheme: schemes, forbidPregen = false } = {}, throwError = false) => {
|
|
330
|
+
var _a, _b;
|
|
331
|
+
let error;
|
|
332
|
+
if ((_a = __privateGet(this, _externalWalletService).externalWallets) == null ? void 0 : _a[walletId]) {
|
|
333
|
+
return true;
|
|
334
|
+
}
|
|
335
|
+
if (!this.wallets[walletId]) {
|
|
336
|
+
error = `wallet with id ${walletId} does not exist`;
|
|
337
|
+
} else {
|
|
338
|
+
const wallet = this.wallets[walletId];
|
|
339
|
+
const [isUnclaimed, isOwned] = [__privateGet(this, _pregenWalletService).isPregenWalletUnclaimed(wallet), this.isWalletOwned(wallet)];
|
|
340
|
+
if (forbidPregen && isUnclaimed && wallet.pregenIdentifierType !== "GUEST_ID") {
|
|
341
|
+
error = `pre-generated wallet with id ${wallet == null ? void 0 : wallet.id} cannot be selected`;
|
|
342
|
+
} else if (!isOwned && !isUnclaimed) {
|
|
343
|
+
error = `wallet with id ${wallet == null ? void 0 : wallet.id} is not owned by the current user`;
|
|
344
|
+
} else if (!this.isWalletSupported(wallet)) {
|
|
345
|
+
error = `wallet with id ${wallet.id} and type ${wallet.type} is not supported, supported types are: ${(((_b = __privateGet(this, _paraCoreInterface).partner) == null ? void 0 : _b.supportedWalletTypes) || []).map(({ type }) => type).join(", ")}`;
|
|
346
|
+
} else if (types && (!getEquivalentTypes(types).includes(wallet == null ? void 0 : wallet.type) || isOwned && !types.some((type) => {
|
|
347
|
+
var _a2, _b2;
|
|
348
|
+
return (_b2 = (_a2 = this.currentWalletIds) == null ? void 0 : _a2[type]) == null ? void 0 : _b2.includes(walletId);
|
|
349
|
+
}))) {
|
|
350
|
+
error = `wallet with id ${wallet == null ? void 0 : wallet.id} and type ${wallet == null ? void 0 : wallet.type} cannot be selected`;
|
|
351
|
+
} else if (schemes && !schemes.includes(wallet == null ? void 0 : wallet.scheme)) {
|
|
352
|
+
error = `wallet with id ${wallet == null ? void 0 : wallet.id} and scheme ${wallet == null ? void 0 : wallet.scheme} cannot be selected`;
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
if (error) {
|
|
356
|
+
if (throwError) {
|
|
357
|
+
throw new Error(error);
|
|
358
|
+
}
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
return true;
|
|
362
|
+
};
|
|
363
|
+
this.getWalletsByType = (type) => {
|
|
364
|
+
return Object.values(this.wallets).filter((w) => this.isWalletUsable(w.id, { type: [type] }));
|
|
365
|
+
};
|
|
366
|
+
this.assertIsValidWalletId = (walletId, condition = {}) => {
|
|
367
|
+
this.isWalletUsable(walletId, condition, true);
|
|
368
|
+
};
|
|
369
|
+
this.assertIsValidWalletType = (type, walletTypes) => __async(this, null, function* () {
|
|
370
|
+
const { supportedWalletTypes } = yield __privateGet(this, _paraCoreInterface).assertPartner();
|
|
371
|
+
if (!type || !WALLET_TYPES.includes(type) || !(walletTypes != null ? walletTypes : supportedWalletTypes.map(({ type: type2 }) => type2)).includes(type)) {
|
|
372
|
+
throw new Error(`wallet type ${type} is not supported`);
|
|
373
|
+
}
|
|
374
|
+
return type;
|
|
375
|
+
});
|
|
376
|
+
this.fetchWallets = () => __async(this, null, function* () {
|
|
377
|
+
const res = yield __privateGet(this, _paraCoreInterface).isPortal() || __privateGet(this, _paraCoreInterface).isParaConnect() ? __privateGet(this, _paraCoreInterface).ctx.client.getAllWallets(__privateGet(this, _authService).userId) : __privateGet(this, _paraCoreInterface).ctx.client.getWallets(__privateGet(this, _authService).userId, true);
|
|
378
|
+
return res.data.wallets.filter(
|
|
379
|
+
(wallet) => !!wallet.address && wallet.sharesPersisted && (__privateGet(this, _paraCoreInterface).isParaConnect() || !__privateGet(this, _paraCoreInterface).isParaConnect() && this.isWalletSupported(entityToWallet(wallet)))
|
|
380
|
+
);
|
|
381
|
+
});
|
|
382
|
+
this.getWalletBalance = (_0) => __async(this, [_0], function* ({ walletId, rpcUrl }) {
|
|
383
|
+
return (yield __privateGet(this, _paraCoreInterface).ctx.client.getWalletBalance({ walletId, rpcUrl })).balance;
|
|
384
|
+
});
|
|
385
|
+
__privateAdd(this, _encodeWalletBase64, (wallet) => {
|
|
386
|
+
const walletJson = JSON.stringify(wallet);
|
|
387
|
+
const base64Wallet = Buffer.from(walletJson).toString("base64");
|
|
388
|
+
return base64Wallet;
|
|
389
|
+
});
|
|
390
|
+
this.getUserShare = () => {
|
|
391
|
+
if (Object.values(this.wallets).length === 0) {
|
|
392
|
+
return null;
|
|
393
|
+
}
|
|
394
|
+
return Object.values(this.wallets).map((wallet) => __privateGet(this, _encodeWalletBase64).call(this, wallet)).join("-");
|
|
395
|
+
};
|
|
396
|
+
this.setUserShare = (base64Wallets) => __async(this, null, function* () {
|
|
397
|
+
if (!base64Wallets) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
const base64WalletsSplit = base64Wallets.split("-");
|
|
401
|
+
for (const base64Wallet of base64WalletsSplit) {
|
|
402
|
+
const walletJson = Buffer.from(base64Wallet, "base64").toString();
|
|
403
|
+
const wallet = migrateWallet(JSON.parse(walletJson));
|
|
404
|
+
this.wallets[wallet.id] = wallet;
|
|
405
|
+
yield this.setWallets(this.wallets);
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
this.distributeNewWalletShare = (_0) => __async(this, [_0], function* ({
|
|
409
|
+
walletId,
|
|
410
|
+
userShare,
|
|
411
|
+
skipBiometricShareCreation = false,
|
|
412
|
+
forceRefresh = false
|
|
413
|
+
}) {
|
|
414
|
+
let userSigner = userShare;
|
|
415
|
+
if (!userSigner) {
|
|
416
|
+
userSigner = this.wallets[walletId].signer;
|
|
417
|
+
}
|
|
418
|
+
const recoveryShare = skipBiometricShareCreation ? yield sendRecoveryForShare({
|
|
419
|
+
ctx: __privateGet(this, _paraCoreInterface).ctx,
|
|
420
|
+
userId: __privateGet(this, _authService).userId,
|
|
421
|
+
walletId,
|
|
422
|
+
userSigner,
|
|
423
|
+
emailProps: __privateGet(this, _paraCoreInterface).getBackupKitEmailProps(),
|
|
424
|
+
forceRefresh
|
|
425
|
+
}) : yield distributeNewShare({
|
|
426
|
+
ctx: __privateGet(this, _paraCoreInterface).ctx,
|
|
427
|
+
userId: __privateGet(this, _authService).userId,
|
|
428
|
+
walletId,
|
|
429
|
+
userShare: userSigner,
|
|
430
|
+
emailProps: __privateGet(this, _paraCoreInterface).getBackupKitEmailProps(),
|
|
431
|
+
isEnclaveUser: __privateGet(this, _authService).isEnclaveUser,
|
|
432
|
+
walletScheme: this.wallets[walletId].scheme
|
|
433
|
+
});
|
|
434
|
+
return recoveryShare;
|
|
435
|
+
});
|
|
436
|
+
__privateSet(this, _paraCoreInterface, paraCore.getWalletServiceInterface());
|
|
437
|
+
this.wallets = {};
|
|
438
|
+
}
|
|
439
|
+
get wallets() {
|
|
440
|
+
return __privateGet(this, _wallets);
|
|
441
|
+
}
|
|
442
|
+
set wallets(value) {
|
|
443
|
+
__privateSet(this, _wallets, value);
|
|
444
|
+
}
|
|
445
|
+
get currentWalletIds() {
|
|
446
|
+
return __privateGet(this, _currentWalletIds);
|
|
447
|
+
}
|
|
448
|
+
set currentWalletIds(value) {
|
|
449
|
+
__privateSet(this, _currentWalletIds, value);
|
|
450
|
+
}
|
|
451
|
+
get currentWalletIdsArray() {
|
|
452
|
+
var _a, _b;
|
|
453
|
+
return ((_b = (_a = __privateGet(this, _paraCoreInterface).partner) == null ? void 0 : _a.supportedWalletTypes) != null ? _b : Object.keys(this.currentWalletIds).map((type) => ({ type }))).reduce((acc, { type }) => {
|
|
454
|
+
var _a2;
|
|
455
|
+
return [
|
|
456
|
+
...acc,
|
|
457
|
+
...((_a2 = this.currentWalletIds[type]) != null ? _a2 : []).map((id) => {
|
|
458
|
+
return [id, type];
|
|
459
|
+
})
|
|
460
|
+
];
|
|
461
|
+
}, []);
|
|
462
|
+
}
|
|
463
|
+
get currentWalletIdsUnique() {
|
|
464
|
+
return [...new Set(Object.values(this.currentWalletIds).flat())];
|
|
465
|
+
}
|
|
466
|
+
get isWalletTypeEnabled() {
|
|
467
|
+
var _a;
|
|
468
|
+
return (((_a = __privateGet(this, _paraCoreInterface).partner) == null ? void 0 : _a.supportedWalletTypes) || []).reduce((acc, { type }) => {
|
|
469
|
+
return __spreadProps(__spreadValues({}, acc), { [type]: true });
|
|
470
|
+
}, {});
|
|
471
|
+
}
|
|
472
|
+
get availableWallets() {
|
|
473
|
+
var _a;
|
|
474
|
+
return [
|
|
475
|
+
...[...this.currentWalletIdsArray, ...__privateGet(this, _pregenWalletService).guestWalletIdsArray].map(([address, type]) => [address, type, false]).map(([id, type]) => {
|
|
476
|
+
const wallet = this.findWallet(id, type);
|
|
477
|
+
if (!wallet) return null;
|
|
478
|
+
const name = wallet.name;
|
|
479
|
+
const address = this.getDisplayAddress(id, { addressType: type });
|
|
480
|
+
const addressShort = this.getDisplayAddress(id, { addressType: type, truncate: true });
|
|
481
|
+
return {
|
|
482
|
+
id: wallet.id,
|
|
483
|
+
partner: wallet.partner,
|
|
484
|
+
type,
|
|
485
|
+
address,
|
|
486
|
+
name,
|
|
487
|
+
addressShort,
|
|
488
|
+
displayName: name != null ? name : addressShort,
|
|
489
|
+
ensName: wallet.ensName,
|
|
490
|
+
ensAvatar: wallet.ensAvatar
|
|
491
|
+
};
|
|
492
|
+
}).filter((obj) => obj !== null),
|
|
493
|
+
...Object.values((_a = __privateGet(this, _externalWalletService).externalWallets) != null ? _a : {}).map((wallet) => {
|
|
494
|
+
return __spreadProps(__spreadValues({}, wallet), {
|
|
495
|
+
addressShort: truncateAddress(wallet.address, wallet.type, { prefix: __privateGet(this, _paraCoreInterface).cosmosPrefix }),
|
|
496
|
+
displayName: wallet.externalProviderId
|
|
497
|
+
});
|
|
498
|
+
})
|
|
499
|
+
];
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
_authService = new WeakMap();
|
|
503
|
+
_pollingService = new WeakMap();
|
|
504
|
+
_pregenWalletService = new WeakMap();
|
|
505
|
+
_externalWalletService = new WeakMap();
|
|
506
|
+
_paraCoreInterface = new WeakMap();
|
|
507
|
+
_wallets = new WeakMap();
|
|
508
|
+
_currentWalletIds = new WeakMap();
|
|
509
|
+
_isWalletOwned = new WeakMap();
|
|
510
|
+
_getMissingTypes = new WeakMap();
|
|
511
|
+
_encodeWalletBase64 = new WeakMap();
|
|
512
|
+
export {
|
|
513
|
+
WalletService
|
|
514
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|