-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathindex.js
78 lines (65 loc) · 2.16 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const contexts = new Map();
const SECURITY_CONTEXT_V1_URL = "https://w3id.org/security/v1";
contexts.set(SECURITY_CONTEXT_V1_URL, require("./contexts/sec-v1.json"));
const SECURITY_CONTEXT_V2_URL = "https://w3id.org/security/v2";
contexts.set(SECURITY_CONTEXT_V2_URL, require("./contexts/sec-v2.json"));
const PGP_2021_V1_URL = "https://w3id.org/security/suites/pgp-2021/v1";
contexts.set(PGP_2021_V1_URL, require("./contexts/suites/pgp-2021-v1.json"));
const MULTIKEY_2021_V1_URL =
"https://w3id.org/security/suites/multikey-2021/v1";
contexts.set(
MULTIKEY_2021_V1_URL,
require("./contexts/suites/multikey-2021-v1.json")
);
const JSON_WEB_SIGNATURE_2020_V1_URL =
"https://w3id.org/security/suites/jws-2020/v1";
contexts.set(
JSON_WEB_SIGNATURE_2020_V1_URL,
require("./contexts/suites/jws-2020-v1.json")
);
const ED25519_2020_V1_URL = "https://w3id.org/security/suites/ed25519-2020/v1";
contexts.set(
ED25519_2020_V1_URL,
require("./contexts/suites/ed25519-2020-v1.json")
);
const X25519_2020_V1_URL = "https://w3id.org/security/suites/x25519-2020/v1";
contexts.set(
X25519_2020_V1_URL,
require("./contexts/suites/x25519-2020-v1.json")
);
const SECP256K1_2020_V1_URL =
"https://w3id.org/security/suites/secp256k1-2020/v1";
contexts.set(
SECP256K1_2020_V1_URL,
require("./contexts/suites/secp256k1-2020-v1.json")
);
const SECP256k1_2019_v1_URL =
"https://w3id.org/security/suites/secp256k1-2019/v1";
contexts.set(
SECP256k1_2019_v1_URL,
require("./contexts/suites/secp256k1-2019-v1.json")
);
const X25519_2019_v1_URL = "https://w3id.org/security/suites/x25519-2019/v1";
contexts.set(
X25519_2019_v1_URL,
require("./contexts/suites/x25519-2019-v1.json")
);
const ED25519_2018_v1_URL = "https://w3id.org/security/suites/ed25519-2018/v1";
contexts.set(
ED25519_2018_v1_URL,
require("./contexts/suites/ed25519-2018-v1.json")
);
const constants = {
SECURITY_CONTEXT_V1_URL,
SECURITY_CONTEXT_V2_URL,
MULTIKEY_2021_V1_URL,
PGP_2021_V1_URL,
JSON_WEB_SIGNATURE_2020_V1_URL,
ED25519_2020_V1_URL,
X25519_2020_V1_URL,
SECP256K1_2020_V1_URL,
SECP256k1_2019_v1_URL,
X25519_2019_v1_URL,
ED25519_2018_v1_URL,
};
module.exports = { constants, contexts };