forked from PrivateSky/key-ssi-resolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
38 lines (30 loc) · 1.17 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
const KeySSIResolver = require('./lib/KeySSIResolver');
const DSUFactory = require("./lib/DSUFactoryRegistry");
/**
* Create a new KeySSIResolver instance and append it to
* global object $$
*
* @param {object} options
*/
function initialize(options) {
options = options || {};
const BrickMapStrategyFactory = require("bar").BrickMapStrategyFactory;
const brickMapStrategyFactory = new BrickMapStrategyFactory();
const keySSIFactory = require('./lib/KeySSIs/KeySSIFactory');
options.dsuFactory = new DSUFactory({
brickMapStrategyFactory,
keySSIFactory
});
const keySSIResolver = new KeySSIResolver(options);
return keySSIResolver;
}
module.exports = {
initialize,
KeySSIFactory: require('./lib/KeySSIs/KeySSIFactory'),
CryptoAlgorithmsRegistry: require('./lib/CryptoAlgorithms/CryptoAlgorithmsRegistry'),
CryptoFunctionTypes: require('./lib/CryptoAlgorithms/CryptoFunctionTypes'),
SSITypes: require("./lib/KeySSIs/SSITypes"),
DSUFactory: require("./lib/DSUFactoryRegistry"),
KeySSIMixin: require('./lib/KeySSIs/KeySSIMixin'),
CryptoAlgorithmsMixin: require('./lib/CryptoAlgorithms/CryptoAlgorithmsMixin')
};