curtain-web-api 1.0.35 → 1.0.37
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/build/classes/curtain-api.d.ts +2 -1
- package/build/classes/curtain-api.js +21 -4
- package/build/classes/curtain-encryption.d.ts +16 -0
- package/build/classes/curtain-encryption.js +97 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +13 -1
- package/package.json +1 -1
- package/src/classes/curtain-api.ts +20 -4
- package/src/classes/curtain-encryption.ts +74 -0
- package/src/index.ts +24 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { User } from "./curtain-user";
|
|
2
|
+
import { CurtainEncryption } from "./curtain-encryption";
|
|
2
3
|
export declare const replacer: (key: any, value: any) => any;
|
|
3
4
|
export declare const reviver: (key: any, value: any) => any;
|
|
4
5
|
export declare class CurtainWebAPI {
|
|
@@ -20,7 +21,7 @@ export declare class CurtainWebAPI {
|
|
|
20
21
|
ORCIDLogin(authorizationCode: string, redirectURI: string): Promise<User>;
|
|
21
22
|
checkIfRefreshTokenExpired(): boolean;
|
|
22
23
|
deleteCurtainLink(curtainLinkID: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
23
|
-
putSettings(settings: any, enable?: boolean, description?: string, sessionType?: string,
|
|
24
|
+
putSettings(settings: any, enable?: boolean, description?: string, sessionType?: string, encryption?: CurtainEncryption, onUploadProgress?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
24
25
|
postSettings(id: string, token: string, onDownloadProgress?: any): Promise<import("axios").AxiosResponse<any, any>>;
|
|
25
26
|
getPrideData(accession: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
26
27
|
generateTemporarySession(linkId: string, lifetime: number): Promise<import("axios").AxiosResponse<any, any>>;
|
|
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.CurtainWebAPI = exports.reviver = exports.replacer = void 0;
|
|
27
27
|
const curtain_user_1 = require("./curtain-user");
|
|
28
28
|
const axios_1 = __importStar(require("axios"));
|
|
29
|
+
const curtain_encryption_1 = require("./curtain-encryption");
|
|
29
30
|
const base = "https://celsus.muttsu.xyz/";
|
|
30
31
|
const replacer = (key, value) => {
|
|
31
32
|
if (value instanceof Map) {
|
|
@@ -208,22 +209,38 @@ class CurtainWebAPI {
|
|
|
208
209
|
return response;
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
|
-
putSettings(settings, enable = true, description = "", sessionType = "TP",
|
|
212
|
+
putSettings(settings, enable = true, description = "", sessionType = "TP", encryption = {
|
|
213
|
+
encrypted: false,
|
|
214
|
+
e2e: false,
|
|
215
|
+
}, onUploadProgress = undefined) {
|
|
212
216
|
let form = new FormData();
|
|
213
|
-
|
|
217
|
+
let data = JSON.stringify(settings, exports.replacer);
|
|
214
218
|
if (enable) {
|
|
215
219
|
form.append("enable", "True");
|
|
216
220
|
}
|
|
217
221
|
else {
|
|
218
222
|
form.append("enable", "False");
|
|
219
223
|
}
|
|
220
|
-
if (encrypted) {
|
|
224
|
+
if (encryption.encrypted) {
|
|
221
225
|
form.append("encrypted", "True");
|
|
222
226
|
}
|
|
223
227
|
else {
|
|
224
228
|
form.append("encrypted", "False");
|
|
225
229
|
}
|
|
226
|
-
|
|
230
|
+
if (encryption.e2e) {
|
|
231
|
+
form.append("e2e", "True");
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
form.append("e2e", "False");
|
|
235
|
+
}
|
|
236
|
+
if (encryption.encrypted && encryption.e2e && encryption.publicKey !== undefined) {
|
|
237
|
+
(0, curtain_encryption_1.encryptDataRSA)(data, encryption.publicKey).then((response) => {
|
|
238
|
+
form.append("file", new Blob([response], { type: 'text/json' }), "curtain-settings.json");
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
form.append("file", new Blob([data], { type: 'text/json' }), "curtain-settings.json");
|
|
243
|
+
}
|
|
227
244
|
form.append("description", description);
|
|
228
245
|
form.append("curtain_type", sessionType);
|
|
229
246
|
let headers = new axios_1.AxiosHeaders();
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function encryptDataRSA(data: string, publicKey: CryptoKey): Promise<ArrayBuffer>;
|
|
2
|
+
export declare function decryptDataRSA(data: string, privateKey: CryptoKey): Promise<ArrayBuffer>;
|
|
3
|
+
export declare function importPublicKey(key: ArrayBuffer): Promise<CryptoKey>;
|
|
4
|
+
export declare function importPrivateKey(key: ArrayBuffer): Promise<CryptoKey>;
|
|
5
|
+
export declare function generateKeyPair(modulusLength?: number, publicExponent?: Uint8Array): Promise<CryptoKeyPair>;
|
|
6
|
+
export declare function exportPublicKey(key: CryptoKey): Promise<ArrayBuffer>;
|
|
7
|
+
export declare function exportPrivateKey(key: CryptoKey): Promise<ArrayBuffer>;
|
|
8
|
+
export declare function importKey(key: ArrayBuffer, type: "public" | "private"): Promise<CryptoKey>;
|
|
9
|
+
export declare function exportKeyString(key: CryptoKey, type: "public" | "private"): Promise<string>;
|
|
10
|
+
export declare function saveToLocalStorage(key: CryptoKey, type: "public" | "private"): Promise<void>;
|
|
11
|
+
export declare function loadFromLocalStorage(type: "public" | "private"): Promise<CryptoKey | undefined>;
|
|
12
|
+
export interface CurtainEncryption {
|
|
13
|
+
encrypted: boolean;
|
|
14
|
+
publicKey?: CryptoKey;
|
|
15
|
+
e2e: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.loadFromLocalStorage = exports.saveToLocalStorage = exports.exportKeyString = exports.importKey = exports.exportPrivateKey = exports.exportPublicKey = exports.generateKeyPair = exports.importPrivateKey = exports.importPublicKey = exports.decryptDataRSA = exports.encryptDataRSA = void 0;
|
|
13
|
+
function encryptDataRSA(data, publicKey) {
|
|
14
|
+
return crypto.subtle.encrypt({ name: 'RSA-OAEP' }, publicKey, new TextEncoder().encode(data));
|
|
15
|
+
}
|
|
16
|
+
exports.encryptDataRSA = encryptDataRSA;
|
|
17
|
+
function decryptDataRSA(data, privateKey) {
|
|
18
|
+
return crypto.subtle.decrypt({ name: 'RSA-OAEP' }, privateKey, new TextEncoder().encode(data));
|
|
19
|
+
}
|
|
20
|
+
exports.decryptDataRSA = decryptDataRSA;
|
|
21
|
+
function importPublicKey(key) {
|
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
return yield crypto.subtle.importKey('spki', key, { name: 'RSA-OAEP', hash: 'SHA-256' }, true, ['encrypt']);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
exports.importPublicKey = importPublicKey;
|
|
27
|
+
function importPrivateKey(key) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return yield crypto.subtle.importKey('pkcs8', key, { name: 'RSA-OAEP', hash: 'SHA-256' }, true, ['decrypt']);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
exports.importPrivateKey = importPrivateKey;
|
|
33
|
+
function generateKeyPair(modulusLength = 2048, publicExponent = new Uint8Array([1, 0, 1])) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
return yield crypto.subtle.generateKey({
|
|
36
|
+
name: "RSA-OAEP",
|
|
37
|
+
modulusLength: modulusLength,
|
|
38
|
+
publicExponent: publicExponent,
|
|
39
|
+
hash: "SHA-256",
|
|
40
|
+
}, true, ["encrypt", "decrypt"]);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.generateKeyPair = generateKeyPair;
|
|
44
|
+
function exportPublicKey(key) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
return yield crypto.subtle.exportKey('spki', key);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
exports.exportPublicKey = exportPublicKey;
|
|
50
|
+
function exportPrivateKey(key) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield crypto.subtle.exportKey('pkcs8', key);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
exports.exportPrivateKey = exportPrivateKey;
|
|
56
|
+
function importKey(key, type) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
if (type === "public") {
|
|
59
|
+
return yield importPublicKey(key);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
return yield importPrivateKey(key);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.importKey = importKey;
|
|
67
|
+
function exportKeyString(key, type) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const decoder = new TextDecoder("utf-8");
|
|
70
|
+
if (type === "public") {
|
|
71
|
+
const k = yield exportPublicKey(key);
|
|
72
|
+
return decoder.decode(k);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const k = yield exportPrivateKey(key);
|
|
76
|
+
return decoder.decode(k);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
exports.exportKeyString = exportKeyString;
|
|
81
|
+
function saveToLocalStorage(key, type) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const k = yield exportKeyString(key, type);
|
|
84
|
+
localStorage.setItem(type + "_key", k);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
exports.saveToLocalStorage = saveToLocalStorage;
|
|
88
|
+
function loadFromLocalStorage(type) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const k = localStorage.getItem(type + "_key");
|
|
91
|
+
if (k) {
|
|
92
|
+
return yield importKey(new TextEncoder().encode(k), type);
|
|
93
|
+
}
|
|
94
|
+
return undefined;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
exports.loadFromLocalStorage = loadFromLocalStorage;
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CurtainWebAPI, replacer, reviver } from "./classes/curtain-api";
|
|
2
2
|
import { User } from "./classes/curtain-user";
|
|
3
3
|
import { getProteomicsData, getPrideData, getEBIAlpha, getInteractomeAtlas, getStringDBInteractions } from "./utilities";
|
|
4
|
-
|
|
4
|
+
import { importKey, importPrivateKey, exportPrivateKey, exportKeyString, exportPublicKey, importPublicKey, CurtainEncryption, generateKeyPair, encryptDataRSA, decryptDataRSA, loadFromLocalStorage, saveToLocalStorage } from "./classes/curtain-encryption";
|
|
5
|
+
export { CurtainWebAPI, User, getProteomicsData, getPrideData, getEBIAlpha, getInteractomeAtlas, getStringDBInteractions, replacer, reviver, importKey, importPrivateKey, exportPrivateKey, exportKeyString, exportPublicKey, importPublicKey, CurtainEncryption, generateKeyPair, encryptDataRSA, decryptDataRSA, loadFromLocalStorage, saveToLocalStorage };
|
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reviver = exports.replacer = exports.getStringDBInteractions = exports.getInteractomeAtlas = exports.getEBIAlpha = exports.getPrideData = exports.getProteomicsData = exports.User = exports.CurtainWebAPI = void 0;
|
|
3
|
+
exports.saveToLocalStorage = exports.loadFromLocalStorage = exports.decryptDataRSA = exports.encryptDataRSA = exports.generateKeyPair = exports.importPublicKey = exports.exportPublicKey = exports.exportKeyString = exports.exportPrivateKey = exports.importPrivateKey = exports.importKey = exports.reviver = exports.replacer = exports.getStringDBInteractions = exports.getInteractomeAtlas = exports.getEBIAlpha = exports.getPrideData = exports.getProteomicsData = exports.User = exports.CurtainWebAPI = void 0;
|
|
4
4
|
const curtain_api_1 = require("./classes/curtain-api");
|
|
5
5
|
Object.defineProperty(exports, "CurtainWebAPI", { enumerable: true, get: function () { return curtain_api_1.CurtainWebAPI; } });
|
|
6
6
|
Object.defineProperty(exports, "replacer", { enumerable: true, get: function () { return curtain_api_1.replacer; } });
|
|
@@ -13,3 +13,15 @@ Object.defineProperty(exports, "getPrideData", { enumerable: true, get: function
|
|
|
13
13
|
Object.defineProperty(exports, "getEBIAlpha", { enumerable: true, get: function () { return utilities_1.getEBIAlpha; } });
|
|
14
14
|
Object.defineProperty(exports, "getInteractomeAtlas", { enumerable: true, get: function () { return utilities_1.getInteractomeAtlas; } });
|
|
15
15
|
Object.defineProperty(exports, "getStringDBInteractions", { enumerable: true, get: function () { return utilities_1.getStringDBInteractions; } });
|
|
16
|
+
const curtain_encryption_1 = require("./classes/curtain-encryption");
|
|
17
|
+
Object.defineProperty(exports, "importKey", { enumerable: true, get: function () { return curtain_encryption_1.importKey; } });
|
|
18
|
+
Object.defineProperty(exports, "importPrivateKey", { enumerable: true, get: function () { return curtain_encryption_1.importPrivateKey; } });
|
|
19
|
+
Object.defineProperty(exports, "exportPrivateKey", { enumerable: true, get: function () { return curtain_encryption_1.exportPrivateKey; } });
|
|
20
|
+
Object.defineProperty(exports, "exportKeyString", { enumerable: true, get: function () { return curtain_encryption_1.exportKeyString; } });
|
|
21
|
+
Object.defineProperty(exports, "exportPublicKey", { enumerable: true, get: function () { return curtain_encryption_1.exportPublicKey; } });
|
|
22
|
+
Object.defineProperty(exports, "importPublicKey", { enumerable: true, get: function () { return curtain_encryption_1.importPublicKey; } });
|
|
23
|
+
Object.defineProperty(exports, "generateKeyPair", { enumerable: true, get: function () { return curtain_encryption_1.generateKeyPair; } });
|
|
24
|
+
Object.defineProperty(exports, "encryptDataRSA", { enumerable: true, get: function () { return curtain_encryption_1.encryptDataRSA; } });
|
|
25
|
+
Object.defineProperty(exports, "decryptDataRSA", { enumerable: true, get: function () { return curtain_encryption_1.decryptDataRSA; } });
|
|
26
|
+
Object.defineProperty(exports, "loadFromLocalStorage", { enumerable: true, get: function () { return curtain_encryption_1.loadFromLocalStorage; } });
|
|
27
|
+
Object.defineProperty(exports, "saveToLocalStorage", { enumerable: true, get: function () { return curtain_encryption_1.saveToLocalStorage; } });
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {User} from "./curtain-user";
|
|
2
2
|
import axios, {AxiosHeaders} from "axios";
|
|
3
|
+
import {CurtainEncryption, encryptDataRSA} from "./curtain-encryption";
|
|
3
4
|
|
|
4
5
|
const base: string = "https://celsus.muttsu.xyz/"
|
|
5
6
|
|
|
@@ -198,20 +199,35 @@ export class CurtainWebAPI {
|
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
|
|
201
|
-
putSettings(settings: any, enable: boolean = true, description: string = "", sessionType: string = "TP",
|
|
202
|
+
putSettings(settings: any, enable: boolean = true, description: string = "", sessionType: string = "TP", encryption: CurtainEncryption = {
|
|
203
|
+
encrypted: false,
|
|
204
|
+
e2e: false,
|
|
205
|
+
}, onUploadProgress: any = undefined) {
|
|
202
206
|
let form: FormData = new FormData();
|
|
203
|
-
|
|
207
|
+
let data = JSON.stringify(settings, replacer)
|
|
204
208
|
if (enable) {
|
|
205
209
|
form.append("enable", "True")
|
|
206
210
|
} else {
|
|
207
211
|
form.append("enable", "False")
|
|
208
212
|
}
|
|
209
|
-
if (encrypted) {
|
|
213
|
+
if (encryption.encrypted) {
|
|
210
214
|
form.append("encrypted", "True")
|
|
211
215
|
} else {
|
|
212
216
|
form.append("encrypted", "False")
|
|
213
217
|
}
|
|
214
|
-
|
|
218
|
+
if (encryption.e2e) {
|
|
219
|
+
form.append("e2e", "True")
|
|
220
|
+
} else {
|
|
221
|
+
form.append("e2e", "False")
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (encryption.encrypted && encryption.e2e && encryption.publicKey !== undefined) {
|
|
225
|
+
encryptDataRSA(data, encryption.publicKey).then((response) => {
|
|
226
|
+
form.append("file", new Blob([response], {type: 'text/json'}), "curtain-settings.json")
|
|
227
|
+
})
|
|
228
|
+
} else {
|
|
229
|
+
form.append("file", new Blob([data], {type: 'text/json'}), "curtain-settings.json")
|
|
230
|
+
}
|
|
215
231
|
|
|
216
232
|
form.append("description", description)
|
|
217
233
|
form.append("curtain_type", sessionType)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export function encryptDataRSA(data: string, publicKey: CryptoKey) {
|
|
2
|
+
return crypto.subtle.encrypt({name: 'RSA-OAEP'}, publicKey, new TextEncoder().encode(data))
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export function decryptDataRSA(data: string, privateKey: CryptoKey) {
|
|
6
|
+
return crypto.subtle.decrypt({name: 'RSA-OAEP'}, privateKey, new TextEncoder().encode(data))
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export async function importPublicKey(key: ArrayBuffer) {
|
|
10
|
+
return await crypto.subtle.importKey('spki', key, {name: 'RSA-OAEP', hash: 'SHA-256'}, true, ['encrypt'])
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export async function importPrivateKey(key: ArrayBuffer) {
|
|
14
|
+
return await crypto.subtle.importKey('pkcs8', key, {name: 'RSA-OAEP', hash: 'SHA-256'}, true, ['decrypt'])
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function generateKeyPair(modulusLength: number = 2048, publicExponent: Uint8Array = new Uint8Array([1, 0, 1])) {
|
|
18
|
+
return await crypto.subtle.generateKey(
|
|
19
|
+
{
|
|
20
|
+
name: "RSA-OAEP",
|
|
21
|
+
modulusLength: modulusLength,
|
|
22
|
+
publicExponent: publicExponent,
|
|
23
|
+
hash: "SHA-256",
|
|
24
|
+
},
|
|
25
|
+
true,
|
|
26
|
+
["encrypt", "decrypt"],
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function exportPublicKey(key: CryptoKey) {
|
|
31
|
+
return await crypto.subtle.exportKey('spki', key)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function exportPrivateKey(key: CryptoKey) {
|
|
35
|
+
return await crypto.subtle.exportKey('pkcs8', key)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export async function importKey(key: ArrayBuffer, type: "public"|"private") {
|
|
39
|
+
if (type === "public") {
|
|
40
|
+
return await importPublicKey(key)
|
|
41
|
+
} else {
|
|
42
|
+
return await importPrivateKey(key)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function exportKeyString(key: CryptoKey, type: "public"|"private"): Promise<string> {
|
|
47
|
+
const decoder = new TextDecoder("utf-8")
|
|
48
|
+
if (type === "public") {
|
|
49
|
+
const k = await exportPublicKey(key)
|
|
50
|
+
return decoder.decode(k)
|
|
51
|
+
} else {
|
|
52
|
+
const k = await exportPrivateKey(key)
|
|
53
|
+
return decoder.decode(k)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export async function saveToLocalStorage(key: CryptoKey, type: "public"|"private") {
|
|
58
|
+
const k = await exportKeyString(key, type)
|
|
59
|
+
localStorage.setItem(type + "_key", k)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export async function loadFromLocalStorage(type: "public"|"private") {
|
|
63
|
+
const k = localStorage.getItem(type + "_key")
|
|
64
|
+
if (k) {
|
|
65
|
+
return await importKey(new TextEncoder().encode(k), type)
|
|
66
|
+
}
|
|
67
|
+
return undefined
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface CurtainEncryption {
|
|
71
|
+
encrypted: boolean,
|
|
72
|
+
publicKey?: CryptoKey,
|
|
73
|
+
e2e: boolean,
|
|
74
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import {CurtainWebAPI, replacer, reviver} from "./classes/curtain-api";
|
|
2
2
|
import {User} from "./classes/curtain-user";
|
|
3
3
|
import {getProteomicsData, getPrideData, getEBIAlpha, getInteractomeAtlas, getStringDBInteractions} from "./utilities";
|
|
4
|
-
|
|
5
|
-
export {
|
|
4
|
+
import {importKey, importPrivateKey, exportPrivateKey, exportKeyString, exportPublicKey, importPublicKey, CurtainEncryption, generateKeyPair, encryptDataRSA, decryptDataRSA, loadFromLocalStorage, saveToLocalStorage} from "./classes/curtain-encryption";
|
|
5
|
+
export {
|
|
6
|
+
CurtainWebAPI,
|
|
7
|
+
User,
|
|
8
|
+
getProteomicsData,
|
|
9
|
+
getPrideData,
|
|
10
|
+
getEBIAlpha,
|
|
11
|
+
getInteractomeAtlas,
|
|
12
|
+
getStringDBInteractions,
|
|
13
|
+
replacer,
|
|
14
|
+
reviver,
|
|
15
|
+
importKey,
|
|
16
|
+
importPrivateKey,
|
|
17
|
+
exportPrivateKey,
|
|
18
|
+
exportKeyString,
|
|
19
|
+
exportPublicKey,
|
|
20
|
+
importPublicKey,
|
|
21
|
+
CurtainEncryption,
|
|
22
|
+
generateKeyPair,
|
|
23
|
+
encryptDataRSA,
|
|
24
|
+
decryptDataRSA,
|
|
25
|
+
loadFromLocalStorage,
|
|
26
|
+
saveToLocalStorage
|
|
27
|
+
};
|