From e28510cd05f551ad03cce6d2cbf842ca63e576fa Mon Sep 17 00:00:00 2001 From: Maritere Nieto Date: Mon, 8 Jun 2020 15:27:18 +0200 Subject: [PATCH 01/25] initial commit Signed-off-by: Maria Teresa Nieto --- trustid-sdk/README.md | 111 + trustid-sdk/dist/index.d.ts | 6 + trustid-sdk/dist/index.js | 21 + .../dist/src/keystore/fileKeystore.d.ts | 16 + trustid-sdk/dist/src/keystore/fileKeystore.js | 172 + trustid-sdk/dist/src/keystore/keystore.d.ts | 15 + trustid-sdk/dist/src/keystore/keystore.js | 24 + .../src/keystore/localStorageKeystore.d.ts | 10 + .../dist/src/keystore/localStorageKeystore.js | 108 + .../dist/src/keystore/mongoKeystore.d.ts | 12 + .../dist/src/keystore/mongoKeystore.js | 155 + trustid-sdk/dist/src/network/driver.d.ts | 10 + trustid-sdk/dist/src/network/driver.js | 21 + trustid-sdk/dist/src/network/hfdriver.d.ts | 21 + trustid-sdk/dist/src/network/hfdriver.js | 195 + trustid-sdk/dist/src/network/trustHF.d.ts | 43 + trustid-sdk/dist/src/network/trustHF.js | 391 ++ .../dist/src/network/trustInterface.d.ts | 18 + .../dist/src/network/trustInterface.js | 9 + trustid-sdk/dist/src/wallet.d.ts | 55 + trustid-sdk/dist/src/wallet.js | 282 ++ trustid-sdk/dist/test/fileKeystore.spec.d.ts | 1 + trustid-sdk/dist/test/fileKeystore.spec.js | 80 + trustid-sdk/dist/test/hfdiver.spec.d.ts | 1 + trustid-sdk/dist/test/hfdiver.spec.js | 466 ++ trustid-sdk/dist/test/integration/test.d.ts | 1 + trustid-sdk/dist/test/integration/test.js | 149 + trustid-sdk/dist/test/trustHF.spec.d.ts | 1 + trustid-sdk/dist/test/trustHF.spec.js | 699 +++ trustid-sdk/dist/test/wallet.spec.d.ts | 1 + trustid-sdk/dist/test/wallet.spec.js | 171 + trustid-sdk/index-light.ts | 11 + trustid-sdk/index.ts | 15 + trustid-sdk/keystore | 1 + trustid-sdk/package-lock.json | 3803 +++++++++++++++++ trustid-sdk/package.json | 58 + trustid-sdk/src/keystore/fileKeystore.ts | 120 + trustid-sdk/src/keystore/keystore.ts | 37 + .../src/keystore/localStorageKeystore.ts | 46 + trustid-sdk/src/keystore/mongoKeystore.ts | 89 + trustid-sdk/src/network/driver.ts | 23 + trustid-sdk/src/network/hfdriver.ts | 102 + trustid-sdk/src/network/trustHF.ts | 273 ++ trustid-sdk/src/network/trustInterface.ts | 31 + trustid-sdk/src/wallet.ts | 208 + trustid-sdk/test/fileKeystore.spec.ts | 42 + trustid-sdk/test/hfdiver.spec.ts | 392 ++ trustid-sdk/test/trustHF.spec.ts | 430 ++ trustid-sdk/test/wallet.spec.ts | 95 + trustid-sdk/tsconfig-light.json | 76 + trustid-sdk/tsconfig-singleFile.json | 76 + trustid-sdk/tsconfig.json | 75 + 52 files changed, 9268 insertions(+) create mode 100644 trustid-sdk/README.md create mode 100644 trustid-sdk/dist/index.d.ts create mode 100644 trustid-sdk/dist/index.js create mode 100644 trustid-sdk/dist/src/keystore/fileKeystore.d.ts create mode 100644 trustid-sdk/dist/src/keystore/fileKeystore.js create mode 100644 trustid-sdk/dist/src/keystore/keystore.d.ts create mode 100644 trustid-sdk/dist/src/keystore/keystore.js create mode 100644 trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts create mode 100644 trustid-sdk/dist/src/keystore/localStorageKeystore.js create mode 100644 trustid-sdk/dist/src/keystore/mongoKeystore.d.ts create mode 100644 trustid-sdk/dist/src/keystore/mongoKeystore.js create mode 100644 trustid-sdk/dist/src/network/driver.d.ts create mode 100644 trustid-sdk/dist/src/network/driver.js create mode 100644 trustid-sdk/dist/src/network/hfdriver.d.ts create mode 100644 trustid-sdk/dist/src/network/hfdriver.js create mode 100644 trustid-sdk/dist/src/network/trustHF.d.ts create mode 100644 trustid-sdk/dist/src/network/trustHF.js create mode 100644 trustid-sdk/dist/src/network/trustInterface.d.ts create mode 100644 trustid-sdk/dist/src/network/trustInterface.js create mode 100644 trustid-sdk/dist/src/wallet.d.ts create mode 100644 trustid-sdk/dist/src/wallet.js create mode 100644 trustid-sdk/dist/test/fileKeystore.spec.d.ts create mode 100644 trustid-sdk/dist/test/fileKeystore.spec.js create mode 100644 trustid-sdk/dist/test/hfdiver.spec.d.ts create mode 100644 trustid-sdk/dist/test/hfdiver.spec.js create mode 100644 trustid-sdk/dist/test/integration/test.d.ts create mode 100644 trustid-sdk/dist/test/integration/test.js create mode 100644 trustid-sdk/dist/test/trustHF.spec.d.ts create mode 100644 trustid-sdk/dist/test/trustHF.spec.js create mode 100644 trustid-sdk/dist/test/wallet.spec.d.ts create mode 100644 trustid-sdk/dist/test/wallet.spec.js create mode 100755 trustid-sdk/index-light.ts create mode 100755 trustid-sdk/index.ts create mode 100644 trustid-sdk/keystore create mode 100644 trustid-sdk/package-lock.json create mode 100755 trustid-sdk/package.json create mode 100644 trustid-sdk/src/keystore/fileKeystore.ts create mode 100755 trustid-sdk/src/keystore/keystore.ts create mode 100644 trustid-sdk/src/keystore/localStorageKeystore.ts create mode 100644 trustid-sdk/src/keystore/mongoKeystore.ts create mode 100644 trustid-sdk/src/network/driver.ts create mode 100644 trustid-sdk/src/network/hfdriver.ts create mode 100755 trustid-sdk/src/network/trustHF.ts create mode 100755 trustid-sdk/src/network/trustInterface.ts create mode 100755 trustid-sdk/src/wallet.ts create mode 100644 trustid-sdk/test/fileKeystore.spec.ts create mode 100644 trustid-sdk/test/hfdiver.spec.ts create mode 100644 trustid-sdk/test/trustHF.spec.ts create mode 100644 trustid-sdk/test/wallet.spec.ts create mode 100755 trustid-sdk/tsconfig-light.json create mode 100755 trustid-sdk/tsconfig-singleFile.json create mode 100755 trustid-sdk/tsconfig.json diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md new file mode 100644 index 00000000..9de9440a --- /dev/null +++ b/trustid-sdk/README.md @@ -0,0 +1,111 @@ +# TRUSTID SDK + + +This SDK exposes all the functionalities required to interact with +TRUSTID-based DLT networks. + +### Install +* To install this library you need access to the private repo: +``` +npm install core-id-sdk +``` + +### Example of use +```js +// Use library +var id = require('coren-id-sdk') +import { Keystore } from './keystore/keystore'; + + +// Initialize wallet +wal = id.Wallet.Instance; + +// Create Keystore +ks = new FileKeystore(); +// Set keystore in wallet +wal.setKeystore(ks) +// LoadKeystore from file + wal.loadKeystore('file', './keystore') +// Set endpoint of driver and store in variable to use it. +let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); +let config = { + stateStore: '/tmp/statestore', + caURL: 'https://ca.org1.example.com:7054', + caName: 'ca.org1.example.com', + caAdmin: 'adminCA', + caPassword: 'adminpw', + tlsOptions: { + trustedRoots:"-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false + }, + mspId: 'org1MSP', + walletID: 'admin', + asLocalhost: true, + ccp: ccp, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "examplechannel" +} + +const trustID = new TrustIdHf(config); +wal.addNetwork("hf", trustID); +await wal.networks["hf"].configureDriver(); + +// Use the wallet and the driver +wal.generateDID("RSA") +await wal.networks["hf"].createIdentity(wal.getDID("default")) +await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); +await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", true); + +``` + +### Structure +The library has the following modules: + +* `wallet.ts`: Core module of the library. It wraps all the state and +logic for identity management and interaction with TRUSTID networks. +To start using the SDK a new wallet needs to be initialized. A wallet +exposes the following methods: + * `public setKeystore(keystore: Keystore): void`: + * `public generateDID(type: string, controller: string = "default", passphrase: string = ""): DID` + + And stores the following information: + +* `class DID`: Has the following structure. + * `public id: string`: Id string that identifies the DID. + * `public pubkey: string`: PublicKey of the DID. + * `public type: string`: Key type (RSA / EC / OKP). + * `public controller: string`: Verifier of the identity + * `public access: number`: Access level + * `private privkey: string`: Private Key of the DID. + + And exposes the following functions: + * `public unlockAccount(passphrase: string = ""): void`: Unlocks private key in order to use the DID. + * `public lockAccount(): any`: Locks the private key for a DID. + * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. + * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. + +* `driver.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is +the `hfdriver.ts` enabling the interaction with Hyperledger Fabric TrustID +networks. + + * `setEndpoint(endpoint: string): void`: Sets the network endpoint to interact with the TRUSTID network. + * `createIdentity(did: DID): Promise`: Create an identity in TrustID. It generates a new DID in the wallet and register it in the network. + * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. + * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. + * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. + * `createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise`: Creates a new service in the TrustID network. + * `updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the information from a service. + * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. + * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. + * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network + +* `keystore.ts`: Interface that enables the implementation of keystore storages. + There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). + + * `abstract getDID(id: string): DID`: Get specific DID from keystore. + * `abstract storeDID(did: DID): boolean`: Store DID in keystore. + * `public storeInMemory(did: DID): boolean`: Store DID inMemory for easy and performant use. + * `public listDID(): string[]`: List DIDs in memory. + * `public setDefault(did: DID): boolean`: Set DID as default identity for the keystore wallet. + diff --git a/trustid-sdk/dist/index.d.ts b/trustid-sdk/dist/index.d.ts new file mode 100644 index 00000000..47ea532e --- /dev/null +++ b/trustid-sdk/dist/index.d.ts @@ -0,0 +1,6 @@ +import { Wallet, DID } from "./src/wallet"; +import { FileKeystore } from "./src/keystore/fileKeystore"; +import { MongoKeystore } from "./src/keystore/mongoKeystore"; +import { LocalStorageKeystore } from "./src/keystore/localStorageKeystore"; +import { TrustIdHf } from "./src/network/trustHF"; +export { Wallet, DID, FileKeystore, MongoKeystore, LocalStorageKeystore, TrustIdHf }; diff --git a/trustid-sdk/dist/index.js b/trustid-sdk/dist/index.js new file mode 100644 index 00000000..33b53b82 --- /dev/null +++ b/trustid-sdk/dist/index.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TrustIdHf = exports.LocalStorageKeystore = exports.MongoKeystore = exports.FileKeystore = exports.DID = exports.Wallet = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var wallet_1 = require("./src/wallet"); +Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return wallet_1.Wallet; } }); +Object.defineProperty(exports, "DID", { enumerable: true, get: function () { return wallet_1.DID; } }); +var fileKeystore_1 = require("./src/keystore/fileKeystore"); +Object.defineProperty(exports, "FileKeystore", { enumerable: true, get: function () { return fileKeystore_1.FileKeystore; } }); +var mongoKeystore_1 = require("./src/keystore/mongoKeystore"); +Object.defineProperty(exports, "MongoKeystore", { enumerable: true, get: function () { return mongoKeystore_1.MongoKeystore; } }); +var localStorageKeystore_1 = require("./src/keystore/localStorageKeystore"); +Object.defineProperty(exports, "LocalStorageKeystore", { enumerable: true, get: function () { return localStorageKeystore_1.LocalStorageKeystore; } }); +var trustHF_1 = require("./src/network/trustHF"); +Object.defineProperty(exports, "TrustIdHf", { enumerable: true, get: function () { return trustHF_1.TrustIdHf; } }); diff --git a/trustid-sdk/dist/src/keystore/fileKeystore.d.ts b/trustid-sdk/dist/src/keystore/fileKeystore.d.ts new file mode 100644 index 00000000..439a9150 --- /dev/null +++ b/trustid-sdk/dist/src/keystore/fileKeystore.d.ts @@ -0,0 +1,16 @@ +import { Keystore } from './keystore'; +import { DID } from '../wallet'; +export declare class FileKeystore extends Keystore { + readonly WALLET_SRCS: string[]; + /** InMemory Keystore representing all the DIDs loaded in the wallet*/ + private dir; + constructor(type?: string, dir?: string); + /** SaveKeystore with all the DIDs. Store status of the wallet */ + saveKeystore(type?: string): void; + /** LoadKeystore loads the stored status of a wallet */ + loadKeystore(source: string, dir?: string): void; + /** getKey gets a key from the keystore of the wallet */ + getDID(id?: string): Promise; + /** Stores DID in the permanent keystore */ + storeDID(did: DID): Promise; +} diff --git a/trustid-sdk/dist/src/keystore/fileKeystore.js b/trustid-sdk/dist/src/keystore/fileKeystore.js new file mode 100644 index 00000000..fa920ae7 --- /dev/null +++ b/trustid-sdk/dist/src/keystore/fileKeystore.js @@ -0,0 +1,172 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileKeystore = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var keystore_1 = require("./keystore"); +var wallet_1 = require("../wallet"); +var fs_1 = __importDefault(require("fs")); +var FileKeystore = /** @class */ (function (_super) { + __extends(FileKeystore, _super); + function FileKeystore(type, dir) { + if (type === void 0) { type = "file"; } + if (dir === void 0) { dir = './keystore/keystore'; } + var _this = _super.call(this) || this; + _this.WALLET_SRCS = [ + "file", + "empty", + "localStorage" + ]; + // Reset keystore from file if existing. + _this.loadKeystore(type, dir); + _this.dir = dir; + return _this; + } + /** SaveKeystore with all the DIDs. Store status of the wallet */ + FileKeystore.prototype.saveKeystore = function (type) { + if (type === void 0) { type = "file"; } + switch (type) { + case "file": { + fs_1.default.writeFileSync(this.dir, JSON.stringify(this.keystore), 'utf8'); + break; + } + case "localStorage": { + localStorage.setItem('keystore', JSON.stringify(this.keystore)); + break; + } + default: { + throw new Error("Storage type not implemented."); + } + } + }; + /** LoadKeystore loads the stored status of a wallet */ + FileKeystore.prototype.loadKeystore = function (source, dir) { + if (dir === void 0) { dir = ""; } + // If type not supported throw error. + if (!Object.values(this.WALLET_SRCS).includes(source)) { + throw new Error("Wallet source to initialize not valid!"); + } + switch (source) { + case "file": { + var auxKs = void 0; + try { + var val = fs_1.default.readFileSync(dir, 'utf8'); + auxKs = JSON.parse(val); + } + catch (_a) { + auxKs = {}; + } + for (var k in auxKs) { + var emptyDID = new wallet_1.DID("RSA", undefined); + emptyDID.loadFromObject(auxKs[k]); + auxKs[k] = emptyDID; + } + this.keystore = auxKs; + // this.keystore = JSON.parse(fs.readFileSync(dir, 'utf8')) + break; + } + case "localStorage": { + var val = localStorage.getItem('keystore'); + this.keystore = JSON.parse(val || ""); + break; + } + default: { + throw new Error("Storage type not implemented."); + } + } + }; + /** getKey gets a key from the keystore of the wallet */ + FileKeystore.prototype.getDID = function (id) { + if (id === void 0) { id = "default"; } + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + // We only get from inMemory keystore for performance purposes. + if (!(this.keystore.hasOwnProperty(id))) { + // throw new Error("This DID does not exist in the keystore."); + return [2 /*return*/, {}]; + } + return [2 /*return*/, this.keystore[id]]; + }); + }); + }; + /** Stores DID in the permanent keystore */ + FileKeystore.prototype.storeDID = function (did) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + // Check if did already in keystore and save keystore. + // If not add DID and save keystore. + try { + if (this.keystore[did.id] == undefined) { + // Add in inmemory storage + this.keystore[did.id] = did; + } + this.saveKeystore(); + return [2 /*return*/, true]; + } + catch (_b) { + return [2 /*return*/, false]; + } + return [2 /*return*/]; + }); + }); + }; + return FileKeystore; +}(keystore_1.Keystore)); +exports.FileKeystore = FileKeystore; diff --git a/trustid-sdk/dist/src/keystore/keystore.d.ts b/trustid-sdk/dist/src/keystore/keystore.d.ts new file mode 100644 index 00000000..156ada51 --- /dev/null +++ b/trustid-sdk/dist/src/keystore/keystore.d.ts @@ -0,0 +1,15 @@ +import { DID } from "../wallet"; +export declare abstract class Keystore { + /** InMemory Keystore representing all the DIDs loaded in the wallet*/ + protected keystore: { + [k: string]: any; + }; + constructor(); + abstract getDID(id: string): Promise; + abstract storeDID(did: DID): Promise; + storeInMemory(did: DID): boolean; + /** List available keys in the keystore inmemory*/ + listDID(): string[]; + /** setDefault sets a DID as the default key for the wallet */ + setDefault(did: DID): boolean; +} diff --git a/trustid-sdk/dist/src/keystore/keystore.js b/trustid-sdk/dist/src/keystore/keystore.js new file mode 100644 index 00000000..5ca99d8a --- /dev/null +++ b/trustid-sdk/dist/src/keystore/keystore.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Keystore = void 0; +var Keystore = /** @class */ (function () { + function Keystore() { + this.keystore = {}; + } + // Store DID in memory + Keystore.prototype.storeInMemory = function (did) { + this.keystore[did.id] = did; + return true; + }; + /** List available keys in the keystore inmemory*/ + Keystore.prototype.listDID = function () { + return Object.keys(this.keystore); + }; + /** setDefault sets a DID as the default key for the wallet */ + Keystore.prototype.setDefault = function (did) { + this.keystore["default"] = did; + return true; + }; + return Keystore; +}()); +exports.Keystore = Keystore; diff --git a/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts b/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts new file mode 100644 index 00000000..283fd65a --- /dev/null +++ b/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts @@ -0,0 +1,10 @@ +import { Keystore } from './keystore'; +import { DID } from '../wallet'; +export declare class LocalStorageKeystore extends Keystore { + readonly WALLET_SRCS: string[]; + constructor(); + /** getKey gets a key from the keystore of the wallet */ + getDID(id?: string): Promise; + /** Stores DID in the permanent keystore */ + storeDID(did: DID): Promise; +} diff --git a/trustid-sdk/dist/src/keystore/localStorageKeystore.js b/trustid-sdk/dist/src/keystore/localStorageKeystore.js new file mode 100644 index 00000000..5647b2c6 --- /dev/null +++ b/trustid-sdk/dist/src/keystore/localStorageKeystore.js @@ -0,0 +1,108 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LocalStorageKeystore = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var keystore_1 = require("./keystore"); +var wallet_1 = require("../wallet"); +var LocalStorageKeystore = /** @class */ (function (_super) { + __extends(LocalStorageKeystore, _super); + function LocalStorageKeystore() { + var _this = _super.call(this) || this; + _this.WALLET_SRCS = [ + "file", + "empty", + "localStorage" + ]; + return _this; + } + /** getKey gets a key from the keystore of the wallet */ + LocalStorageKeystore.prototype.getDID = function (id) { + if (id === void 0) { id = "default"; } + return __awaiter(this, void 0, void 0, function () { + var did, value; + return __generator(this, function (_a) { + did = new wallet_1.DID(); + value = localStorage.getItem(id); + if (value) { + did.loadFromObject(JSON.parse(value)); + } + else { + did = {}; + } + return [2 /*return*/, did]; + }); + }); + }; + /** Stores DID in the permanent keystore */ + LocalStorageKeystore.prototype.storeDID = function (did) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + try { + localStorage.setItem(did.id, JSON.stringify(did)); + return [2 /*return*/, true]; + } + catch (_b) { + return [2 /*return*/, false]; + } + return [2 /*return*/]; + }); + }); + }; + return LocalStorageKeystore; +}(keystore_1.Keystore)); +exports.LocalStorageKeystore = LocalStorageKeystore; diff --git a/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts b/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts new file mode 100644 index 00000000..343923f0 --- /dev/null +++ b/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts @@ -0,0 +1,12 @@ +import { Keystore } from './keystore'; +import { DID } from '../wallet'; +export declare class MongoKeystore extends Keystore { + private database; + private uri; + constructor(mongoURI: string); + init(): Promise; + /** getKey gets a key from the keystore of the wallet */ + getDID(id?: string): Promise; + /** Stores DID in the permanent keystore */ + storeDID(did: DID): Promise; +} diff --git a/trustid-sdk/dist/src/keystore/mongoKeystore.js b/trustid-sdk/dist/src/keystore/mongoKeystore.js new file mode 100644 index 00000000..e2f12b6c --- /dev/null +++ b/trustid-sdk/dist/src/keystore/mongoKeystore.js @@ -0,0 +1,155 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MongoKeystore = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var keystore_1 = require("./keystore"); +var wallet_1 = require("../wallet"); +var Mongoose = require("mongoose"); +var DIDSchema = new Mongoose.Schema({ + id: String, + pubkey: String, + type: String, + controller: String, + access: Number, + privkey: String, +}); +var DIDModel = Mongoose.model("did", DIDSchema); +var MongoKeystore = /** @class */ (function (_super) { + __extends(MongoKeystore, _super); + // Create connection to the keystore database. + function MongoKeystore(mongoURI) { + var _this = _super.call(this) || this; + _this.uri = mongoURI; + _this.database = null; + return _this; + } + MongoKeystore.prototype.init = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, Mongoose.connect(this.uri, { + useNewUrlParser: true, + useFindAndModify: true, + useUnifiedTopology: true, + useCreateIndex: true, + })]; + case 1: + _a.sent(); + this.database = Mongoose.connection; + return [2 /*return*/]; + } + }); + }); + }; + /** getKey gets a key from the keystore of the wallet */ + MongoKeystore.prototype.getDID = function (id) { + if (id === void 0) { id = "default"; } + return __awaiter(this, void 0, void 0, function () { + var didObj, emptyDID, _a; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (!!(id in this.keystore)) return [3 /*break*/, 4]; + _b.label = 1; + case 1: + _b.trys.push([1, 3, , 4]); + return [4 /*yield*/, DIDModel.findOne({ id: id })]; + case 2: + didObj = _b.sent(); + emptyDID = new wallet_1.DID("RSA", undefined); + emptyDID.loadFromObject(didObj); + this.keystore[id] = emptyDID; + return [3 /*break*/, 4]; + case 3: + _a = _b.sent(); + throw new Error("DID not found in database"); + case 4: return [2 /*return*/, this.keystore[id]]; + } + }); + }); + }; + /** Stores DID in the permanent keystore */ + MongoKeystore.prototype.storeDID = function (did) { + return __awaiter(this, void 0, void 0, function () { + var didObj, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 5, , 6]); + return [4 /*yield*/, DIDModel.findOne({ id: did.id })]; + case 1: + didObj = _a.sent(); + console.log(didObj); + if (!!didObj) return [3 /*break*/, 3]; + return [4 /*yield*/, DIDModel.create(did)]; + case 2: + _a.sent(); + return [2 /*return*/, true]; + case 3: throw new Error("The identity already exists in the storage"); + case 4: return [3 /*break*/, 6]; + case 5: + err_1 = _a.sent(); + throw err_1; + case 6: return [2 /*return*/]; + } + }); + }); + }; + return MongoKeystore; +}(keystore_1.Keystore)); +exports.MongoKeystore = MongoKeystore; diff --git a/trustid-sdk/dist/src/network/driver.d.ts b/trustid-sdk/dist/src/network/driver.d.ts new file mode 100644 index 00000000..f1cf42cf --- /dev/null +++ b/trustid-sdk/dist/src/network/driver.d.ts @@ -0,0 +1,10 @@ +export declare abstract class Driver { + protected connection: any; + constructor(); + abstract connect(config: object): any; + abstract disconnect(config: object): void; + abstract callContractTransaction(id: string, fcn: string, args: any, channel?: string): any; + abstract getContractTransaction(id: string, fcn: string, args: any, channel?: string): any; + /** Return connection */ + getConnection(): any; +} diff --git a/trustid-sdk/dist/src/network/driver.js b/trustid-sdk/dist/src/network/driver.js new file mode 100644 index 00000000..c1b2972d --- /dev/null +++ b/trustid-sdk/dist/src/network/driver.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Driver = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var Driver = /** @class */ (function () { + function Driver() { + this.connection = {}; + } + /** Return connection */ + Driver.prototype.getConnection = function () { + return this.connection; + }; + return Driver; +}()); +exports.Driver = Driver; diff --git a/trustid-sdk/dist/src/network/hfdriver.d.ts b/trustid-sdk/dist/src/network/hfdriver.d.ts new file mode 100644 index 00000000..806cc70f --- /dev/null +++ b/trustid-sdk/dist/src/network/hfdriver.d.ts @@ -0,0 +1,21 @@ +import { Driver } from "./driver"; +export interface HfConfig { + stateStore: string; + caURL: string; + caName: string; + caAdmin: string; + caPassword: string; + tlsOptions: any; + mspId: string; + walletID: string; + asLocalhost: boolean; + ccp: any; +} +export declare class HfDriver extends Driver { + protected connection: any; + constructor(); + callContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined): Promise; + getContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined): Promise; + connect(config: HfConfig): Promise; + disconnect(): Promise; +} diff --git a/trustid-sdk/dist/src/network/hfdriver.js b/trustid-sdk/dist/src/network/hfdriver.js new file mode 100644 index 00000000..28f51743 --- /dev/null +++ b/trustid-sdk/dist/src/network/hfdriver.js @@ -0,0 +1,195 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __spreadArrays = (this && this.__spreadArrays) || function () { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HfDriver = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var driver_1 = require("./driver"); +var FabricCAServices = require("fabric-ca-client"); +var _a = require("fabric-network"), Gateway = _a.Gateway, Wallets = _a.Wallets, DefaultEventHandlerStrategies = _a.DefaultEventHandlerStrategies; +var HfDriver = /** @class */ (function (_super) { + __extends(HfDriver, _super); + function HfDriver() { + var _this = _super.call(this) || this; + _this.connection = {}; + return _this; + } + HfDriver.prototype.callContractTransaction = function (id, fcn, args, channel) { + return __awaiter(this, void 0, void 0, function () { + var network, contract, result, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 4, , 5]); + return [4 /*yield*/, this.connection.getNetwork(channel)]; + case 1: + network = _a.sent(); + return [4 /*yield*/, network.getContract(id)]; + case 2: + contract = _a.sent(); + return [4 /*yield*/, contract.submitTransaction.apply(contract, __spreadArrays([fcn], args))]; + case 3: + result = _a.sent(); + return [2 /*return*/, result.toString()]; + case 4: + err_1 = _a.sent(); + if (err_1.responses) { + throw new Error(err_1.responses[0].response.message); + } + else { + throw err_1; + } + return [3 /*break*/, 5]; + case 5: return [2 /*return*/]; + } + }); + }); + }; + HfDriver.prototype.getContractTransaction = function (id, fcn, args, channel) { + return __awaiter(this, void 0, void 0, function () { + var network, contract, result, err_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 4, , 5]); + return [4 /*yield*/, this.connection.getNetwork(channel)]; + case 1: + network = _a.sent(); + return [4 /*yield*/, network.getContract(id)]; + case 2: + contract = _a.sent(); + return [4 /*yield*/, contract.evaluateTransaction.apply(contract, __spreadArrays([fcn], args))]; + case 3: + result = _a.sent(); + return [2 /*return*/, result.toString()]; + case 4: + err_2 = _a.sent(); + throw err_2; + case 5: return [2 /*return*/]; + } + }); + }); + }; + HfDriver.prototype.connect = function (config) { + return __awaiter(this, void 0, void 0, function () { + var wallet, caService, req, enrollment, identity, err_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 5, , 6]); + this.connection = new Gateway(); + return [4 /*yield*/, Wallets.newFileSystemWallet(config.stateStore)]; + case 1: + wallet = _a.sent(); + caService = new FabricCAServices(config.caURL, config.tlsOptions, config.caName); + req = { + enrollmentID: config.caAdmin, + enrollmentSecret: config.caPassword, + }; + return [4 /*yield*/, caService.enroll(req)]; + case 2: + enrollment = _a.sent(); + identity = { + credentials: { + certificate: enrollment.certificate, + privateKey: enrollment.key.toBytes(), + }, + mspId: config.mspId, + type: "X.509", + }; + return [4 /*yield*/, wallet.put(config.walletID, identity)]; + case 3: + _a.sent(); + return [4 /*yield*/, this.connection.connect(config.ccp, { + wallet: wallet, + identity: config.walletID, + discovery: { + enabled: true, + asLocalhost: config.asLocalhost, + }, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategies.NETWORK_SCOPE_ANYFORTX, + }, + })]; + case 4: + _a.sent(); + return [2 /*return*/, this.connection]; + case 5: + err_3 = _a.sent(); + throw err_3; + case 6: return [2 /*return*/]; + } + }); + }); + }; + HfDriver.prototype.disconnect = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + this.connection.disconnect(); + return [2 /*return*/]; + }); + }); + }; + return HfDriver; +}(driver_1.Driver)); +exports.HfDriver = HfDriver; diff --git a/trustid-sdk/dist/src/network/trustHF.d.ts b/trustid-sdk/dist/src/network/trustHF.d.ts new file mode 100644 index 00000000..1609b22c --- /dev/null +++ b/trustid-sdk/dist/src/network/trustHF.d.ts @@ -0,0 +1,43 @@ +import { TrustID, Access } from "./trustInterface"; +import { HfDriver } from "./hfdriver"; +import { DID } from "../wallet"; +export interface Config { + fcn: string; + channel: string; + chaincodeName: string; + stateStore: string; + caURL: string; + caName: string; + caAdmin: string; + caPassword: string; + tlsOptions: any; + mspId: string; + walletID: string; + asLocalhost: boolean; + ccp: any; +} +export declare class TrustIdHf extends TrustID { + config: Config; + driver: HfDriver; + constructor(config: Config); + configureDriver(): Promise; + disconnectDriver(): Promise; + /** createIdentity registers a new unverified identity */ + createIdentity(did: DID): Promise; + /** VerifyIdentity allow admins to verify user identityes */ + verifyIdentity(adminDID: DID, id: string): Promise; + /** Revoke allow admins to revoke user identityes */ + revokeIdentity(adminDID: DID, id: string): Promise; + /** GetIdentity gets a new identity */ + getIdentity(did: DID, id: string): Promise; + /** Registers new service in the platform */ + createService(did: DID, serviceDID: string, name: string, isPublic?: boolean): Promise; + /** Updates accesses for a service */ + updateService(did: DID, serviceDID: string, access: Access, isPublic?: boolean): Promise; + /** Gets information from a service */ + getService(did: DID, serviceDID: string): Promise; + /** Invokes a chaincode through the proxy */ + invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise; + /** Invokes a chaincode through the proxy */ + query(did: DID, serviceDID: string, args: string[], channel: string): Promise; +} diff --git a/trustid-sdk/dist/src/network/trustHF.js b/trustid-sdk/dist/src/network/trustHF.js new file mode 100644 index 00000000..51c93012 --- /dev/null +++ b/trustid-sdk/dist/src/network/trustHF.js @@ -0,0 +1,391 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TrustIdHf = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var trustInterface_1 = require("./trustInterface"); +var hfdriver_1 = require("./hfdriver"); +var TrustIdHf = /** @class */ (function (_super) { + __extends(TrustIdHf, _super); + function TrustIdHf(config) { + var _this = _super.call(this) || this; + _this.config = config; + _this.driver = new hfdriver_1.HfDriver(); + return _this; + } + TrustIdHf.prototype.configureDriver = function () { + return __awaiter(this, void 0, void 0, function () { + var cfg; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + cfg = { + stateStore: this.config.stateStore, + caURL: this.config.caURL, + caName: this.config.caName, + caAdmin: this.config.caAdmin, + caPassword: this.config.caPassword, + tlsOptions: this.config.tlsOptions, + mspId: this.config.mspId, + walletID: this.config.walletID, + asLocalhost: this.config.asLocalhost, + ccp: this.config.ccp, + }; + return [4 /*yield*/, this.driver.connect(cfg)]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + TrustIdHf.prototype.disconnectDriver = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.driver.disconnect()]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + /** createIdentity registers a new unverified identity */ + TrustIdHf.prototype.createIdentity = function (did) { + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + publicKey: did.pubkey + }; + return [4 /*yield*/, did.sign({ + function: "createSelfIdentity", + params: { + did: did.id, + publicKey: did.pubkey, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** VerifyIdentity allow admins to verify user identityes */ + TrustIdHf.prototype.verifyIdentity = function (adminDID, id) { + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: adminDID.id + }; + return [4 /*yield*/, adminDID.sign({ + function: "verifyIdentity", + params: { + did: id, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Revoke allow admins to revoke user identityes */ + TrustIdHf.prototype.revokeIdentity = function (adminDID, id) { + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: adminDID.id + }; + return [4 /*yield*/, adminDID.sign({ + function: "revokeIdentity", + params: { + did: id, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** GetIdentity gets a new identity */ + TrustIdHf.prototype.getIdentity = function (did, id) { + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "getIdentity", + params: { + did: id, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Registers new service in the platform */ + TrustIdHf.prototype.createService = function (did, serviceDID, name, isPublic) { + if (isPublic === void 0) { isPublic = true; } + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "createServiceIdentity", + params: { + did: serviceDID, + name: name, + isPublic: isPublic, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Updates accesses for a service */ + TrustIdHf.prototype.updateService = function (did, serviceDID, access, isPublic) { + if (isPublic === void 0) { isPublic = true; } + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "updateServiceAccess", + params: { + did: serviceDID, + access: access, + isPublic: isPublic, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Gets information from a service */ + TrustIdHf.prototype.getService = function (did, serviceDID) { + return __awaiter(this, void 0, void 0, function () { + var args, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "getServiceIdentity", + params: { + did: serviceDID, + }, + })]; + case 1: + args = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Invokes a chaincode through the proxy */ + TrustIdHf.prototype.invoke = function (did, serviceDID, args, channel) { + return __awaiter(this, void 0, void 0, function () { + var argsCall, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "invoke", + params: { + did: serviceDID, + args: args, + channel: channel, + }, + })]; + case 1: + argsCall = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, argsCall, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + /** Invokes a chaincode through the proxy */ + TrustIdHf.prototype.query = function (did, serviceDID, args, channel) { + return __awaiter(this, void 0, void 0, function () { + var argsCall, _a, _b, _c, res; + return __generator(this, function (_d) { + switch (_d.label) { + case 0: + _b = (_a = JSON).stringify; + _c = { + did: did.id + }; + return [4 /*yield*/, did.sign({ + function: "invoke", + params: { + did: serviceDID, + args: args, + channel: channel, + }, + })]; + case 1: + argsCall = [ + _b.apply(_a, [(_c.payload = _d.sent(), + _c)]) + ]; + return [4 /*yield*/, this.driver.getContractTransaction(this.config.chaincodeName, this.config.fcn, argsCall, this.config.channel)]; + case 2: + res = _d.sent(); + return [2 /*return*/, res]; + } + }); + }); + }; + return TrustIdHf; +}(trustInterface_1.TrustID)); +exports.TrustIdHf = TrustIdHf; diff --git a/trustid-sdk/dist/src/network/trustInterface.d.ts b/trustid-sdk/dist/src/network/trustInterface.d.ts new file mode 100644 index 00000000..bca611f6 --- /dev/null +++ b/trustid-sdk/dist/src/network/trustInterface.d.ts @@ -0,0 +1,18 @@ +import { DID } from "../wallet"; +export declare abstract class TrustID { + abstract configureDriver(): Promise; + abstract disconnectDriver(): Promise; + abstract createIdentity(did: DID): Promise; + abstract verifyIdentity(adminDID: DID, id: string): Promise; + abstract getIdentity(did: DID, id: string): Promise; + abstract revokeIdentity(adminDID: DID, id: string): Promise; + abstract createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise; + abstract updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise; + abstract getService(did: DID, serviceDID: string): Promise; + abstract invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise; + abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; +} +export interface Access { + did: string; + type: number; +} diff --git a/trustid-sdk/dist/src/network/trustInterface.js b/trustid-sdk/dist/src/network/trustInterface.js new file mode 100644 index 00000000..27097dab --- /dev/null +++ b/trustid-sdk/dist/src/network/trustInterface.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.TrustID = void 0; +var TrustID = /** @class */ (function () { + function TrustID() { + } + return TrustID; +}()); +exports.TrustID = TrustID; diff --git a/trustid-sdk/dist/src/wallet.d.ts b/trustid-sdk/dist/src/wallet.d.ts new file mode 100644 index 00000000..8bc967c3 --- /dev/null +++ b/trustid-sdk/dist/src/wallet.d.ts @@ -0,0 +1,55 @@ +import { TrustID } from "./network/trustInterface"; +import { Keystore } from "./keystore/keystore"; +export declare class DID { + id: string; + pubkey: string; + type: string; + controller: string; + access: number; + private privkey; + private unlockedKey; + readonly ALGO_TYPES: string[]; + constructor(type?: any, controller?: string); + private keyGeneration; + createKey(passphrase?: string): Promise; + unlockAccount(passphrase?: string): Promise; + lockAccount(): any; + loadFromObject(obj: any): void; + exportDID(withPrivate: boolean): { + id: string; + type: string; + pubkey: string; + privkey: string; + controller: string; + }; + /** sign Generates a JWS from a payload using an id from the wallet */ + sign(payload: object): Promise; + /** verify Verifies a JWS from a payload using a did */ + verify(signature: string, did: DID): Promise; +} +/** Class representing Wallets + * It follows a Singleton pattern. + */ +export declare class Wallet { + /** Instance for the wallet */ + private static _instance; + private keystore; + /** Drivers to connected blockchains */ + networks: { + [k: string]: TrustID; + }; + /** Constructor for the wallet */ + private constructor(); + static get Instance(): Wallet; + getDID(id: string): Promise; + storeDID(did: DID): Promise; + listDID(): string[]; + setDefault(did: DID): boolean; + storeInMemory(did: DID): boolean; + /** Set the Keystore to use in the wallet. */ + setKeystore(keystore: Keystore): void; + /** Set the Keystore to use in the wallet. */ + addNetwork(id: string, network: TrustID): void; + /** generateDID generates a new DID in the wallet */ + generateDID(type: string, controller?: string, passphrase?: string): Promise; +} diff --git a/trustid-sdk/dist/src/wallet.js b/trustid-sdk/dist/src/wallet.js new file mode 100644 index 00000000..94c787d9 --- /dev/null +++ b/trustid-sdk/dist/src/wallet.js @@ -0,0 +1,282 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Wallet = exports.DID = void 0; +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var node_jose_1 = require("node-jose"); +var crypto_js_1 = __importDefault(require("crypto-js")); +var fileKeystore_1 = require("./keystore/fileKeystore"); +var DID = /** @class */ (function () { + function DID(type, controller) { + if (type === void 0) { type = "RSA"; } + if (controller === void 0) { controller = "default"; } + // TODO: Default parameters for now: + // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. + this.ALGO_TYPES = ["RSA", "EC", "oct"]; + // If type not supported throw error. + if (!Object.values(this.ALGO_TYPES).includes(type)) { + throw new Error("Key algorithm not supported"); + } + this.id = ""; + this.type = type; + this.controller = controller; + this.access = 0; + this.privkey = ""; + this.pubkey = ""; + this.unlockedKey = null; + } + // TODO: Can we do this more efficiently? + DID.prototype.keyGeneration = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (this.type) { + case "RSA": + return [2 /*return*/, node_jose_1.JWK.createKey("RSA", 2048, { alg: "" })]; + case "EC": + return [2 /*return*/, node_jose_1.JWK.createKey("EC", "P-521", { alg: "" })]; + case "oct": + return [2 /*return*/, node_jose_1.JWK.createKey("oct", 256, { alg: "" })]; + default: + throw new Error("Key algorithm not supported"); + } + return [2 /*return*/]; + }); + }); + }; + DID.prototype.createKey = function (passphrase) { + if (passphrase === void 0) { passphrase = ""; } + return __awaiter(this, void 0, void 0, function () { + var key, addr, pk; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(this.privkey + this.id + this.pubkey === "")) return [3 /*break*/, 2]; + return [4 /*yield*/, this.keyGeneration()]; + case 1: + key = _a.sent(); + addr = crypto_js_1.default.SHA256(key.toPEM(false)).toString(crypto_js_1.default.enc.Hex); + this.id = "did:vtn:trustid:" + addr; + this.pubkey = key.toPEM(); + pk = key.toPEM(true); + this.privkey = crypto_js_1.default.AES.encrypt(pk, passphrase).toString(); + _a.label = 2; + case 2: return [2 /*return*/]; + } + }); + }); + }; + DID.prototype.unlockAccount = function (passphrase) { + if (passphrase === void 0) { passphrase = ""; } + return __awaiter(this, void 0, void 0, function () { + var pem, _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + _c.trys.push([0, 2, , 3]); + pem = crypto_js_1.default.AES.decrypt(this.privkey, passphrase).toString(crypto_js_1.default.enc.Utf8); + _a = this; + return [4 /*yield*/, node_jose_1.JWK.asKey(pem, "pem")]; + case 1: + _a.unlockedKey = _c.sent(); + return [3 /*break*/, 3]; + case 2: + _b = _c.sent(); + throw new Error("Private key couldn't be deciphered"); + case 3: return [2 /*return*/]; + } + }); + }); + }; + DID.prototype.lockAccount = function () { + this.unlockedKey = undefined; + }; + DID.prototype.loadFromObject = function (obj) { + var id = obj.id, type = obj.type, controller = obj.controller, access = obj.access, pubkey = obj.pubkey, privkey = obj.privkey; + this.id = id; + this.type = type; + this.controller = controller; + this.access = access; + this.pubkey = pubkey; + this.privkey = privkey; + }; + DID.prototype.exportDID = function (withPrivate) { + var privkey = withPrivate ? this.privkey : ""; + return { + id: this.id, + type: this.type, + pubkey: this.pubkey, + privkey: privkey, + controller: this.controller + }; + }; + /** sign Generates a JWS from a payload using an id from the wallet */ + DID.prototype.sign = function (payload) { + return __awaiter(this, void 0, void 0, function () { + var buf, sign; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + buf = Buffer.from(JSON.stringify(payload)); + return [4 /*yield*/, node_jose_1.JWS.createSign({ + fields: { cty: 'jwk+json' }, + format: 'compact' + }, this.unlockedKey) + .update(buf) + .final()]; + case 1: + sign = _a.sent(); + return [2 /*return*/, sign.toString()]; + } + }); + }); + }; + /** verify Verifies a JWS from a payload using a did */ + DID.prototype.verify = function (signature, did) { + return __awaiter(this, void 0, void 0, function () { + var pk, verify; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, node_jose_1.JWK.asKey(did.pubkey, 'pem')]; + case 1: + pk = _a.sent(); + return [4 /*yield*/, node_jose_1.JWS.createVerify(pk).verify(signature)]; + case 2: + verify = _a.sent(); + return [2 /*return*/, JSON.parse(verify.payload.toString())]; + } + }); + }); + }; + return DID; +}()); +exports.DID = DID; +/** Class representing Wallets + * It follows a Singleton pattern. + */ +var Wallet = /** @class */ (function () { + /** Constructor for the wallet */ + function Wallet() { + this.keystore = new fileKeystore_1.FileKeystore(); + this.networks = {}; + } + Object.defineProperty(Wallet, "Instance", { + get: function () { + return this._instance || (this._instance = new this()); + }, + enumerable: false, + configurable: true + }); + // Functions from specific keystore that will be overloaded + // in wallet + Wallet.prototype.getDID = function (id) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.keystore.getDID(id)]; + }); + }); + }; + Wallet.prototype.storeDID = function (did) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, this.keystore.storeDID(did)]; + }); + }); + }; + Wallet.prototype.listDID = function () { + return this.keystore.listDID(); + }; + Wallet.prototype.setDefault = function (did) { + return this.keystore.setDefault(did); + }; + Wallet.prototype.storeInMemory = function (did) { + return this.keystore.storeInMemory(did); + }; + /** Set the Keystore to use in the wallet. */ + Wallet.prototype.setKeystore = function (keystore) { + this.keystore = keystore; + }; + /** Set the Keystore to use in the wallet. */ + Wallet.prototype.addNetwork = function (id, network) { + this.networks[id] = network; + }; + /** generateDID generates a new DID in the wallet */ + Wallet.prototype.generateDID = function (type, controller, passphrase) { + if (controller === void 0) { controller = "default"; } + if (passphrase === void 0) { passphrase = ""; } + return __awaiter(this, void 0, void 0, function () { + var value, _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: + value = new DID(type, controller); + return [4 /*yield*/, value.createKey(passphrase)]; + case 1: + _c.sent(); + return [4 /*yield*/, this.keystore.storeDID(value)]; + case 2: + _c.sent(); + _b = (_a = Object).keys; + return [4 /*yield*/, this.keystore.getDID(value.id)]; + case 3: + // If it is the first key assign key as default. + // if (Object.keys(await this.keystore.getDID("default")).length === 0) { + // this.keystore.setDefault(value); + // } + if (_b.apply(_a, [_c.sent()]).length === 0) { + this.keystore.storeInMemory(value); + } + return [2 /*return*/, value]; + } + }); + }); + }; + return Wallet; +}()); +exports.Wallet = Wallet; diff --git a/trustid-sdk/dist/test/fileKeystore.spec.d.ts b/trustid-sdk/dist/test/fileKeystore.spec.d.ts new file mode 100644 index 00000000..87ad0c95 --- /dev/null +++ b/trustid-sdk/dist/test/fileKeystore.spec.d.ts @@ -0,0 +1 @@ +import "mocha"; diff --git a/trustid-sdk/dist/test/fileKeystore.spec.js b/trustid-sdk/dist/test/fileKeystore.spec.js new file mode 100644 index 00000000..39e9e886 --- /dev/null +++ b/trustid-sdk/dist/test/fileKeystore.spec.js @@ -0,0 +1,80 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var chai_1 = require("chai"); +var wallet_1 = require("../src/wallet"); +var fileKeystore_1 = require("../src/keystore/fileKeystore"); +require("mocha"); +var wal = wallet_1.Wallet.Instance; +// const ksfile = './keystore/keystore'+Date.now() +var ksfile = "./keystore"; +var ks = new fileKeystore_1.FileKeystore("file", ksfile); +wal.setKeystore(ks); +describe("Keystore tests", function () { return __awaiter(void 0, void 0, void 0, function () { + var did, hfChaincodeServiceStub, jwtHelperStubC; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; + case 1: + did = _a.sent(); + it("Creates FileKeystore", function () { + chai_1.expect(ks).to.not.equal({}); + }); + // TODO: Fixed this test + // it("Get DID", () => { + // expect(ks.getDID(did.id)).to.eql(did); + // }); + it("Store and load keystore", function () { + var ksfile2 = "./keystore"; + var did2 = wal.generateDID("RSA"); + ks.saveKeystore(); + var ks2 = new fileKeystore_1.FileKeystore("file", ksfile); + ks2.loadKeystore("file", ksfile); + // expect(ks.getDID(did2.id)).to.eql(did2) + }); + return [2 /*return*/]; + } + }); +}); }); diff --git a/trustid-sdk/dist/test/hfdiver.spec.d.ts b/trustid-sdk/dist/test/hfdiver.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/trustid-sdk/dist/test/hfdiver.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/trustid-sdk/dist/test/hfdiver.spec.js b/trustid-sdk/dist/test/hfdiver.spec.js new file mode 100644 index 00000000..9883729a --- /dev/null +++ b/trustid-sdk/dist/test/hfdiver.spec.js @@ -0,0 +1,466 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var hfdriver_1 = require("../src/network/hfdriver"); +/* global describe, it, before, after */ +var expect = require("chai").expect; +var sinon = require("sinon"); +var FabricCAServices = require("fabric-ca-client"); +var _a = require("fabric-network"), Wallets = _a.Wallets, Gateway = _a.Gateway; +describe("HF Driver - Test", function () { + before(function () { }); + describe("Connect ", function () { + var gatewayStub; + var walletStub; + var fabricCAServicesStub; + var errolment = { + certificate: "skdjsd00", + key: { + toBytes: function () { }, + }, + }; + before(function (done) { + var wallet = { + put: function () { + } + }; + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub.onSecondCall().rejects(new Error("Error connecting")); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + after(function (done) { + gatewayStub.restore(); + walletStub.restore(); + fabricCAServicesStub.restore(); + done(); + }); + it("Connect Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, config, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + hfdriver = new hfdriver_1.HfDriver(); + config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + sinon.assert.calledOnce(gatewayStub); + sinon.assert.calledOnce(walletStub); + sinon.assert.calledOnce(fabricCAServicesStub); + return [3 /*break*/, 3]; + case 2: + err_1 = _a.sent(); + console.log(err_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Connect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, config, err_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + hfdriver = new hfdriver_1.HfDriver(); + config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_2 = _a.sent(); + expect(err_2.message).to.equal('Error connecting'); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Disconnect ", function () { + var gatewayStub2; + var gatewayStub; + var walletStub; + var fabricCAServicesStub; + var config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + var errolment = { + certificate: "skdjsd00", + key: { + toBytes: function () { }, + }, + }; + before(function (done) { + var wallet = { + put: function () { + } + }; + gatewayStub2 = sinon.stub(Gateway.prototype, "disconnect").resolves(); + gatewayStub2.onSecondCall().throws(new Error("Error disconnecting")); + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + after(function (done) { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + it("Disconnect Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, err_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.disconnect()]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_3 = _a.sent(); + console.log(err_3); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + it("Disconnect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, err_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.disconnect()]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_4 = _a.sent(); + expect(err_4.message).to.equal('Error disconnecting'); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Call contract transaction ", function () { + var gatewayStub; + var walletStub; + var gatewayStub2; + var fabricCAServicesStub; + var config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + var errolment = { + certificate: "skdjsd00", + key: { + toBytes: function () { }, + }, + }; + before(function (done) { + var wallet = { + put: function () { + } + }; + var contract = { + submitTransaction: function () { + return new Promise(function (resolve) { + resolve("OK"); + }); + } + }; + var network = { + getContract: function () { + return new Promise(function (resolve) { + resolve(contract); + }); + } + }; + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + after(function (done) { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + it("Call Contract Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, res, err_5; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; + case 2: + res = _a.sent(); + expect(res).to.equal("OK"); + return [3 /*break*/, 4]; + case 3: + err_5 = _a.sent(); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + it("Disconnect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, err_6; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_6 = _a.sent(); + expect(err_6.message).to.equal('Network not exists'); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Get contract transaction ", function () { + var gatewayStub; + var walletStub; + var gatewayStub2; + var fabricCAServicesStub; + var config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + var errolment = { + certificate: "skdjsd00", + key: { + toBytes: function () { }, + }, + }; + before(function (done) { + var wallet = { + put: function () { + } + }; + var contract = { + evaluateTransaction: function () { + return new Promise(function (resolve) { + resolve("OK"); + }); + } + }; + var network = { + getContract: function () { + return new Promise(function (resolve) { + resolve(contract); + }); + } + }; + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + after(function (done) { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + it("get Contract Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, res, err_7; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; + case 2: + res = _a.sent(); + expect(res).to.equal("OK"); + return [3 /*break*/, 4]; + case 3: + err_7 = _a.sent(); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + it("Get contract Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var hfdriver, err_8; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 3, , 4]); + hfdriver = new hfdriver_1.HfDriver(); + return [4 /*yield*/, hfdriver.connect(config)]; + case 1: + _a.sent(); + return [4 /*yield*/, hfdriver.getContractTransaction("name", "invoke", ["a"])]; + case 2: + _a.sent(); + return [3 /*break*/, 4]; + case 3: + err_8 = _a.sent(); + expect(err_8.message).to.equal('Network not exists'); + return [3 /*break*/, 4]; + case 4: return [2 /*return*/]; + } + }); + }); }); + }); +}); diff --git a/trustid-sdk/dist/test/integration/test.d.ts b/trustid-sdk/dist/test/integration/test.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/trustid-sdk/dist/test/integration/test.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/trustid-sdk/dist/test/integration/test.js b/trustid-sdk/dist/test/integration/test.js new file mode 100644 index 00000000..097b05bd --- /dev/null +++ b/trustid-sdk/dist/test/integration/test.js @@ -0,0 +1,149 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var wallet_1 = require("../../src/wallet"); +var chai_1 = require("chai"); +var trustHF_1 = require("../../src/network/trustHF"); +var path = require("path"); +var fs = require("fs"); +var ccpPath = path.resolve(__dirname, "..", "..", "..", "connection-profile.json"); +var adminPriv = "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7Th71Us2fUkeB\ng0gxGtRDgkeEefTBnE8IP2Rw/PrdIwGJicK1EzbikrzqABpO4zgPxXYuOsDp28Fb\nAE5/a4X/iKshFcw5ojny61cQKwDSvoLDZKkJhJXwErXLyGmezDTb9PTFhENsWp+G\n+pywEnbgsjoXi0Khs+h6ASlsJNagsy4wRPdZkUvKZhKIbjY2ZtxnQpMaTBPOIvKU\nvbafnABlOV+6+4FANFsr9L181bNeOiaEmaqzJCajZgBHQUDVpefs96qj/S0J+0mT\nwmNajN0+DedN4Z6Xl/E25XuuaU3brEFTqnTE2DXa3P7iCCsR6r313OCR8/4pCliX\nNlUEs12ZAgMBAAECggEAZ/0SQP9Mu5RxsJzTWrfbevN8gzc2RLtkQV74g6ZgHJ/P\nva1nFSLqyNXQ3lVaRcvulwr49ueVrQBdlAlSi3mFtn4JDGBOtvyzEYPJHWfSmC4+\n6P4cvvUGTXgFyHKm+QvEmQ2hS3uH90NE6CqBDVvi9hLdH68oOiBpBDta5Ph61FJS\nOcaVQ20jEldMkz6bYv9pOYl6hunJnYB+ZYKcq25SkTEERwKQueDtzwB8ulsazbuw\nn8CraL2ncN7cAOlfcVYUica1LnP74roEK+zIUFFsjTxC9xMS47GwWkFls1VLEDb1\ntKUxJLnYJJy/18b+gpFDztr3BZFgiUpO1QUaY9aPgQKBgQDwBNm9usvfB/w76z0A\nU5JNfC1Pk3MpxRBKOM84s3HCUiu7KbCnLmOKTmORAcsbO0H+uU5xMYcsUdIgQF2C\n9SAGcKize12xqcsutoQPiEisEi387rsk1iQ8jJ03fQY6SNBe+fZta3JXuVogeiRd\nzz0YfZ7OBh2MkwEDpNjUAeXiaQKBgQDHxsIPvFGq0cbzmuIYQsQJV71y3H4iPGRI\nDVkTs6Vc9VDMAN5GtRB1HkfpQtVBFwpDZIhvfySmLhnGi2vs6fKFwo9SpRmxSypZ\nrkzs1/0Gc7ZRbHRwt1n326s2Sry+6+0AxOxsM6+OJNqfugN9RAfg8zeJeEEJTYTU\n3ty+pULbsQKBgQDPl7JoGib4mSR9AqH5JU8Vu4BJIkPp7aqAN5Bq/zE2G/H86DsE\n7edkGRaetYlg3SjgUo/Y8ThzibUO9fyrJq3zQ/91dQ79edjlZzDjakFIqlSiPi0Y\n2CnxQME92+HGCXJHozSTQOpdm0+rZVkM1hCGnSf8E2f9TKwE5dAv1hBpeQKBgQC/\npL7DQ5+AY68cP+dG6L2QTNgTWMuzYgW9TPi3uq0WiMqSeP7CC64W/A52CUP0JfsV\nfVqYwvpQZIcbfOHyqtaZVHQTDwifmICu+VMYHXa/+r7aS1VET8+BwvvyoC2CZWa9\nRyuZ/NcbX+VONq5kO5/nPsp3GKIjH3cekhBm3rhNcQKBgBlCEJfRyslFjv90wI5N\niWEOYoTkY3R8RhAooq9AbFIbPPXHUiJOyqnau4FeiUTtc0ZyRv5A55qhKbsj7p4o\nbmyvEGp6cvVmnn3UGH49k5blWzm0MoksxSiYphtBxHqMyuY+Gfj6BN+JAwyrEKwl\ng/fADk89eHUjNgoedy6wWqL3\n-----END PRIVATE KEY-----"; +var adminPub = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu04e9VLNn1JHgYNIMRrU\nQ4JHhHn0wZxPCD9kcPz63SMBiYnCtRM24pK86gAaTuM4D8V2LjrA6dvBWwBOf2uF\n/4irIRXMOaI58utXECsA0r6Cw2SpCYSV8BK1y8hpnsw02/T0xYRDbFqfhvqcsBJ2\n4LI6F4tCobPoegEpbCTWoLMuMET3WZFLymYSiG42NmbcZ0KTGkwTziLylL22n5wA\nZTlfuvuBQDRbK/S9fNWzXjomhJmqsyQmo2YAR0FA1aXn7Peqo/0tCftJk8JjWozd\nPg3nTeGel5fxNuV7rmlN26xBU6p0xNg12tz+4ggrEeq99dzgkfP+KQpYlzZVBLNd\nmQIDAQAB\n-----END PUBLIC KEY-----\n"; +describe("Integration test", function () { + it("Invoke service", function () { return __awaiter(void 0, void 0, void 0, function () { + var wal, ccp, config, identity, trustID, access, didUnlock, _a, _b, _c, _d, _e, id, _f, _g, _h, _j, result, _k, _l, err_1; + return __generator(this, function (_m) { + switch (_m.label) { + case 0: + wal = wallet_1.Wallet.Instance; + _m.label = 1; + case 1: + _m.trys.push([1, 19, , 21]); + ccp = JSON.parse(fs.readFileSync(ccpPath, "utf8")); + config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: ccp, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; + case 2: + identity = _m.sent(); + return [4 /*yield*/, wal.setDefault(identity)]; + case 3: + _m.sent(); + trustID = new trustHF_1.TrustIdHf(config); + wal.addNetwork("hf", trustID); + return [4 /*yield*/, wal.networks["hf"].configureDriver()]; + case 4: + _m.sent(); + access = { did: "did:vtn:trustos:telefonica:0", type: 2 }; + return [4 /*yield*/, wal.getDID("default")]; + case 5: + didUnlock = _m.sent(); + return [4 /*yield*/, didUnlock.unlockAccount("secret")]; + case 6: + _m.sent(); + _b = (_a = wal.networks["hf"]).createIdentity; + return [4 /*yield*/, wal.getDID("default")]; + case 7: return [4 /*yield*/, _b.apply(_a, [_m.sent()])]; + case 8: + _m.sent(); + console.log("Getting created key..."); + _d = (_c = trustID).getIdentity; + return [4 /*yield*/, wal.getDID("default")]; + case 9: + _e = [_m.sent()]; + return [4 /*yield*/, didUnlock.id]; + case 10: return [4 /*yield*/, _d.apply(_c, _e.concat([_m.sent()]))]; + case 11: + _m.sent(); + id = Date.now(); + _g = (_f = trustID).createService; + return [4 /*yield*/, wal.getDID("default")]; + case 12: return [4 /*yield*/, _g.apply(_f, [_m.sent(), "vtn:trustos:service:" + id, "chaincode", true])]; + case 13: + _m.sent(); + _j = (_h = trustID).updateService; + return [4 /*yield*/, wal.getDID("default")]; + case 14: return [4 /*yield*/, _j.apply(_h, [_m.sent(), "vtn:trustos:service:" + id, access, true])]; + case 15: + _m.sent(); + _l = (_k = trustID).invoke; + return [4 /*yield*/, wal.getDID("default")]; + case 16: return [4 /*yield*/, _l.apply(_k, [_m.sent(), + "vtn:trustos:service:1" + id, ["set", "5", "100"], + "telefonicachannel"])]; + case 17: + result = _m.sent(); + return [4 /*yield*/, wal.networks["hf"].disconnectDriver()]; + case 18: + _m.sent(); + chai_1.expect(result).to.equal("100"); + return [3 /*break*/, 21]; + case 19: + err_1 = _m.sent(); + return [4 /*yield*/, wal.networks["hf"].disconnectDriver()]; + case 20: + _m.sent(); + console.log(err_1); + return [3 /*break*/, 21]; + case 21: return [2 /*return*/]; + } + }); + }); }); +}); diff --git a/trustid-sdk/dist/test/trustHF.spec.d.ts b/trustid-sdk/dist/test/trustHF.spec.d.ts new file mode 100644 index 00000000..cb0ff5c3 --- /dev/null +++ b/trustid-sdk/dist/test/trustHF.spec.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/trustid-sdk/dist/test/trustHF.spec.js b/trustid-sdk/dist/test/trustHF.spec.js new file mode 100644 index 00000000..d5858445 --- /dev/null +++ b/trustid-sdk/dist/test/trustHF.spec.js @@ -0,0 +1,699 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var hfdriver_1 = require("../src/network/hfdriver"); +var trustHF_1 = require("../src/network/trustHF"); +var wallet_1 = require("../src/wallet"); +/* global describe, it, before, after */ +var expect = require("chai").expect; +var sinon = require("sinon"); +describe("TrustHF - Test", function () { return __awaiter(void 0, void 0, void 0, function () { + var config, wal, identity; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + wal = wallet_1.Wallet.Instance; + return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; + case 1: + identity = _a.sent(); + return [4 /*yield*/, identity.unlockAccount("secret")]; + case 2: + _a.sent(); + before(function () { }); + describe("Configure Driver ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "connect").resolves(); + driverStub.onSecondCall().rejects(new Error("Error connecting")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Configure Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.configureDriver()]; + case 1: + _a.sent(); + sinon.assert.calledOnce(driverStub); + return [3 /*break*/, 3]; + case 2: + err_1 = _a.sent(); + console.log(err_1); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Configure Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_2; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.configureDriver()]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_2 = _a.sent(); + expect(err_2.message).to.equal("Error connecting"); + sinon.assert.calledTwice(driverStub); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Disconnect Driver ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "disconnect").resolves(); + driverStub.onSecondCall().rejects(new Error("Error disconnect")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Configure Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_3; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.disconnectDriver()]; + case 1: + _a.sent(); + sinon.assert.calledOnce(driverStub); + return [3 /*break*/, 3]; + case 2: + err_3 = _a.sent(); + console.log(err_3); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Configure Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_4; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.disconnectDriver()]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_4 = _a.sent(); + expect(err_4.message).to.equal("Error disconnect"); + sinon.assert.calledTwice(driverStub); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Create identity ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Create Identity", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_5; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.createIdentity(identity)]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_5 = _a.sent(); + console.log(err_5); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Connect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + return __generator(this, function (_a) { + try { + } + catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + return [2 /*return*/]; + }); + }); }); + }); + describe("Create identity ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Create Identity", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_6; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.createIdentity(identity)]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_6 = _a.sent(); + console.log(err_6); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Create Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_7; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.createIdentity(identity)]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_7 = _a.sent(); + expect(err_7.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Verify identity ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Verify IdentitY", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_8; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.verifyIdentity(identity, "id")]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_8 = _a.sent(); + console.log(err_8); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Verify Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_9; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.verifyIdentity(identity, "id")]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_9 = _a.sent(); + expect(err_9.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Revoke identity ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Revoke IdentitY Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_10; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.revokeIdentity(identity, "id")]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_10 = _a.sent(); + console.log(err_10); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Revoke Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_11; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.revokeIdentity(identity, "id")]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_11 = _a.sent(); + expect(err_11.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Get identity ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("This is identity"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Get IdentitY Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_12; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.getIdentity(identity, "id")]; + case 1: + result = _a.sent(); + expect(result).to.equal("This is identity"); + return [3 /*break*/, 3]; + case 2: + err_12 = _a.sent(); + console.log(err_12); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Get identity Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_13; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.getIdentity(identity, "id")]; + case 1: + result = _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_13 = _a.sent(); + expect(err_13.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Create Service ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Create Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_14; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.createService(identity, "id", "name")]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_14 = _a.sent(); + console.log(err_14); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Create Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_15; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.createService(identity, "id", "name")]; + case 1: + result = _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_15 = _a.sent(); + expect(err_15.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Update Service ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + var access = { + type: 1, + did: "ksjdskjd" + }; + it("Update Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_16; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.updateService(identity, "id", access)]; + case 1: + result = _a.sent(); + expect(result).to.equal("OK"); + return [3 /*break*/, 3]; + case 2: + err_16 = _a.sent(); + console.log(err_16); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Update Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_17; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.updateService(identity, "id", access)]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_17 = _a.sent(); + expect(err_17.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Get Service ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("Service1"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + var access = { + type: 1, + did: "ksjdskjd" + }; + it("Get Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_18; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.getService(identity, "id")]; + case 1: + result = _a.sent(); + expect(result).to.equal("Service1"); + return [3 /*break*/, 3]; + case 2: + err_18 = _a.sent(); + console.log(err_18); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Get Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_19; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.getService(identity, "id")]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_19 = _a.sent(); + expect(err_19.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Invoke Service ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Invoke Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_20; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.invoke(identity, "id", ["a"], "channel1")]; + case 1: + result = _a.sent(); + expect(result).to.equal("result"); + return [3 /*break*/, 3]; + case 2: + err_20 = _a.sent(); + console.log(err_20); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Invoke Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_21; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.invoke(identity, "id", ["a"], "channel1")]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_21 = _a.sent(); + expect(err_21.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + describe("Query Service ", function () { + var driverStub; + before(function (done) { + driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "getContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + after(function (done) { + driverStub.restore(); + done(); + }); + it("Query Success", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, result, err_22; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.query(identity, "id", ["a"], "channel1")]; + case 1: + result = _a.sent(); + expect(result).to.equal("result"); + return [3 /*break*/, 3]; + case 2: + err_22 = _a.sent(); + console.log(err_22); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + it("Query Fail", function () { return __awaiter(void 0, void 0, void 0, function () { + var trustID, err_23; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2, , 3]); + trustID = new trustHF_1.TrustIdHf(config); + return [4 /*yield*/, trustID.query(identity, "id", ["a"], "channel1")]; + case 1: + _a.sent(); + return [3 /*break*/, 3]; + case 2: + err_23 = _a.sent(); + expect(err_23.message).to.equal("Error calling contract"); + return [3 /*break*/, 3]; + case 3: return [2 /*return*/]; + } + }); + }); }); + }); + return [2 /*return*/]; + } + }); +}); }); diff --git a/trustid-sdk/dist/test/wallet.spec.d.ts b/trustid-sdk/dist/test/wallet.spec.d.ts new file mode 100644 index 00000000..53eb506e --- /dev/null +++ b/trustid-sdk/dist/test/wallet.spec.d.ts @@ -0,0 +1 @@ +import 'mocha'; diff --git a/trustid-sdk/dist/test/wallet.spec.js b/trustid-sdk/dist/test/wallet.spec.js new file mode 100644 index 00000000..8d08723a --- /dev/null +++ b/trustid-sdk/dist/test/wallet.spec.js @@ -0,0 +1,171 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __generator = (this && this.__generator) || function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + 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; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +var chai_1 = require("chai"); +var wallet_1 = require("../src/wallet"); +var fileKeystore_1 = require("../src/keystore/fileKeystore"); +require("mocha"); +var wal = wallet_1.Wallet.Instance; +//const hfdriver = wal.drivers.hf +var ks = new fileKeystore_1.FileKeystore('file'); +wal.setKeystore(ks); +describe('Wallet tests', function () { + it('creates new wallet', function () { + chai_1.expect(wal).to.not.equal({}); + }); + it('Creates FileKeystore for integration in wallet', function () { + chai_1.expect(ks).to.not.equal({}); + }); + it('wallet not initialized twice', function () { + var wal2 = wallet_1.Wallet.Instance; + chai_1.expect(wal).to.equal(wal2); + }); + it('generate RSA DID', function () { return __awaiter(void 0, void 0, void 0, function () { + var did, did2, _a, _b; + return __generator(this, function (_c) { + switch (_c.label) { + case 0: return [4 /*yield*/, wal.generateDID('RSA', 'default', 'secret')]; + case 1: + did = _c.sent(); + return [4 /*yield*/, wal.generateDID('RSA', 'default', 'secret')]; + case 2: + did2 = _c.sent(); + chai_1.expect([did.type, did.controller]).to.eql(['RSA', 'default']); + _a = chai_1.expect; + return [4 /*yield*/, wal.getDID(did.id)]; + case 3: + _a.apply(void 0, [_c.sent()]).to.eql(did); + _b = chai_1.expect; + return [4 /*yield*/, wal.getDID(did.id)]; + case 4: + _b.apply(void 0, [_c.sent()]).to.not.eql(did2); + return [2 /*return*/]; + } + }); + }); }); + it('DID operations', function () { return __awaiter(void 0, void 0, void 0, function () { + var did, did2, payload, err_1, err_2, err_3, signed, verified, err_4, err_5; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, wal.generateDID('EC', 'default', 'secret')]; + case 1: + did = _a.sent(); + return [4 /*yield*/, wal.generateDID('EC', 'default', 'secret')]; + case 2: + did2 = _a.sent(); + payload = { my: "payload" }; + _a.label = 3; + case 3: + _a.trys.push([3, 5, , 6]); + return [4 /*yield*/, wal.generateDID('ed213', 'default', 'secret')]; + case 4: + _a.sent(); + return [3 /*break*/, 6]; + case 5: + err_1 = _a.sent(); + chai_1.expect(err_1).to.be.an('error'); + return [3 /*break*/, 6]; + case 6: + _a.trys.push([6, 8, , 9]); + return [4 /*yield*/, did.unlockAccount('wrong')]; + case 7: + _a.sent(); + return [3 /*break*/, 9]; + case 8: + err_2 = _a.sent(); + chai_1.expect(err_2).to.be.an('error'); + return [3 /*break*/, 9]; + case 9: + _a.trys.push([9, 11, , 12]); + return [4 /*yield*/, did.sign(payload)]; + case 10: + _a.sent(); + return [3 /*break*/, 12]; + case 11: + err_3 = _a.sent(); + chai_1.expect(err_3).to.be.an('error'); + return [3 /*break*/, 12]; + case 12: return [4 /*yield*/, did2.unlockAccount('secret')]; + case 13: + _a.sent(); + return [4 /*yield*/, did.unlockAccount('secret')]; + case 14: + _a.sent(); + return [4 /*yield*/, did2.sign(payload)]; + case 15: + signed = _a.sent(); + return [4 /*yield*/, did.verify(signed, did2)]; + case 16: + verified = _a.sent(); + chai_1.expect(verified).to.eql(payload); + _a.label = 17; + case 17: + _a.trys.push([17, 19, , 20]); + return [4 /*yield*/, did.verify(signed, did)]; + case 18: + _a.sent(); + return [3 /*break*/, 20]; + case 19: + err_4 = _a.sent(); + chai_1.expect(err_4).to.be.an('error'); + return [3 /*break*/, 20]; + case 20: + did.lockAccount(); + _a.label = 21; + case 21: + _a.trys.push([21, 23, , 24]); + return [4 /*yield*/, did.sign(payload)]; + case 22: + _a.sent(); + return [3 /*break*/, 24]; + case 23: + err_5 = _a.sent(); + chai_1.expect(err_5).to.be.an('error'); + return [3 /*break*/, 24]; + case 24: return [2 /*return*/]; + } + }); + }); }); +}); diff --git a/trustid-sdk/index-light.ts b/trustid-sdk/index-light.ts new file mode 100755 index 00000000..75aa23a5 --- /dev/null +++ b/trustid-sdk/index-light.ts @@ -0,0 +1,11 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {Wallet, DID} from "./src/wallet"; +import {LocalStorageKeystore} from "./src/keystore/localStorageKeystore"; + +export {Wallet, DID, LocalStorageKeystore}; diff --git a/trustid-sdk/index.ts b/trustid-sdk/index.ts new file mode 100755 index 00000000..7fca5bf2 --- /dev/null +++ b/trustid-sdk/index.ts @@ -0,0 +1,15 @@ + +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {Wallet, DID} from "./src/wallet"; +import {FileKeystore} from "./src/keystore/fileKeystore"; +import {MongoKeystore} from "./src/keystore/mongoKeystore"; +import {LocalStorageKeystore} from "./src/keystore/localStorageKeystore"; +import {TrustIdHf} from "./src/network/trustHF" + +export {Wallet, DID, FileKeystore, MongoKeystore, LocalStorageKeystore, TrustIdHf}; diff --git a/trustid-sdk/keystore b/trustid-sdk/keystore new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/trustid-sdk/keystore @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json new file mode 100644 index 00000000..5dc6efe0 --- /dev/null +++ b/trustid-sdk/package-lock.json @@ -0,0 +1,3803 @@ +{ + "name": "trustid-sdk", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", + "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@panva/asn1.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", + "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" + }, + "@semantic-ui-react/event-stack": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz", + "integrity": "sha512-SA7VOu/tY3OkooR++mm9voeQrJpYXjJaMHO1aFCcSouS2xhqMR9Gnz0LEGLOR0h9ueWPBKaQzKIrx3FTTJZmUQ==", + "dev": true, + "requires": { + "exenv": "^1.2.2", + "prop-types": "^15.6.2" + } + }, + "@sinonjs/commons": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.2.tgz", + "integrity": "sha512-+DUO6pnp3udV/v2VfUWgaY5BIE1IfT7lLfeDzPVeMT1XKkaAp9LgSI9x5RtrFQoZ9Oi0PgXQQHPaoKu7dCjVxw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/formatio": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", + "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^5.0.2" + } + }, + "@sinonjs/samsam": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", + "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@stardust-ui/react-component-event-listener": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", + "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2" + } + }, + "@stardust-ui/react-component-ref": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", + "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.6.3" + } + }, + "@types/bson": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", + "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", + "requires": { + "@types/node": "*" + } + }, + "@types/bytebuffer": { + "version": "5.0.41", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.41.tgz", + "integrity": "sha512-Mdrv4YcaHvpkx25ksqqFaezktx3yZRcd51GZY0rY/9avyaqZdiT/GiWRhfrJhMpgzXqTOSHgGvsumGxJFNiZZA==", + "optional": true, + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", + "optional": true + }, + "@types/chai": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", + "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", + "dev": true + }, + "@types/crypto-js": { + "version": "3.1.46", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.46.tgz", + "integrity": "sha512-w1rUo6jY6dhNQXOl85UAvJHPX8pIqzfUH2E1+HxU3Z4HsuAaiYPkogEplJqD5QmtDtWC5MUkULtJEvpX5501xQ==", + "dev": true + }, + "@types/jwk-to-pem": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", + "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", + "dev": true + }, + "@types/long": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", + "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", + "optional": true + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mocha": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", + "dev": true + }, + "@types/mongodb": { + "version": "3.5.14", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.14.tgz", + "integrity": "sha512-6SBBf4/pFTPu+Xmio6A4JPv/zXbsS/h7d3SdhaXRfTdE8pPNKUfOG3Tn7O0sjcu7Nz0syorSiQE6CMcoQD15TQ==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, + "@types/mongoose": { + "version": "5.7.14", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.14.tgz", + "integrity": "sha512-jdMhuIluxmPKP58juOvQEl1C0syqyG0LK19zP+FRha0gvlFUwttXr2uxX4pzTHcuu/V6omzia9iGeXCoTEOT+w==", + "requires": { + "@types/mongodb": "*", + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", + "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" + }, + "@types/node-jose": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.3.tgz", + "integrity": "sha512-rjFWRAc7hHhdTUutZsrL3P4q+ousHuFBibK4xfUsjq8hogGtaVMQsBY9PBapB9Axxz1t8pPlT+VpJX8Xpz44Fg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/request": { + "version": "2.48.4", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.4.tgz", + "integrity": "sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw==", + "optional": true, + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "@types/sinon": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.0.tgz", + "integrity": "sha512-v2TkYHkts4VXshMkcmot/H+ERZ2SevKa10saGaJPGCJ8vh3lKrC4u663zYEeRZxep+VbG6YRDtQ6gVqw9dYzPA==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", + "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", + "optional": true + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "optional": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "optional": true, + "requires": { + "colour": "~0.7.1", + "optjs": "~3.2.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "optional": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "optional": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "optional": true + }, + "aws4": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "optional": true + }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true + }, + "bl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", + "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "optional": true + }, + "browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", + "optional": true + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "bson": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", + "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + }, + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "optional": true, + "requires": { + "long": "~3" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "optional": true + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "classnames": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", + "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + } + } + }, + "cloudant-follow": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", + "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", + "optional": true, + "requires": { + "browser-request": "~0.3.0", + "debug": "^3.0.0", + "request": "^2.83.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=", + "optional": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "optional": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-react-context": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", + "integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==", + "dev": true, + "requires": { + "gud": "^1.0.0", + "warning": "^4.0.3" + } + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", + "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", + "optional": true + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "optional": true + }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "optional": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "errs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", + "optional": true + }, + "es-abstract": { + "version": "1.17.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", + "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.1.5", + "is-regex": "^1.0.5", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimleft": "^2.1.1", + "string.prototype.trimright": "^2.1.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "optional": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "optional": true + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "optional": true + }, + "fabric-ca-client": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", + "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", + "optional": true, + "requires": { + "fabric-common": "^2.1.0", + "jsrsasign": "^7.2.2", + "url": "^0.11.0", + "util": "^0.10.3", + "winston": "^2.4.0" + }, + "dependencies": { + "fabric-common": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.0.tgz", + "integrity": "sha512-t980mEGBlbVTq2y6Zi3ZtVN5RnUy5xNoRWhPTpifAsI1m0KYBSh8jPcxtybMrLds12J/PAE7qI4TrgbZMqapKg==", + "optional": true, + "requires": { + "elliptic": "^6.2.3", + "fabric-protos": "^2.1.0", + "js-sha3": "^0.7.0", + "nano": "^6.4.4", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" + } + }, + "fabric-protos": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.0.tgz", + "integrity": "sha512-99+5ouNLUGz6sA5wQJyhpCYUGlfk8JHWSPUtjutnTRyb40TnbfebmG6k7lBCI6Kjyd7l9AHlD5yZuF7oCqAgkA==", + "optional": true, + "requires": { + "grpc": "1.24.2", + "lodash.clone": "4.5.0", + "protobufjs": "^5.0.3" + } + } + } + }, + "fabric-network": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.1.0.tgz", + "integrity": "sha512-9VqUvYX2fROleTl1sKIx51EhLDfhDxDMHIgafRvicBFJKYAeQ6nyKWmk3gZIlGxmB2LjpIV+WzwR5Z2PiNI03w==", + "optional": true, + "requires": { + "fabric-ca-client": "^2.1.0", + "fabric-common": "^2.1.0", + "fs-extra": "^8.1.0", + "long": "^4.0.0", + "nano": "^8.1.0", + "winston": "^2.4.0" + }, + "dependencies": { + "cloudant-follow": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", + "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", + "optional": true, + "requires": { + "browser-request": "~0.3.0", + "debug": "^4.0.1", + "request": "^2.88.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "fabric-ca-client": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", + "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", + "optional": true, + "requires": { + "fabric-common": "^2.1.0", + "jsrsasign": "^7.2.2", + "url": "^0.11.0", + "util": "^0.10.3", + "winston": "^2.4.0" + } + }, + "fabric-common": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.0.tgz", + "integrity": "sha512-t980mEGBlbVTq2y6Zi3ZtVN5RnUy5xNoRWhPTpifAsI1m0KYBSh8jPcxtybMrLds12J/PAE7qI4TrgbZMqapKg==", + "optional": true, + "requires": { + "elliptic": "^6.2.3", + "fabric-protos": "^2.1.0", + "js-sha3": "^0.7.0", + "nano": "^6.4.4", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" + }, + "dependencies": { + "cloudant-follow": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", + "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", + "optional": true, + "requires": { + "browser-request": "~0.3.0", + "debug": "^3.0.0", + "request": "^2.83.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "optional": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "optional": true + } + } + }, + "nano": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", + "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", + "optional": true, + "requires": { + "cloudant-follow": "~0.17.0", + "debug": "^2.2.0", + "errs": "^0.3.2", + "lodash.isempty": "^4.4.0", + "request": "^2.85.0" + } + } + } + }, + "fabric-protos": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.0.tgz", + "integrity": "sha512-99+5ouNLUGz6sA5wQJyhpCYUGlfk8JHWSPUtjutnTRyb40TnbfebmG6k7lBCI6Kjyd7l9AHlD5yZuF7oCqAgkA==", + "optional": true, + "requires": { + "grpc": "1.24.2", + "lodash.clone": "4.5.0", + "protobufjs": "^5.0.3" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "optional": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "optional": true + }, + "nano": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", + "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", + "optional": true, + "requires": { + "@types/request": "^2.48.4", + "cloudant-follow": "^0.18.2", + "debug": "^4.1.1", + "errs": "^0.3.2", + "request": "^2.88.0" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "optional": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "optional": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "optional": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "grpc": { + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", + "integrity": "sha512-EG3WH6AWMVvAiV15d+lr+K77HJ/KV/3FvMpjKjulXHbTwgDZkhkcWbwhxFAoTdxTkQvy0WFcO3Nog50QBbHZWw==", + "optional": true, + "requires": { + "@types/bytebuffer": "^5.0.40", + "lodash.camelcase": "^4.3.0", + "lodash.clone": "^4.5.0", + "nan": "^2.13.2", + "node-pre-gyp": "^0.14.0", + "protobufjs": "^5.0.3" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "optional": true + }, + "aproba": { + "version": "1.2.0", + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": false, + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.3", + "resolved": false, + "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "optional": true + }, + "debug": { + "version": "3.2.6", + "resolved": false, + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": false, + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "optional": true + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": false, + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "optional": true, + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "optional": true + }, + "gauge": { + "version": "2.7.4", + "resolved": false, + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.4", + "resolved": false, + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": false, + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "resolved": false, + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": false, + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "optional": true + }, + "ini": { + "version": "1.3.5", + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + }, + "minipass": { + "version": "2.9.0", + "resolved": false, + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": false, + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "optional": true, + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "optional": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "optional": true + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": false, + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "optional": true + }, + "needle": { + "version": "2.4.0", + "resolved": false, + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.14.0", + "resolved": false, + "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4.4.2" + } + }, + "nopt": { + "version": "4.0.1", + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "resolved": false, + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", + "optional": true + }, + "npm-packlist": { + "version": "1.4.6", + "resolved": false, + "integrity": "sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg==", + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "optional": true + }, + "once": { + "version": "1.4.0", + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "optional": true + }, + "osenv": { + "version": "0.1.5", + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": false, + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": false, + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": false, + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": false, + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "sax": { + "version": "1.2.4", + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": false, + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "optional": true + }, + "string-width": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "optional": true + }, + "tar": { + "version": "4.4.13", + "resolved": false, + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": false, + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "optional": true + }, + "yallist": { + "version": "3.1.1", + "resolved": false, + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "optional": true + } + } + }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "optional": true + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "optional": true, + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "optional": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "highlight.js": { + "version": "9.18.1", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", + "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "optional": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "optional": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "optional": true + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + }, + "is-callable": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", + "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "dev": true + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-regex": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", + "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "optional": true + }, + "jose": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.0.tgz", + "integrity": "sha512-SxYPCM9pWDaK070CXbxgL4ktVzLlE0yJxevDJtbWxv2WMQwYfpBZLYlG8PhChsiOfOXp6FrceRgTuZh1vZeDlg==", + "requires": { + "@panva/asn1.js": "^1.0.0" + } + }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", + "dev": true + }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==", + "optional": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "optional": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "optional": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsrsasign": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", + "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=", + "optional": true + }, + "just-extend": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "dev": true + }, + "kareem": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", + "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" + }, + "keyboard-key": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", + "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "optional": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "optional": true + }, + "lodash.clone": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", + "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", + "optional": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.isempty": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", + "optional": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", + "optional": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lunr": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", + "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", + "dev": true + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "marked": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "dev": true + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "optional": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "optional": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "optional": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "mongodb": { + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.7.tgz", + "integrity": "sha512-lMtleRT+vIgY/JhhTn1nyGwnSMmJkJELp+4ZbrjctrnBxuLbj6rmLuJFz8W2xUzUqWmqoyVxJLYuC58ZKpcTYQ==", + "requires": { + "bl": "^2.2.0", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.9.15", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.15.tgz", + "integrity": "sha512-dGIDqaQkAJoLl7lsRLy70mDg+VcL1IPOHr/0f23MLF45PtnM5exRdmienfyVjdrSVGgTus+1sMUKef6vSnrDZg==", + "requires": { + "bson": "^1.1.4", + "kareem": "2.3.1", + "mongodb": "3.5.7", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.7.0", + "mquery": "3.2.2", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.1.2", + "sift": "7.0.1", + "sliced": "1.0.1" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz", + "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==" + }, + "mquery": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", + "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "optional": true + }, + "nano": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", + "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", + "optional": true, + "requires": { + "cloudant-follow": "~0.17.0", + "debug": "^2.2.0", + "errs": "^0.3.2", + "lodash.isempty": "^4.4.0", + "request": "^2.85.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "optional": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "optional": true, + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "nise": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", + "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node": { + "version": "13.14.0", + "resolved": "https://registry.npmjs.org/node/-/node-13.14.0.tgz", + "integrity": "sha512-y5pClvPYkG7cTPRDmyNeCuOseyRFuZbrvQVbyAEhkfRWtfhyyu6lHYUjBSJzrSZXlbkCIlx+TKqLDAEhxc9Vkw==", + "requires": { + "node-bin-setup": "^1.0.0" + }, + "dependencies": { + "node-darwin-x64": { + "version": "13.14.0", + "resolved": "https://registry.npmjs.org/node-darwin-x64/-/node-darwin-x64-13.14.0.tgz", + "integrity": "sha512-51Dp2ZSLt4aV4hy2GvbsVOw6YXmEBE+25nTDas92OdxtdJiSWf6kVwVjlY45EVqlnT9j/b11UY4hSeQQskM8VA==" + } + } + }, + "node-bin-setup": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz", + "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q==" + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node-forge": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.8.5.tgz", + "integrity": "sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q==" + }, + "node-jose": { + "version": "git+https://github.com/cisco/node-jose.git#85610d6fdf411c72f58d15197e6f935e0b20a695", + "from": "git+https://github.com/cisco/node-jose.git", + "requires": { + "base64url": "^3.0.1", + "buffer": "^5.5.0", + "es6-promise": "^4.2.8", + "lodash": "^4.17.15", + "long": "^4.0.0", + "node-forge": "^0.8.5", + "pako": "^1.0.11", + "process": "^0.11.10", + "uuid": "^3.3.3" + }, + "dependencies": { + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "dev": true + }, + "object-is": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", + "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", + "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optional": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=", + "optional": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "optional": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "optional": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pkcs11js": { + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.21.tgz", + "integrity": "sha512-U+UUXbVqdL3q95zNqi8aGbAg6KcyVkKocKR4QicvoEEO9NVW2podLkaq5hhxLGUi+OOJSL5VBNbUE2EatbeITw==", + "optional": true, + "requires": { + "nan": "^2.14.0" + } + }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-settle": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", + "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=", + "optional": true + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "protobufjs": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "optional": true, + "requires": { + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "optional": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "optional": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "optional": true + }, + "react": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", + "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "react-popper": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz", + "integrity": "sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "create-react-context": "^0.3.0", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexp.prototype.flags": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", + "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "optional": true + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", + "optional": true + }, + "semantic-ui-react": { + "version": "0.88.2", + "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", + "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@semantic-ui-react/event-stack": "^3.1.0", + "@stardust-ui/react-component-event-listener": "~0.38.0", + "@stardust-ui/react-component-ref": "~0.38.0", + "classnames": "^2.2.6", + "keyboard-key": "^1.0.4", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-is": "^16.8.6", + "react-popper": "^1.3.4", + "shallowequal": "^1.1.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, + "sinon": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", + "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.2", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/formatio": "^5.0.1", + "@sinonjs/samsam": "^5.0.3", + "diff": "^4.0.2", + "nise": "^4.0.1", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "sjcl": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=", + "optional": true + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "optional": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimleft": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", + "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimstart": "^1.0.0" + } + }, + "string.prototype.trimright": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", + "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5", + "string.prototype.trimend": "^1.0.0" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + } + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terminal-table": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", + "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", + "dev": true, + "requires": { + "colors": "^1.0.3", + "eastasianwidth": "^0.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "optional": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "ts-lib-utils": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.6.1.tgz", + "integrity": "sha512-370VtR3BMf5urHirZ7rRaUdlMqERjz0BjK50qqNlc6QLur4yUr/rC6oq2XdbGUU86kNsg+gtHude+kzDijlFYA==", + "dev": true, + "requires": { + "glob": "7", + "tslib": "1 || 2" + } + }, + "ts-node": { + "version": "8.10.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", + "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-coverage-core": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.6.1.tgz", + "integrity": "sha512-KO3LcbWj8BVsiz2PTS0qyE/r3QBvR7NhBfrCnvp9Wm2OWQCJAVzjVuzvNri4MI848AD0xP9K0AIkLtPWflKtIQ==", + "dev": true, + "requires": { + "minimatch": "3", + "ts-lib-utils": "^2.6.1", + "tslib": "1 || 2", + "tsutils": "3" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", + "dev": true + }, + "typedoc": { + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", + "dev": true, + "requires": { + "@types/minimatch": "3.0.3", + "fs-extra": "^8.1.0", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", + "lodash": "^4.17.15", + "marked": "^0.8.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" + }, + "dependencies": { + "typescript": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", + "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", + "dev": true + } + } + }, + "typedoc-default-themes": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.8", + "underscore": "^1.9.1" + } + }, + "typescript": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", + "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", + "dev": true + }, + "typescript-coverage-report": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", + "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", + "dev": true, + "requires": { + "colors": "^1.4.0", + "commander": "^5.0.0", + "ncp": "^2.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "rimraf": "^3.0.2", + "semantic-ui-react": "^0.88.2", + "terminal-table": "^0.0.12", + "type-coverage-core": "^2.4.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + } + } + }, + "uglify-js": { + "version": "3.9.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz", + "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==", + "dev": true, + "optional": true, + "requires": { + "commander": "~2.20.3" + } + }, + "underscore": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", + "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "optional": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "optional": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "optional": true + } + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", + "optional": true + }, + "winston": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz", + "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==", + "optional": true, + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", + "optional": true + } + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "optional": true + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "optional": true, + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + }, + "dependencies": { + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "optional": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "optional": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + } + } +} diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json new file mode 100755 index 00000000..3a10b608 --- /dev/null +++ b/trustid-sdk/package.json @@ -0,0 +1,58 @@ +{ + "name": "trustid-sdk", + "version": "1.0.0", + "description": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "scripts": { + "test": "mocha --require ts-node/register dist/test/integration", + "build": "rm -rf dist && tsc", + "build-light": "rm -rf dist-light && tsc --build tsconfig-light.json", + "build-single-file": "rm -rf dist-light && tsc --build tsconfig-singleFile.json", + "start": "tsc && node ./dist/test.js", + "docs": "typedoc --out dist/docs --mode modules .", + "coverage": "tsc && istanbul cover node_modules/.bin/_mocha -- --recursive --timeout 200000 dist/test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/telefonicablockchain/trustid.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/telefonicablockchain/trustid/issues" + }, + "homepage": "https://github.com/telefonicablockchain/trustid/trustid-sdk#readme", + "dependencies": { + "@types/mongoose": "^5.7.14", + "@types/node": "^13.7.1", + "axios": "^0.19.2", + "crypto-js": "^4.0.0", + "fs": "0.0.1-security", + "jose": "^1.22.1", + "mongoose": "^5.9.10", + "node": "^13.12.0", + "node-jose": "git+https://github.com/cisco/node-jose.git", + "optional": "^0.1.4", + "path": "^0.12.7" + }, + "devDependencies": { + "@types/chai": "^4.2.11", + "@types/crypto-js": "^3.1.46", + "@types/jwk-to-pem": "^2.0.0", + "@types/mocha": "^7.0.2", + "@types/node-jose": "^1.1.3", + "@types/sinon": "^9.0.0", + "sinon": "^9.0.2", + "chai": "^4.2.0", + "mocha": "^7.1.2", + "ts-node": "^8.10.1", + "typedoc": "^0.16.10", + "typescript": "^3.8.3", + "typescript-coverage-report": "^0.1.3" + }, + "optionalDependencies": { + "fabric-ca-client": "2.1.0", + "fabric-network": "v2.1.0" + } +} diff --git a/trustid-sdk/src/keystore/fileKeystore.ts b/trustid-sdk/src/keystore/fileKeystore.ts new file mode 100644 index 00000000..ef8149ab --- /dev/null +++ b/trustid-sdk/src/keystore/fileKeystore.ts @@ -0,0 +1,120 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { Keystore } from './keystore'; +import { DID } from '../wallet' + +import fs from 'fs'; + +export class FileKeystore extends Keystore { + + readonly WALLET_SRCS = [ + "file", + "empty", + "localStorage" + ] + + /** InMemory Keystore representing all the DIDs loaded in the wallet*/ + private dir: string; + + constructor(type = "file", dir: string = './keystore/keystore') { + super(); + // Reset keystore from file if existing. + this.loadKeystore(type, dir); + this.dir = dir; + } + + + /** SaveKeystore with all the DIDs. Store status of the wallet */ + public saveKeystore(type: string="file"): void { + switch (type) { + case "file": { + fs.writeFileSync(this.dir, JSON.stringify(this.keystore), 'utf8') + break; + } + case "localStorage": { + localStorage.setItem('keystore', JSON.stringify(this.keystore)); + break; + } + default: { + throw new Error("Storage type not implemented.") + } + + } + } + + /** LoadKeystore loads the stored status of a wallet */ + public loadKeystore(source: string, dir: string = ""): void { + // If type not supported throw error. + if (!Object.values(this.WALLET_SRCS).includes(source)) { + throw new Error("Wallet source to initialize not valid!"); + } + switch (source) { + case "file": { + let auxKs + try{ + let val = fs.readFileSync(dir, 'utf8'); + auxKs = JSON.parse(val); + } catch { + auxKs = {} + } + + for (let k in auxKs) { + let emptyDID: DID = new DID("RSA", undefined); + emptyDID.loadFromObject(auxKs[k]); + auxKs[k] = emptyDID; + } + this.keystore = auxKs; + // this.keystore = JSON.parse(fs.readFileSync(dir, 'utf8')) + break; + } + case "localStorage": { + let val = localStorage.getItem('keystore'); + this.keystore = JSON.parse(val || ""); + break; + } + default: { + throw new Error("Storage type not implemented.") + } + + } + } + + /** getKey gets a key from the keystore of the wallet */ + public async getDID(id: string = "default"): Promise { + // We only get from inMemory keystore for performance purposes. + + if (!(this.keystore.hasOwnProperty(id))) { + // throw new Error("This DID does not exist in the keystore."); + return {} as DID + } + + return this.keystore[id]; + } + + /** Stores DID in the permanent keystore */ + public async storeDID(did: DID): Promise { + // Check if did already in keystore and save keystore. + // If not add DID and save keystore. + try { + if (this.keystore[did.id] == undefined) { + // Add in inmemory storage + this.keystore[did.id] = did; + } + + this.saveKeystore(); + return true; + } catch { + return false; + } + } + + + + + +} \ No newline at end of file diff --git a/trustid-sdk/src/keystore/keystore.ts b/trustid-sdk/src/keystore/keystore.ts new file mode 100755 index 00000000..26b70774 --- /dev/null +++ b/trustid-sdk/src/keystore/keystore.ts @@ -0,0 +1,37 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { DID } from "../wallet"; + +export abstract class Keystore { + /** InMemory Keystore representing all the DIDs loaded in the wallet*/ + protected keystore: { [k: string]: any }; + + constructor() { + this.keystore = {}; + } + + abstract async getDID(id: string): Promise; + abstract async storeDID(did: DID): Promise; + + // Store DID in memory + public storeInMemory(did: DID): boolean { + this.keystore[did.id] = did; + return true; + } + + /** List available keys in the keystore inmemory*/ + public listDID(): string[] { + return Object.keys(this.keystore); + } + + /** setDefault sets a DID as the default key for the wallet */ + public setDefault(did: DID): boolean { + this.keystore["default"] = did; + return true; + } +} \ No newline at end of file diff --git a/trustid-sdk/src/keystore/localStorageKeystore.ts b/trustid-sdk/src/keystore/localStorageKeystore.ts new file mode 100644 index 00000000..f142eaa2 --- /dev/null +++ b/trustid-sdk/src/keystore/localStorageKeystore.ts @@ -0,0 +1,46 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { Keystore } from './keystore'; +import { DID } from '../wallet' + +export class LocalStorageKeystore extends Keystore { + + readonly WALLET_SRCS = [ + "file", + "empty", + "localStorage" + ] + + constructor() { + super(); + } + + /** getKey gets a key from the keystore of the wallet */ + public async getDID(id: string = "default"): Promise { + let did = new DID() + const value = localStorage.getItem(id) + if (value) { + did.loadFromObject(JSON.parse(value)) + } else { + did = {} as DID + } + + return did + } + + /** Stores DID in the permanent keystore */ + public async storeDID(did: DID): Promise { + try { + localStorage.setItem(did.id, JSON.stringify(did)) + return true + } catch { + return false + } + } + +} \ No newline at end of file diff --git a/trustid-sdk/src/keystore/mongoKeystore.ts b/trustid-sdk/src/keystore/mongoKeystore.ts new file mode 100644 index 00000000..794bc8f0 --- /dev/null +++ b/trustid-sdk/src/keystore/mongoKeystore.ts @@ -0,0 +1,89 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { Keystore } from './keystore'; +import { DID } from '../wallet' +const Mongoose = require("mongoose") + +const DIDSchema = new Mongoose.Schema({ + id: String, + pubkey: String, + type: String, + controller: String, + access: Number, + privkey: String, +}) + +const DIDModel = Mongoose.model("did", DIDSchema); + +export class MongoKeystore extends Keystore { + + private database: any; + private uri: string; + + // Create connection to the keystore database. + constructor(mongoURI: string) { + super(); + this.uri = mongoURI; + this.database = null; + } + + public async init() { + await Mongoose.connect(this.uri, { + useNewUrlParser: true, + useFindAndModify: true, + useUnifiedTopology: true, + useCreateIndex: true, + }); + this.database = Mongoose.connection; + // this.database.once("open", async () => { + // console.log("Connected to database"); + // }); + // this.database.on("error", () => { + // console.log("Error connecting to database"); + // }); + } + + /** getKey gets a key from the keystore of the wallet */ + public async getDID(id: string = "default"): Promise { + // We check if DID in memory + if (!(id in this.keystore)) { + // Retrieve from database + try { + const didObj = await DIDModel.findOne({ id: id }); + let emptyDID: DID = new DID("RSA", undefined); + emptyDID.loadFromObject(didObj); + this.keystore[id] = emptyDID; + } catch { + throw new Error("DID not found in database") + } + } + + return this.keystore[id]; + } + + /** Stores DID in the permanent keystore */ + public async storeDID(did: DID): Promise { + try { + // Store DID in Mongo. Modify if it exists, create if it doesn't + const didObj = await DIDModel.findOne({ id: did.id }); + console.log(didObj) + if(!didObj){ + await DIDModel.create(did); + return true; + + } else { + throw new Error("The identity already exists in the storage"); + + } + + } catch (err){ + throw err; + } + } + +} \ No newline at end of file diff --git a/trustid-sdk/src/network/driver.ts b/trustid-sdk/src/network/driver.ts new file mode 100644 index 00000000..cd6a42e8 --- /dev/null +++ b/trustid-sdk/src/network/driver.ts @@ -0,0 +1,23 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +export abstract class Driver { + protected connection: any; + constructor() { + this.connection = {}; + } + + abstract connect(config: object): any; + abstract disconnect(config: object): void; + abstract callContractTransaction(id: string, fcn: string, args: any, channel?: string): any; + abstract getContractTransaction(id: string, fcn: string, args: any, channel?: string): any; + + /** Return connection */ + public getConnection(): any { + return this.connection; + } +} diff --git a/trustid-sdk/src/network/hfdriver.ts b/trustid-sdk/src/network/hfdriver.ts new file mode 100644 index 00000000..a78f656e --- /dev/null +++ b/trustid-sdk/src/network/hfdriver.ts @@ -0,0 +1,102 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {Driver} from "./driver"; + +const FabricCAServices = require("fabric-ca-client"); +const {Gateway, Wallets, DefaultEventHandlerStrategies} = require("fabric-network"); + +export interface HfConfig { + stateStore: string; + caURL: string; + caName: string; + caAdmin: string; + caPassword: string; + tlsOptions: any; + mspId: string; + walletID: string; + asLocalhost: boolean; + ccp: any; +} + +export class HfDriver extends Driver { + protected connection: any; + constructor() { + super(); + this.connection = {}; + } + + public async callContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined) { + try { + const network = await this.connection.getNetwork(channel); + const contract = await network.getContract(id); + const result = await contract.submitTransaction(fcn, ...args); + return result.toString(); + } catch (err) { + + if(err.responses){ + throw new Error(err.responses[0].response.message); + } else{ + throw err; + } + + + } + } + + public async getContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined) { + try { + const network = await this.connection.getNetwork(channel); + const contract = await network.getContract(id); + const result = await contract.evaluateTransaction(fcn, ...args); + return result.toString(); + } catch (err) { + throw err; + } + } + + public async connect(config: HfConfig): Promise { + try { + this.connection = new Gateway(); + const wallet = await Wallets.newFileSystemWallet(config.stateStore); + const caService = new FabricCAServices(config.caURL, config.tlsOptions, config.caName); + const req = { + enrollmentID: config.caAdmin, + enrollmentSecret: config.caPassword, + }; + const enrollment = await caService.enroll(req); + + const identity = { + credentials: { + certificate: enrollment.certificate, + privateKey: enrollment.key.toBytes(), + }, + mspId: config.mspId, + type: "X.509", + }; + await wallet.put(config.walletID, identity); + await this.connection.connect(config.ccp, { + wallet: wallet, + identity: config.walletID, + discovery: { + enabled: true, + asLocalhost: config.asLocalhost, + }, + eventHandlerOptions: { + strategy: DefaultEventHandlerStrategies.NETWORK_SCOPE_ANYFORTX, + }, + }); + + return this.connection; + } catch (err) { + throw err; + } + } + public async disconnect() { + this.connection.disconnect(); + } +} diff --git a/trustid-sdk/src/network/trustHF.ts b/trustid-sdk/src/network/trustHF.ts new file mode 100755 index 00000000..93d63e9c --- /dev/null +++ b/trustid-sdk/src/network/trustHF.ts @@ -0,0 +1,273 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {TrustID, Access} from "./trustInterface"; +import {HfDriver, HfConfig} from "./hfdriver"; +import {DID} from "../wallet"; + +export interface Config { + fcn: string; + channel: string; + chaincodeName: string; + stateStore: string; + caURL: string; + caName: string; + caAdmin: string; + caPassword: string; + tlsOptions: any; + mspId: string; + walletID: string; + asLocalhost: boolean; + ccp: any; +} + +export class TrustIdHf extends TrustID { + public config: Config; + public driver: HfDriver; + + constructor(config: Config) { + super(); + this.config = config; + this.driver = new HfDriver(); + } + + async configureDriver(): Promise { + const cfg = { + stateStore: this.config.stateStore, + caURL: this.config.caURL, + caName: this.config.caName, + caAdmin: this.config.caAdmin, + caPassword: this.config.caPassword, + tlsOptions: this.config.tlsOptions, + mspId: this.config.mspId, + walletID: this.config.walletID, + asLocalhost: this.config.asLocalhost, + ccp: this.config.ccp, + }; + + await this.driver.connect(cfg); + } + async disconnectDriver(): Promise { + await this.driver.disconnect(); + } + /** createIdentity registers a new unverified identity */ + public async createIdentity(did: DID): Promise { + const args = [ + JSON.stringify({ + publicKey: did.pubkey, + payload: await did.sign({ + function: "createSelfIdentity", + params: { + did: did.id, + publicKey: did.pubkey, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** VerifyIdentity allow admins to verify user identityes */ + public async verifyIdentity(adminDID: DID, id: string): Promise { + const args = [ + JSON.stringify({ + did: adminDID.id, + payload: await adminDID.sign({ + function: "verifyIdentity", + params: { + did: id, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + + return res; + } + + /** Revoke allow admins to revoke user identityes */ + public async revokeIdentity(adminDID: DID, id: string): Promise { + const args = [ + JSON.stringify({ + did: adminDID.id, + payload: await adminDID.sign({ + function: "revokeIdentity", + params: { + did: id, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + + return res; + } + + /** GetIdentity gets a new identity */ + public async getIdentity(did: DID, id: string): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "getIdentity", + params: { + did: id, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** Registers new service in the platform */ + public async createService(did: DID, serviceDID: string, name: string, isPublic: boolean = true): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "createServiceIdentity", + params: { + did: serviceDID, + name: name, + isPublic: isPublic, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** Updates accesses for a service */ + public async updateService( + did: DID, + serviceDID: string, + access: Access, + isPublic: boolean = true + ): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "updateServiceAccess", + params: { + did: serviceDID, + access: access, + isPublic: isPublic, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** Gets information from a service */ + public async getService(did: DID, serviceDID: string): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "getServiceIdentity", + params: { + did: serviceDID, + }, + }), + }), + ]; + + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** Invokes a chaincode through the proxy */ + public async invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise { + const argsCall = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "invoke", + params: { + did: serviceDID, + args: args, + channel: channel, + }, + }), + }), + ]; + + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + argsCall, + this.config.channel + ); + return res; + } + + /** Invokes a chaincode through the proxy */ + public async query(did: DID, serviceDID: string, args: string[], channel: string): Promise { + const argsCall = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "invoke", + params: { + did: serviceDID, + args: args, + channel: channel, + }, + }), + }), + ]; + + let res: any = await this.driver.getContractTransaction( + this.config.chaincodeName, + this.config.fcn, + argsCall, + this.config.channel + ); + return res; + } +} diff --git a/trustid-sdk/src/network/trustInterface.ts b/trustid-sdk/src/network/trustInterface.ts new file mode 100755 index 00000000..c1f438d5 --- /dev/null +++ b/trustid-sdk/src/network/trustInterface.ts @@ -0,0 +1,31 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { DID } from "../wallet"; + +export abstract class TrustID { + + abstract configureDriver(): Promise; + abstract disconnectDriver(): Promise; + + abstract createIdentity(did: DID): Promise; + abstract verifyIdentity(adminDID: DID, id:string): Promise; + abstract getIdentity(did: DID, id: string): Promise; + abstract revokeIdentity(adminDID: DID, id: string): Promise; + abstract createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise; + abstract updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise; + abstract getService(did: DID, serviceDID: string): Promise; + abstract invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise; + abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; + + +} + +export interface Access { + did: string, + type: number, +} diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts new file mode 100755 index 00000000..968d1133 --- /dev/null +++ b/trustid-sdk/src/wallet.ts @@ -0,0 +1,208 @@ + +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { JWK, JWS } from "node-jose"; +import { TrustID } from "./network/trustInterface"; + +import crypto from 'crypto-js'; + +import { Keystore } from "./keystore/keystore"; +import { FileKeystore } from "./keystore/fileKeystore"; + +export class DID { + public id: string; + public pubkey: string; + public type: string; + public controller: string; + public access: number; + private privkey: string; + private unlockedKey: any; + + // TODO: Default parameters for now: + // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. + readonly ALGO_TYPES = ["RSA", "EC", "oct"]; + + public constructor( + type: any = "RSA", + controller: string = "default" + ) { + // If type not supported throw error. + if (!Object.values(this.ALGO_TYPES).includes(type)) { + throw new Error("Key algorithm not supported"); + } + + this.id = "" + this.type = type; + this.controller = controller; + this.access = 0; + this.privkey = ""; + this.pubkey = ""; + this.unlockedKey = null; + + } + + // TODO: Can we do this more efficiently? + private async keyGeneration(): Promise { + switch (this.type) { + case "RSA": + return JWK.createKey("RSA", 2048, { alg: "" }); + case "EC": + return JWK.createKey("EC", "P-521", { alg: "" }); + case "oct": + return JWK.createKey("oct", 256, { alg: "" }); + default: + throw new Error("Key algorithm not supported"); + } + } + + public async createKey(passphrase: string = "") { + // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { + let key = await this.keyGeneration(); + let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); + this.id = `did:vtn:trustid:${addr}`; + this.pubkey = key.toPEM(); + let pk = key.toPEM(true) + this.privkey = crypto.AES.encrypt(pk, passphrase).toString(); + } + } + + public async unlockAccount(passphrase: string = ""): Promise { + try { + const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8) + this.unlockedKey = await JWK.asKey( + pem, + "pem" + ); + } catch { + throw new Error("Private key couldn't be deciphered") + } + + } + + public lockAccount(): any { + this.unlockedKey = undefined; + } + + public loadFromObject(obj: any): void { + let { id, type, controller, access, pubkey, privkey } = obj; + this.id = id; + this.type = type; + this.controller = controller; + this.access = access; + this.pubkey = pubkey; + this.privkey = privkey; + } + + public exportDID(withPrivate: boolean) { + const privkey = withPrivate ? this.privkey : "" + return { + id: this.id, + type: this.type, + pubkey: this.pubkey, + privkey: privkey, + controller: this.controller + } + } + + + /** sign Generates a JWS from a payload using an id from the wallet */ + public async sign(payload: object): Promise { + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + + var buf = Buffer.from(JSON.stringify(payload)); + + let sign = await JWS.createSign( + { + fields: { cty: 'jwk+json' }, + format: 'compact' + }, + this.unlockedKey) + .update(buf) + .final(); + + return sign.toString(); + } + + /** verify Verifies a JWS from a payload using a did */ + public async verify(signature: string, did: DID): Promise { + let pk = await JWK.asKey(did.pubkey, 'pem') + let verify = await JWS.createVerify(pk).verify(signature); + return JSON.parse(verify.payload.toString()); + } +} + +/** Class representing Wallets + * It follows a Singleton pattern. + */ +export class Wallet { + /** Instance for the wallet */ + private static _instance: Wallet; + // /** Keystore representing all the DIDs loaded in the wallet*/ + private keystore: Keystore; + + /** Drivers to connected blockchains */ + public networks: { [k: string]: TrustID }; + /** Constructor for the wallet */ + private constructor() { + this.keystore = new FileKeystore(); + this.networks = {}; + } + + public static get Instance() { + return this._instance || (this._instance = new this()); + } + + // Functions from specific keystore that will be overloaded + // in wallet + public async getDID(id: string): Promise { + return this.keystore.getDID(id); + } + public async storeDID(did: DID): Promise { + return this.keystore.storeDID(did); + } + public listDID(): string[] { + return this.keystore.listDID(); + } + public setDefault(did: DID): boolean { + return this.keystore.setDefault(did); + } + public storeInMemory(did: DID): boolean { + return this.keystore.storeInMemory(did); + } + + /** Set the Keystore to use in the wallet. */ + public setKeystore(keystore: Keystore): void { + this.keystore = keystore; + } + + /** Set the Keystore to use in the wallet. */ + public addNetwork(id: string, network: TrustID): void { + this.networks[id] = network; + } + + /** generateDID generates a new DID in the wallet */ + public async generateDID(type: string, controller: string = "default", passphrase: string = ""): Promise { + const value: DID = new DID(type, controller); + await value.createKey(passphrase); + await this.keystore.storeDID(value); + + // If it is the first key assign key as default. + // if (Object.keys(await this.keystore.getDID("default")).length === 0) { + // this.keystore.setDefault(value); + // } + + if (Object.keys(await this.keystore.getDID(value.id)).length === 0) { + this.keystore.storeInMemory(value); + } + + return value; + } +} diff --git a/trustid-sdk/test/fileKeystore.spec.ts b/trustid-sdk/test/fileKeystore.spec.ts new file mode 100644 index 00000000..75bab59c --- /dev/null +++ b/trustid-sdk/test/fileKeystore.spec.ts @@ -0,0 +1,42 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {expect} from "chai"; +import {Wallet} from "../src/wallet"; +import {FileKeystore} from "../src/keystore/fileKeystore"; + +import "mocha"; + +const wal = Wallet.Instance; +// const ksfile = './keystore/keystore'+Date.now() +const ksfile = "./keystore"; +const ks = new FileKeystore("file", ksfile); +wal.setKeystore(ks); + +describe("Keystore tests", async () => { + const did = await wal.generateDID("RSA", "default", "secret"); + + let hfChaincodeServiceStub, jwtHelperStubC; + + it("Creates FileKeystore", () => { + expect(ks).to.not.equal({}); + }); + + // TODO: Fixed this test + // it("Get DID", () => { + // expect(ks.getDID(did.id)).to.eql(did); + // }); + + it("Store and load keystore", () => { + let ksfile2 = "./keystore"; + const did2 = wal.generateDID("RSA"); + ks.saveKeystore(); + const ks2 = new FileKeystore("file", ksfile); + ks2.loadKeystore("file", ksfile); + // expect(ks.getDID(did2.id)).to.eql(did2) + }); +}); diff --git a/trustid-sdk/test/hfdiver.spec.ts b/trustid-sdk/test/hfdiver.spec.ts new file mode 100644 index 00000000..d80df04a --- /dev/null +++ b/trustid-sdk/test/hfdiver.spec.ts @@ -0,0 +1,392 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { HfDriver } from "../src/network/hfdriver"; + + +/* global describe, it, before, after */ +const {expect} = require("chai"); +const sinon = require("sinon"); +const FabricCAServices = require("fabric-ca-client"); +const {Wallets, Gateway} = require("fabric-network"); + +describe("HF Driver - Test", () => { + before(() => {}); + describe("Connect ", () => { + let gatewayStub: any; + let walletStub: any; + + let fabricCAServicesStub: any; + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub.onSecondCall().rejects(new Error("Error connecting")); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + + fabricCAServicesStub.restore(); + done(); + }); + + it("Connect Success", async() => { + try{ + const hfdriver = new HfDriver() + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + + await hfdriver.connect(config) + sinon.assert.calledOnce(gatewayStub) + sinon.assert.calledOnce(walletStub) + sinon.assert.calledOnce(fabricCAServicesStub) + + + + } catch(err){ + console.log(err) + } + + }); + it("Connect Fail", async() => { + try{ + const hfdriver = new HfDriver() + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + + await hfdriver.connect(config) + + + } catch(err){ + expect(err.message).to.equal('Error connecting'); + } + + }); + + }); + describe("Disconnect ", () => { + let gatewayStub2: any; + + + let gatewayStub: any; + let walletStub: any; + + let fabricCAServicesStub: any; + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + gatewayStub2 = sinon.stub(Gateway.prototype, "disconnect").resolves(); + gatewayStub2.onSecondCall().throws(new Error("Error disconnecting")); + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("Disconnect Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.disconnect() + + + } catch(err){ + console.log(err) + } + + }); + it("Disconnect Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.disconnect() + + } catch(err){ + expect(err.message).to.equal('Error disconnecting'); + } + + }); + + }); + describe("Call contract transaction ", () => { + + let gatewayStub: any; + let walletStub: any; + let gatewayStub2: any; + + let fabricCAServicesStub: any; + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + let contract = { + submitTransaction(){ + return new Promise((resolve) => { + resolve("OK"); + }) + } + } + let network= { + getContract(){ + return new Promise((resolve) => { + resolve(contract) + }) + } + + } + + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("Call Contract Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); + expect(res).to.equal("OK") + } catch(err){ + } + + }); + it("Disconnect Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.callContractTransaction("name", "invoke", ["a"]); + + } catch(err){ + expect(err.message).to.equal('Network not exists'); + } + + }); + + }); + describe("Get contract transaction ", () => { + + let gatewayStub: any; + let walletStub: any; + let gatewayStub2: any; + + let fabricCAServicesStub: any; + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + let contract = { + evaluateTransaction(){ + return new Promise((resolve) => { + resolve("OK"); + }) + } + } + let network= { + getContract(){ + return new Promise((resolve) => { + resolve(contract) + }) + } + + } + + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("get Contract Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); + expect(res).to.equal("OK") + } catch(err){ + } + + }); + it("Get contract Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.getContractTransaction("name", "invoke", ["a"]); + + } catch(err){ + expect(err.message).to.equal('Network not exists'); + } + + }); + + }); +}); diff --git a/trustid-sdk/test/trustHF.spec.ts b/trustid-sdk/test/trustHF.spec.ts new file mode 100644 index 00000000..27b80367 --- /dev/null +++ b/trustid-sdk/test/trustHF.spec.ts @@ -0,0 +1,430 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {HfDriver} from "../src/network/hfdriver"; +import {TrustIdHf} from "../src/network/trustHF"; +import {DID} from "../src/wallet"; +import {Wallet} from "../src/wallet"; + +/* global describe, it, before, after */ +const {expect} = require("chai"); +const sinon = require("sinon"); + +describe("TrustHF - Test", async() => { + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: "", + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + const wal = Wallet.Instance; + let identity = await wal.generateDID("RSA", "default", "secret"); + + await identity.unlockAccount("secret"); + before(() => {}); + describe("Configure Driver ", () => { + let driverStub: any; + + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "connect").resolves(); + driverStub.onSecondCall().rejects(new Error("Error connecting")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Configure Success", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.configureDriver(); + sinon.assert.calledOnce(driverStub); + } catch (err) { + console.log(err); + } + }); + it("Configure Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.configureDriver(); + } catch (err) { + expect(err.message).to.equal("Error connecting"); + sinon.assert.calledTwice(driverStub); + } + }); + }); + describe("Disconnect Driver ", () => { + let driverStub: any; + + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "disconnect").resolves(); + driverStub.onSecondCall().rejects(new Error("Error disconnect")); + + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Configure Success", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.disconnectDriver(); + sinon.assert.calledOnce(driverStub); + } catch (err) { + console.log(err); + } + }); + it("Configure Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.disconnectDriver(); + } catch (err) { + expect(err.message).to.equal("Error disconnect"); + sinon.assert.calledTwice(driverStub); + } + }); + }); + + describe("Create identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Create Identity", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.createIdentity(identity); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Connect Fail", async () => { + try { + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Create identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Create Identity", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.createIdentity(identity); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Create Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.createIdentity(identity); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Verify identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Verify IdentitY", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.verifyIdentity(identity, "id"); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Verify Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.verifyIdentity(identity, "id"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Revoke identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Revoke IdentitY Success", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.revokeIdentity(identity, "id"); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Revoke Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.revokeIdentity(identity, "id"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Get identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("This is identity"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Get IdentitY Success", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.getIdentity(identity, "id"); + expect(result).to.equal("This is identity"); + } catch (err) { + console.log(err); + } + }); + it("Get identity Fail", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.getIdentity(identity, "id"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Create Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Create Service Success", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.createService(identity, "id", "name"); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Create Service Fail", async () => { + try { + const trustID = new TrustIdHf(config); + const result = await trustID.createService(identity, "id", "name"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Update Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + let access = { + type: 1, + did: "ksjdskjd" + } + + it("Update Service Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.updateService(identity, "id", access); + expect(result).to.equal("OK"); + } catch (err) { + console.log(err); + } + }); + it("Update Service Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.updateService(identity, "id", access); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Get Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("Service1"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + let access = { + type: 1, + did: "ksjdskjd" + } + + it("Get Service Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.getService(identity, "id"); + expect(result).to.equal("Service1"); + } catch (err) { + console.log(err); + } + }); + it("Get Service Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.getService(identity, "id"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Invoke Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Invoke Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.invoke(identity, "id", ["a"], "channel1"); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Invoke Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.invoke(identity, "id", ["a"], "channel1"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + describe("Query Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "getContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Query Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.query(identity, "id", ["a"], "channel1"); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Query Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.query(identity, "id", ["a"], "channel1"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + }); diff --git a/trustid-sdk/test/wallet.spec.ts b/trustid-sdk/test/wallet.spec.ts new file mode 100644 index 00000000..eb3a3538 --- /dev/null +++ b/trustid-sdk/test/wallet.spec.ts @@ -0,0 +1,95 @@ + +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { expect } from 'chai'; +import { Wallet } from '../src/wallet'; +import { FileKeystore } from '../src/keystore/fileKeystore'; + +import 'mocha'; + +const wal = Wallet.Instance; +//const hfdriver = wal.drivers.hf +const ks = new FileKeystore('file'); +wal.setKeystore(ks) + +describe('Wallet tests', () => { + + it('creates new wallet', () => { + expect(wal).to.not.equal({}); + }); + + it('Creates FileKeystore for integration in wallet', () => { + expect(ks).to.not.equal({}); + }); + + + it('wallet not initialized twice', () => { + const wal2 = Wallet.Instance; + expect(wal).to.equal(wal2); + }); + + it('generate RSA DID', async () => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + const did2 = await wal.generateDID('RSA', 'default', 'secret'); + expect([did.type, did.controller]).to.eql(['RSA', 'default']); + expect(await wal.getDID(did.id)).to.eql(did); + expect(await wal.getDID(did.id)).to.not.eql(did2); + }); + + it('DID operations', async () => { + const did = await wal.generateDID('EC', 'default', 'secret'); + const did2 = await wal.generateDID('EC', 'default', 'secret'); + + const payload = {my: "payload"} + try { + await wal.generateDID('ed213', 'default', 'secret') + } catch(err) { + expect(err).to.be.an('error'); + } + + try { + await did.unlockAccount('wrong') + } catch(err) { + expect(err).to.be.an('error'); + } + + try { + await did.sign(payload) + } catch(err) { + expect(err).to.be.an('error'); + } + + await did2.unlockAccount('secret'); + await did.unlockAccount('secret'); + + + const signed = await did2.sign(payload); + const verified = await did.verify(signed, did2); + + expect(verified).to.eql(payload); + + // Wrong verification + try { + await did.verify(signed, did); + } catch(err) { + expect(err).to.be.an('error'); + } + + did.lockAccount() + + try { + await did.sign(payload) + } catch(err) { + expect(err).to.be.an('error'); + } + + }); + + +}); + diff --git a/trustid-sdk/tsconfig-light.json b/trustid-sdk/tsconfig-light.json new file mode 100755 index 00000000..25f4f71f --- /dev/null +++ b/trustid-sdk/tsconfig-light.json @@ -0,0 +1,76 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +{ + "compilerOptions": { + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": ["es5", "es6", "dom"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./dist-light/build.js", /* Concatenate and emit output to single file. */ + "outDir": "./dist-light", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + "allowJs": true, + + }, + "exclude": ["./src/network/hfdriver.ts", "./src/network/trustHF.ts", "dist/*", "index.ts"], +} diff --git a/trustid-sdk/tsconfig-singleFile.json b/trustid-sdk/tsconfig-singleFile.json new file mode 100755 index 00000000..01395dfe --- /dev/null +++ b/trustid-sdk/tsconfig-singleFile.json @@ -0,0 +1,76 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +{ + "compilerOptions": { + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + "lib": ["es5", "es6", "dom"], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + "outFile": "./dist-light/build.js", /* Concatenate and emit output to single file. */ + "outDir": "./dist-light", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + "allowJs": true, + + }, + "exclude": ["./src/network/hfdriver.ts", "./src/network/trustHF.ts", "dist/*", "index.ts"], +} diff --git a/trustid-sdk/tsconfig.json b/trustid-sdk/tsconfig.json new file mode 100755 index 00000000..ca203d0f --- /dev/null +++ b/trustid-sdk/tsconfig.json @@ -0,0 +1,75 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/{ + "compilerOptions": { + /* Basic Options */ + // "incremental": true, /* Enable incremental compilation */ + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./dist", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "composite": true, /* Enable project compilation */ + // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + + /* Advanced Options */ + "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ + "allowJs": true, + + }, + "exclude": ["dist-light/*", "index-light.ts"], +} \ No newline at end of file From 9ac2b4372e5cc0e7bdc9572337d4569e77fa6bd2 Mon Sep 17 00:00:00 2001 From: Maritere Nieto Date: Mon, 8 Jun 2020 15:30:08 +0200 Subject: [PATCH 02/25] added chaincode to repo Signed-off-by: Maria Teresa Nieto --- README.md | 6 +- fabric-chaincode/README.md | 260 +++++++++++ fabric-chaincode/chaincode.gateway.go | 70 +++ fabric-chaincode/chaincode_test.go | 213 +++++++++ fabric-chaincode/go.mod | 21 + fabric-chaincode/go.sum | 648 ++++++++++++++++++++++++++ fabric-chaincode/id.gateway.go | 119 +++++ fabric-chaincode/id.registry.go | 115 +++++ fabric-chaincode/jose.utils.go | 71 +++ fabric-chaincode/log/logger.go | 110 +++++ fabric-chaincode/main.go | 65 +++ fabric-chaincode/model.go | 76 +++ fabric-chaincode/proxy.gateway.go | 92 ++++ fabric-chaincode/service.gateway.go | 76 +++ fabric-chaincode/service.registry.go | 98 ++++ 15 files changed, 2039 insertions(+), 1 deletion(-) create mode 100644 fabric-chaincode/README.md create mode 100644 fabric-chaincode/chaincode.gateway.go create mode 100644 fabric-chaincode/chaincode_test.go create mode 100644 fabric-chaincode/go.mod create mode 100644 fabric-chaincode/go.sum create mode 100644 fabric-chaincode/id.gateway.go create mode 100644 fabric-chaincode/id.registry.go create mode 100644 fabric-chaincode/jose.utils.go create mode 100644 fabric-chaincode/log/logger.go create mode 100644 fabric-chaincode/main.go create mode 100644 fabric-chaincode/model.go create mode 100644 fabric-chaincode/proxy.gateway.go create mode 100644 fabric-chaincode/service.gateway.go create mode 100644 fabric-chaincode/service.registry.go diff --git a/README.md b/README.md index ad3086b1..e4d8d60f 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# trustid \ No newline at end of file +# TrustID +This repo include two components: +- [Trustid-sdk](trustid-sdk/README.md): SDK based in javascript to interact with the trustId solution. +- [Fabric-chaincode](fabric-chaincode/README.md): Chaincode based in Hyperledger Fabric that implements trustId.(trustid-sdk/README.md) + diff --git a/fabric-chaincode/README.md b/fabric-chaincode/README.md new file mode 100644 index 00000000..6ea6b4ca --- /dev/null +++ b/fabric-chaincode/README.md @@ -0,0 +1,260 @@ +# IDENTITY CHAINCODE (coren-identitycc) + +A chaincode or smart contract, with all the functionalities allowing developers to create, manage, and export digital assets on the Hyperledger Fabric network + +## Identity + +There are two types of identities. Identities for individuals and identities for services. + +Identity for individual is represented with the following structure: + +- `DID` : `` Unique decentralized identifier of the identity. It's stored as the key in the KV storage +- `PublicKey` : `` Public Key in x509 format +- `Controller` : `` Issuer of the identity represented with its own DID +- `Access` : `` Type of permission in order to create other identities. 0 is super admin, 1 can create identities, 2 cannot create idenitites + + +Identity for services is represented with the following structure: + +- `DID` : `` Unique decentralized identifier of the service. It's stored as the key in the KV storage +- `Name` : `` Name of the chaincode deployed in the network +- `Public` : `` Determines if the chaincode is public for all users or only for users that has access +- `Access` : `` Mapp of users that have access to the service +- `Controller` : `` DID of the controller of the service + + + + +## Chaincode internal functionalities + +### Init +Initializes the chaincode with the first controller identity that will be the issuer of identities. This identity is created with the following args: + +```js +{ + did: "did:vtn:trustos:telefonica:0", + controller: "did:vtn:trustos:telefonica:0", + publicKey: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7NBDzVMESXU/yuARe7YU\nGrkgNMZh5eA5w3PgxgYZf/isDLPHvmSM2Q9cTauDroriGInikQxtZ/CI4+9Qi4Rd\nJCHjeWhzw0hTIXhHoohyo9QTbUVetb4RBDJEcNqFrpztAojn8Ib5EF2soBFtBLyT\nguxlizcWwTZvv+KxHGBg/tUE7JIqw3YzmEK31faR2HhkPPqxTQ9F+h4SOnY9e6Cf\nh75PpjouzarpntSVkAqv/Ot5kV3O4TcWhB0vUr/HZwx2iX+LEyYock8Sx4Op20/g\n7k3J3rYhMGTHfkKMhZjX9QoZ8uBRiSxieAaia0yZSIcycgE6Aqu6KT+WaQn4bCnh\nwQIDAQAB\n-----END PUBLIC KEY-----" +} + +``` + +--- + +### Invoke + +All invokes are called via the proxy function. The proxy function args are: + +- `DID` : `` DID of the identity that is calling any function in the chaincode +- `Payload` : `` Arguments signed with its private key + +```js +{ + did: "did:vtn:trustos:telefonica:0", + payload: "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlbGZJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToyIiwicHVibGljS2V5IjoiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdTA0ZTlWTE5uMUpIZ1lOSU1SclVcblE0SkhoSG4wd1p4UENEOWtjUHo2M1NNQmlZbkN0Uk0yNHBLODZnQWFUdU00RDhWMkxqckE2ZHZCV3dCT2YydUZcbi80aXJJUlhNT2FJNTh1dFhFQ3NBMHI2Q3cyU3BDWVNWOEJLMXk4aHBuc3cwMi9UMHhZUkRiRnFmaHZxYQ", + +} + +``` + +The payload is signed in jws format. The content of the payload has the following form: + +- `Function` : `` Name of the internal function of the chaincode +- `Params` : `` Specific params of the function. This params will be specified in the different functions listed below. + +```js +{ + function: "createSelfIdentity", + params: { + did: "did:vtn:trustos:telefonica:2", + publicKey: publick.toString() + + } +} + +``` + + +- **`createSelfIdentity()`**
+Creates an identity without a controller's verification. In this case, instead of sending DID in the args, it's necessary to send the publicKey to check the signature. This is because this identities isn't in the ledger yet. + +```js +{ + publicKey:"{{publicKey}}", + payload:"{{payload}}" +} + +``` + +The params in the payload has the following form: + +```js +{ + did: "did:vtn:trustos:telefonica:2", + publicKey: publick.toString() +} + +``` + + +- **`getIdentity()`**
+Gets an identity using the DID.The params to sign in the payload are: +```js +{ + did: "did:vtn:trustos:telefonica:2", +} + +``` + +- **`verifyIdentity()`**
+The controller verifies the identity. The params in the signed payload are +```js +{ + did: "did:vtn:trustos:telefonica:2", +} + +``` + +- **`revokeIdentity()`**
+Revokes an identity. THhe params in the signed payload are: +```js +{ + did: "did:vtn:trustos:telefonica:2", +} + +``` + +- **`createServiceIdentity()`**
+Creates a service identity. +```js +{ + did: "vtn:trustos:service:1", + name: "chaincode_example02", + isPublic: true +} +``` + +- **`updateServiceAccess()`**
+Update the access for a users DID. +```js +{ + did: "vtn:trustos:service:1", + access: { + did: "did:vtn:trustos:telefonica:1", + type: 2 + + }, + isPublic: true +} +``` + +- **`getServiceIdentity()`**
+Gets the information for a service, searching by DID. +```js +{ + did: "vtn:trustos:service:1" +} +``` + +- **`invoke()`**
+Invokes a chaincode deployed as a service in the vtn platform. Args are the function of the chaincode to call and it's args. +```js +{ + did: "vtn:trustos:service:1", + args: ["invoke", "a", "b", "1"], + channel: "telefonicachannel" +} +``` + + +
+ Errors management (Click to expand)
+ + Track chaincode errors are managed through the following nomenclature **CC-XX** which corresponds to:
+ + + | Code | Description | +|:-----: |----------------------------------------------------------------------- | +| CC-01 | Error parsing any data structure | +| CC-02 | Wrong number of function arguments | +| CC-03 | Error managing data in Hyperledger Fabric | +| CC-04 | Error invoking trust chaincode or error of some kind of functionality | + + +
+ +## Architecture of the chaincode +``` +coren-trackscc +├── src + └── chaincode + ├── go files with the logic and tests +├── postman + ├── collection.json // postman collection + └── environment.json // postman environment +└── README.md + ``` + +## Project configuration +This project has to be stored in the following route +``` +$GOPATH/src/name_of_the_project +``` + +## Build vendor for chaincode +Building a vendor is necessary to import all the external dependencies needed for the basic functionality of the chaincode into a local vendor directory + +If the chaincode does not run because of the vendor, it can be built from scratch: + +``` +cd $GOPATH/src/name_of_the_project/src/chaincode +dep init +``` + +Also if it already exists, the missing packages can be imported using the update option: +``` +cd $GOPATH/src/name_of_the_project/src/chaincode +dep ensure -v +``` + +## Init the chaincode +To initialize the chaincode first is necessary to install and instantiate the chaincode on one peer of the HF network. For that action, it can be used the coren-hfservice module, abstracting the complexity of using the command-line interface + + +## Testing the chaincode +In postman folder there are the collection and environment to interact and test with the chaincode methods. It is only needed to import them into postman application and know to use the coren-hfservice module + +You can also run the unit test executing the following commmand: + +```` +go test +```` + + + + + diff --git a/fabric-chaincode/chaincode.gateway.go b/fabric-chaincode/chaincode.gateway.go new file mode 100644 index 00000000..40e892ec --- /dev/null +++ b/fabric-chaincode/chaincode.gateway.go @@ -0,0 +1,70 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "errors" + "fmt" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +var proxyGateway = "ProxyGateway" + +func toChaincodeArgs(args ...string) [][]byte { + ccArgs := make([][]byte, len(args)) + for i, a := range args { + ccArgs[i] = []byte(a) + } + return ccArgs +} + +func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { + log.Infof("[%s][invoke] Invoke chaincode", proxyGateway) + + interact := make(map[string]interface{}) + interact = args.(map[string]interface{}) + + log.Debugf("[%s][invoke] Check access to interact for did: %s and service: %s", proxyGateway, did, interact["did"].(string)) + service, err := cc.getServiceRegistry(stub, did) + ccName := service.Name + checkAccess := service.Access[interact["did"].(string)] + channel := service.Channel + + log.Debugf("[%s][invoke] Access for did: %s and service: %d", proxyGateway, interact["did"].(string), checkAccess) + if err != nil { + log.Errorf("[%s][invoke]*** Error calling service, problem getting service", err.Error()) + return "", err + } + if checkAccess < 4 { + log.Debugf("[%s][invoke] Did: %s has access to service %s, invoking cc", proxyGateway, did, interact["did"].(string)) + log.Debugf("[%s][invoke] Interact for chaincode %s args are %v", proxyGateway, ccName, interact["args"]) + s := make([]string, len(interact["args"].([]interface{}))) + for i, v := range interact["args"].([]interface{}) { + s[i] = fmt.Sprint(v) + } + s = append(s, did) + argBytes := toChaincodeArgs(s...) + response := stub.InvokeChaincode(ccName, argBytes, channel) + if response.Status != shim.OK { + fmt.Printf("%v%", string(response.Payload)) + log.Debugf("[%s][invoke] Error invoking chaincode %s", proxyGateway, string(response.Payload)) + return "", errors.New(string(response.Payload)) + } + log.Debugf("[%s][invoke] Invoke OK, returning result", proxyGateway) + log.Infof("%v", response.Payload) + + return string(response.Payload), nil + } + + log.Errorf("[%s][invoke] User %s has not access to this resources", proxyGateway, did) + err = errors.New("User has not access") + return "", err + +} diff --git a/fabric-chaincode/chaincode_test.go b/fabric-chaincode/chaincode_test.go new file mode 100644 index 00000000..0d373a92 --- /dev/null +++ b/fabric-chaincode/chaincode_test.go @@ -0,0 +1,213 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ + +package main + +import ( + "encoding/json" + "fmt" + "testing" + + "github.com/hyperledger/fabric-chaincode-go/shim" + testcc "github.com/hyperledger/fabric-chaincode-go/shimtest" + + //testcc "github.com/s7techlab/cckit/testing" + "github.com/stretchr/testify/assert" +) + +func TestIdenity(t *testing.T) { + stub := InitChaincode(t) + + t.Run("CreateUnverifiedIdentity", func(t *testing.T) { + signedPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlbGZJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToyIiwicHVibGljS2V5IjoiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdTA0ZTlWTE5uMUpIZ1lOSU1SclVcblE0SkhoSG4wd1p4UENEOWtjUHo2M1NNQmlZbkN0Uk0yNHBLODZnQWFUdU00RDhWMkxqckE2ZHZCV3dCT2YydUZcbi80aXJJUlhNT2FJNTh1dFhFQ3NBMHI2Q3cyU3BDWVNWOEJLMXk4aHBuc3cwMi9UMHhZUkRiRnFmaHZxY3NCSjJcbjRMSTZGNHRDb2JQb2VnRXBiQ1RXb0xNdU1FVDNXWkZMeW1ZU2lHNDJObWJjWjBLVEdrd1R6aUx5bEwyMm41d0FcblpUbGZ1dnVCUURSYksvUzlmTld6WGpvbWhKbXFzeVFtbzJZQVIwRkExYVhuN1BlcW8vMHRDZnRKazhKaldvemRcblBnM25UZUdlbDVmeE51VjdybWxOMjZ4QlU2cDB4TmcxMnR6KzRnZ3JFZXE5OWR6Z2tmUCtLUXBZbHpaVkJMTmRcbm1RSURBUUFCXG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiJ9fQ.Wylf4lFaJLLiTrs9IMrvs2-mD_4HiO1C6kq_FJRzeJJgWpoOCSZ-PeD5HbVkuc3H4lbGdbSbvmwF28NzjXVKhjT__x0eYSK4VEEMbFeZx7h3aOU985heKolzi9OGW3n9x-e0HuLiG8uI-nOovsU81d74TmMmlc-iTmsr8WWE8syMDDMuvQcXi7T8I3uxNsqXVKboHPB5eW-NfA1EfrooP2qb6E2doAqTdLf3UI8W1f3lsGebTK8ObLenq8MW--dzeA54xSyEFrwV6dVS_R8w4PqZQ-5ULUw-x20VcY9ZhGNknJnmhExl6kFn0ruDMHkadIsRslp6xShx4mQFOZEouQ" + publicKey := "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu04e9VLNn1JHgYNIMRrU\nQ4JHhHn0wZxPCD9kcPz63SMBiYnCtRM24pK86gAaTuM4D8V2LjrA6dvBWwBOf2uF\n/4irIRXMOaI58utXECsA0r6Cw2SpCYSV8BK1y8hpnsw02/T0xYRDbFqfhvqcsBJ2\n4LI6F4tCobPoegEpbCTWoLMuMET3WZFLymYSiG42NmbcZ0KTGkwTziLylL22n5wA\nZTlfuvuBQDRbK/S9fNWzXjomhJmqsyQmo2YAR0FA1aXn7Peqo/0tCftJk8JjWozd\nPg3nTeGel5fxNuV7rmlN26xBU6p0xNg12tz+4ggrEeq99dzgkfP+KQpYlzZVBLNd\nmQIDAQAB\n-----END PUBLIC KEY-----" + + invokeReq := IdentityUnverifiedRequest{PublicKey: publicKey, Payload: signedPayload} + CreateUnverifiedIdentity(t, stub, invokeReq) + }) + t.Run("GetIdentity", func(t *testing.T) { + fmt.Printf("FALLA???") + + verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImdldElkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.Zs1qPx3f6pgeoYOJCzFo51MeBGlEXYPtPMTxVI-ACeGJbA6hu8iBz_wCV-dVlvkvFRyKavhuOrxeh9Qo1PlQqhxPdDtiPN1CjqGrzYSFQZElTJUAwU2c9Qckui440z9riwLcxF5XnSOurNelZ1Z6-CLr5WZ_DB80K4fcf6ngX00450oSZgMIvuveuQJtFyzmIK91arMCy-bp9aUj8cYb8b7hGn0ahk2u7l-bUUSvTzxtdhjilApKvGy6YGnNxZ6-S321FntudCgvOOKfzVMPVeE7138F3xNmMWcGoeqbX315_lKjA15P3t0naSXUWkQejPFhac5YivJMjARhDM_THg" + invokeReq := Request{Did: "did:vtn:trustos:telefonica:2", Payload: verPayload} + GetUnverifiedIdentity(t, stub, invokeReq) + fmt.Printf("FALLA???") + + }) + t.Run("Verify Idenitity", func(t *testing.T) { + verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6InZlcmlmeUlkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.JfKl8qeO1nTPQaPS00Td3ksOtQBhzHQgaqmX2Ojz5Mvu45SiGT2KEOsR8SZheuHuFBPgdq7Mu8BRwjbUMmATIZugM-uZdmwZF0HPPMQB7GikW-EiTCOU_rwKCKAEgINLtanXsOEK75XJ_QPUewYe2Fwn7SVt-sDk9ufIJXIL2f5gw9Kjp3gNjGCAmc4bUSMNlUM7XENxo6oq6HuWzEOU9SnLLxIBMDO1fhD639q13xA4XDGW7QavaBcalFDBAvzhKjcmcDlh0c5vL66V168mAXWq0wx_Rja-Sgj8zkGTGgdzBuMVkY-DAvca2UQbGod38BVqMWMbsFM4SfpSFVCIYQ" + invokeReq := Request{Did: "did:vtn:trustos:telefonica:0", Payload: verPayload} + VerifyIdentity(t, stub, invokeReq) + }) + t.Run("RevokeIdenitity", func(t *testing.T) { + verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6InJldm9rZUlkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.bfL2kO2n2CG41QHOHv2KOuniOoVmkggBt3h-sQsHq9xr6_qRKK7kgnNsyYvZmqB_WJhaFmHjTViKAQaWUVfIHMYehAaO7oCx7Upou9mwlm-8m1SNwjQxFYcn8EC5fa7_MX0i-YSMW3O5zHRTxbS8QG1u0crW05Fr4gu19V0c8pA_91HJQLEBMUSNIGrY3pMein2Ami9bmfHtLOYKx473mzg8PrQBwh3e0QZ47uTgGD6vZmf4LDcCLUyqjiPFCXJCk3-4Oykrzkgt8xZ5Z3Rg5l-h5iTUjvA1iVgLnKuyhqvyqT3CdQfDfzev-QPqqpxQufI_u7eFdhuOfMM_OdX7EA" + invokeReq := Request{Did: "did:vtn:trustos:telefonica:0", Payload: verPayload} + RevokeIdenitity(t, stub, invokeReq) + }) +} + +func TestServices(t *testing.T) { + stub := InitChaincode(t) + + // /* Basic functionalities */ + t.Run("CreateUnverifiedIdentity", func(t *testing.T) { + signedPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlbGZJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToyIiwicHVibGljS2V5IjoiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdTA0ZTlWTE5uMUpIZ1lOSU1SclVcblE0SkhoSG4wd1p4UENEOWtjUHo2M1NNQmlZbkN0Uk0yNHBLODZnQWFUdU00RDhWMkxqckE2ZHZCV3dCT2YydUZcbi80aXJJUlhNT2FJNTh1dFhFQ3NBMHI2Q3cyU3BDWVNWOEJLMXk4aHBuc3cwMi9UMHhZUkRiRnFmaHZxY3NCSjJcbjRMSTZGNHRDb2JQb2VnRXBiQ1RXb0xNdU1FVDNXWkZMeW1ZU2lHNDJObWJjWjBLVEdrd1R6aUx5bEwyMm41d0FcblpUbGZ1dnVCUURSYksvUzlmTld6WGpvbWhKbXFzeVFtbzJZQVIwRkExYVhuN1BlcW8vMHRDZnRKazhKaldvemRcblBnM25UZUdlbDVmeE51VjdybWxOMjZ4QlU2cDB4TmcxMnR6KzRnZ3JFZXE5OWR6Z2tmUCtLUXBZbHpaVkJMTmRcbm1RSURBUUFCXG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiJ9fQ.Wylf4lFaJLLiTrs9IMrvs2-mD_4HiO1C6kq_FJRzeJJgWpoOCSZ-PeD5HbVkuc3H4lbGdbSbvmwF28NzjXVKhjT__x0eYSK4VEEMbFeZx7h3aOU985heKolzi9OGW3n9x-e0HuLiG8uI-nOovsU81d74TmMmlc-iTmsr8WWE8syMDDMuvQcXi7T8I3uxNsqXVKboHPB5eW-NfA1EfrooP2qb6E2doAqTdLf3UI8W1f3lsGebTK8ObLenq8MW--dzeA54xSyEFrwV6dVS_R8w4PqZQ-5ULUw-x20VcY9ZhGNknJnmhExl6kFn0ruDMHkadIsRslp6xShx4mQFOZEouQ" + publicKey := "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu04e9VLNn1JHgYNIMRrU\nQ4JHhHn0wZxPCD9kcPz63SMBiYnCtRM24pK86gAaTuM4D8V2LjrA6dvBWwBOf2uF\n/4irIRXMOaI58utXECsA0r6Cw2SpCYSV8BK1y8hpnsw02/T0xYRDbFqfhvqcsBJ2\n4LI6F4tCobPoegEpbCTWoLMuMET3WZFLymYSiG42NmbcZ0KTGkwTziLylL22n5wA\nZTlfuvuBQDRbK/S9fNWzXjomhJmqsyQmo2YAR0FA1aXn7Peqo/0tCftJk8JjWozd\nPg3nTeGel5fxNuV7rmlN26xBU6p0xNg12tz+4ggrEeq99dzgkfP+KQpYlzZVBLNd\nmQIDAQAB\n-----END PUBLIC KEY-----" + + invokeReq := IdentityUnverifiedRequest{PublicKey: publicKey, Payload: signedPayload} + CreateUnverifiedIdentity(t, stub, invokeReq) + }) + + t.Run("Verify Idenitity", func(t *testing.T) { + verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6InZlcmlmeUlkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.JfKl8qeO1nTPQaPS00Td3ksOtQBhzHQgaqmX2Ojz5Mvu45SiGT2KEOsR8SZheuHuFBPgdq7Mu8BRwjbUMmATIZugM-uZdmwZF0HPPMQB7GikW-EiTCOU_rwKCKAEgINLtanXsOEK75XJ_QPUewYe2Fwn7SVt-sDk9ufIJXIL2f5gw9Kjp3gNjGCAmc4bUSMNlUM7XENxo6oq6HuWzEOU9SnLLxIBMDO1fhD639q13xA4XDGW7QavaBcalFDBAvzhKjcmcDlh0c5vL66V168mAXWq0wx_Rja-Sgj8zkGTGgdzBuMVkY-DAvca2UQbGod38BVqMWMbsFM4SfpSFVCIYQ" + invokeReq := Request{Did: "did:vtn:trustos:telefonica:0", Payload: verPayload} + VerifyIdentity(t, stub, invokeReq) + }) + + t.Run("Create Service", func(t *testing.T) { + servicePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlcnZpY2VJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJ2dG46dHJ1c3RvczpzZXJ2aWNlOjEiLCJuYW1lIjoiY2hhaW5jb2RlX2V4YW1wbGUwMiIsImlzUHVibGljIjp0cnVlfX0.ZD09jbF7YbNbCAlvZhQAS3e76ziwqD-2v3Z-A9abVRPGpuqF4KR4YOkb3lyzLeiiZJo240tDPzfFessG93yCxY3KOcREXZ5hAFqhxk25Eyw9Cx_vngj8_ON7bfh7DBc5J05c4K2-QET9PV1MMWBqeS3TjiCq2zBfHxsWBRsTeOA5e32X6xyqAZq6Cj2NXA4kLXSd4zhRu_B5xtG4HobwhOFqLnliSP74tvBM_disK3Yk08qfrsr9o5u5xOofdbcigEUpaZVpFVdT79VFkFHvrX-ACoadeMMCq87sraE3riEAGaqnXPuIZurE50APyUJAWTYbTHOSYlW9bRB21C8smA" + service := Request{Did: "did:vtn:trustos:telefonica:2", Payload: servicePayload} + CreateService(t, stub, service) + }) + t.Run("Get Service", func(t *testing.T) { + servicePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImdldFNlcnZpY2VJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJ2dG46dHJ1c3RvczpzZXJ2aWNlOjEifX0.tCStObDRrTF4aT6LOhOvOGhRDEpVl19VxMJLE1x76VIhqC_beq94WRm9Bg3QwWrXMNK2SVeabdMVqV5n1y-6xaaAAm-5FLGDbmALVPrjlOnactbzjaoL4NdktgJ_d7DDGSh4U1v2f36O1o6TlrjZGqHXMt_lm-02ZeWmcj8welhRDeKkDqP11GOYU2oYYgX4UElX0eKxMLGRlJfXHYFuqXRQ30epc4xtfNmq1wTu9pxcY3haXXWdkeTAKAb6t6sF_4nT5MO-3d2gZ8awzt71YhvM4YIHu5twO-Uatmns9z4EXRtdFJHBDGMhEvGEOOD1ZEZcb5anjg9hGBagdJxj6Q" + service := Request{Did: "did:vtn:trustos:telefonica:2", Payload: servicePayload} + GetService(t, stub, service) + }) + t.Run("Update Service", func(t *testing.T) { + updatePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6InVwZGF0ZVNlcnZpY2VBY2Nlc3MiLCJwYXJhbXMiOnsiZGlkIjoidnRuOnRydXN0b3M6c2VydmljZToxIiwiYWNjZXNzIjp7ImRpZCI6ImRpZDp0ZWxlZm9uaWNhOjI5MjM5MjkzIiwidHlwZSI6MH0sImlzUHVibGljIjp0cnVlfX0.bQTxXnqOThPfVshlRTTQfm7dcLHGCTopSiF8tC5KjenyzXh-UI2AN5Grd-jJtpyHs1hq8xCdKrgDKynDlKUsWR3aSszQcrve8ZEge2yN4WzvPh3eqfpXSVhPMDuGAHdqoGmHUGCTQaZVwjatwlo9e-cQAlLcAqjakW8CWNtsVK5ABVnfly6_0-PhLXnrn6RJyjSPJ7C-nXpIoUFBpJ7YPWSK0HKwbCtQU6HqEpOW1iGv6gYMZLyQ8zxDp5HOlGuVPIdSKQNdrEfsDJhiIZb1P4jiZDqD_hAD_ct8LhDvH5_ogWt4RVGsNIswQSmeRj3Dw65ao_6j8DNwhQoCVPy0mA" + service := Request{Did: "did:vtn:trustos:telefonica:2", Payload: updatePayload} + UpdateService(t, stub, service) + }) + t.Run("Get Service", func(t *testing.T) { + servicePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImdldFNlcnZpY2VJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJ2dG46dHJ1c3RvczpzZXJ2aWNlOjEifX0.tCStObDRrTF4aT6LOhOvOGhRDEpVl19VxMJLE1x76VIhqC_beq94WRm9Bg3QwWrXMNK2SVeabdMVqV5n1y-6xaaAAm-5FLGDbmALVPrjlOnactbzjaoL4NdktgJ_d7DDGSh4U1v2f36O1o6TlrjZGqHXMt_lm-02ZeWmcj8welhRDeKkDqP11GOYU2oYYgX4UElX0eKxMLGRlJfXHYFuqXRQ30epc4xtfNmq1wTu9pxcY3haXXWdkeTAKAb6t6sF_4nT5MO-3d2gZ8awzt71YhvM4YIHu5twO-Uatmns9z4EXRtdFJHBDGMhEvGEOOD1ZEZcb5anjg9hGBagdJxj6Q" + service := Request{Did: "did:vtn:trustos:telefonica:2", Payload: servicePayload} + GetService(t, stub, service) + }) + +} + +// ######################### Identity Functions ######################## + +func InitChaincode(t *testing.T) *testcc.MockStub { + cc := new(Chaincode) + + stub := testcc.NewMockStub("chaincode", cc) + pkRoot := "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7NBDzVMESXU/yuARe7YU\nGrkgNMZh5eA5w3PgxgYZf/isDLPHvmSM2Q9cTauDroriGInikQxtZ/CI4+9Qi4Rd\nJCHjeWhzw0hTIXhHoohyo9QTbUVetb4RBDJEcNqFrpztAojn8Ib5EF2soBFtBLyT\nguxlizcWwTZvv+KxHGBg/tUE7JIqw3YzmEK31faR2HhkPPqxTQ9F+h4SOnY9e6Cf\nh75PpjouzarpntSVkAqv/Ot5kV3O4TcWhB0vUr/HZwx2iX+LEyYock8Sx4Op20/g\n7k3J3rYhMGTHfkKMhZjX9QoZ8uBRiSxieAaia0yZSIcycgE6Aqu6KT+WaQn4bCnh\nwQIDAQAB\n-----END PUBLIC KEY-----" + invokeReq := IdentityRequest{Did: "did:vtn:trustos:telefonica:0", Controller: "did:vtn:trustos:telefonica:0", PublicKey: pkRoot} + input, _ := json.Marshal(invokeReq) + res := stub.MockInit("1", [][]byte{[]byte("initFunc"), input}) + if res.Status != shim.OK { + t.Error("Init failed", res.Status, res.Message) + } + return stub +} + +func CreateUnverifiedIdentity(t *testing.T, stub *testcc.MockStub, invokeReq IdentityUnverifiedRequest) { + input, _ := json.Marshal(invokeReq) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + expectedRes := "" + assert.Equal(t, expectedRes, string(res.Payload), "Should be the same") + +} +func GetUnverifiedIdentity(t *testing.T, stub *testcc.MockStub, invokeReq Request) { + + input, _ := json.Marshal(invokeReq) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + fmt.Printf(string(res.Payload)) + +} + +func VerifyIdentity(t *testing.T, stub *testcc.MockStub, invokeReq Request) { + + input, _ := json.Marshal(invokeReq) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + +} + +func RevokeIdenitity(t *testing.T, stub *testcc.MockStub, invokeReq Request) { + + input, _ := json.Marshal(invokeReq) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + +} + +// func TestBadVerifyIdentity(t *testing.T) { +// cc := new(Chaincode) +// pkRoot := "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7NBDzVMESXU/yuARe7YU\nGrkgNMZh5eA5w3PgxgYZf/isDLPHvmSM2Q9cTauDroriGInikQxtZ/CI4+9Qi4Rd\nJCHjeWhzw0hTIXhHoohyo9QTbUVetb4RBDJEcNqFrpztAojn8Ib5EF2soBFtBLyT\nguxlizcWwTZvv+KxHGBg/tUE7JIqw3YzmEK31faR2HhkPPqxTQ9F+h4SOnY9e6Cf\nh75PpjouzarpntSVkAqv/Ot5kV3O4TcWhB0vUr/HZwx2iX+LEyYock8Sx4Op20/g\n7k3J3rYhMGTHfkKMhZjX9QoZ8uBRiSxieAaia0yZSIcycgE6Aqu6KT+WaQn4bCnh\nwQIDAQAB\n-----END PUBLIC KEY-----" +// invokeReq := IdentityRequest{Did: "did:vtn:trustos:telefonica:0", Controller: "did:vtn:trustos:telefonica:0", PublicKey: pkRoot} +// input, _ := json.Marshal(invokeReq) +// stub := shim.NewMockStub("chaincode", cc) +// res := stub.MockInit("1", [][]byte{[]byte("initFunc"), input}) +// if res.Status != shim.OK { +// t.Error("Init failed", res.Status, res.Message) +// } +// signedPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToxIiwicHVibGljS2V5IjoiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdTA0ZTlWTE5uMUpIZ1lOSU1SclVcblE0SkhoSG4wd1p4UENEOWtjUHo2M1NNQmlZbkN0Uk0yNHBLODZnQWFUdU00RDhWMkxqckE2ZHZCV3dCT2YydUZcbi80aXJJUlhNT2FJNTh1dFhFQ3NBMHI2Q3cyU3BDWVNWOEJLMXk4aHBuc3cwMi9UMHhZUkRiRnFmaHZxY3NCSjJcbjRMSTZGNHRDb2JQb2VnRXBiQ1RXb0xNdU1FVDNXWkZMeW1ZU2lHNDJObWJjWjBLVEdrd1R6aUx5bEwyMm41d0FcblpUbGZ1dnVCUURSYksvUzlmTld6WGpvbWhKbXFzeVFtbzJZQVIwRkExYVhuN1BlcW8vMHRDZnRKazhKaldvemRcblBnM25UZUdlbDVmeE51VjdybWxOMjZ4QlU2cDB4TmcxMnR6KzRnZ3JFZXE5OWR6Z2tmUCtLUXBZbHpaVkJMTmRcbm1RSURBUUFCXG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIsImFjY2VzcyI6MX0.XYaCvgrLuT8dO2rq4-ktAN6IvR2tDNOx3EtHBlrEYy7JIPGwaccQHsmlsrsV17aIgPHBAlnA1UAUfHb7jAY7-xhgqKn98XNLAghftERFS50yVH-PZAfeBDx9jvMR4cnYh4niK2fWu5Z-cT5R-bq2CJwELnF2dUr4WIYiXaTsmBpbupje6_EUwVAvN7QMQ0a7nlZ64eoOuzVOhWfFBpJP6jjnSfERwujpSDGHMYCQw-wBL6pEKzjMahd_8VyReEMzeQwpnyGJzmqdiC8zaCJqz0DcugLgWGNzkRtnnRaIZF4N1dvX9Ld6vs2tDMCcZACHRBQBJ774vZPP7ZH2rTm-lg" + +// invokeReq2 := Request{Did: "did:vtn:trustos:telefonica:0", Payload: signedPayload} +// input, _ = json.Marshal(invokeReq2) +// res = stub.MockInvoke("1", [][]byte{[]byte("createVerifiedIdentity"), input}) +// if res.Status != shim.OK { +// t.Error("Invoke failed", res.Status, res.Message) +// } + +// verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToxIn0.FOjwHYfctNpWxBR5cMAYIn3M-Tp8Ml1GMTw0aLzCSO3IjFfGEXz-vOmXvduvPCPJIvSkETbZO8ywlx5aR0tLmpNtY_mfy6b-MzZXLl8lkA0-MP_NcZvSh-lFhIxY9kMF6yIwg7pwZxK1x3G4N4vUbT5SbeNq6K1v6sE0m2TKdW_IhiMvvET_k8a8BP03U4LREp9JHqLyz8_OJlMp1Na4ABjPitZ2wQP0DBXuCnRX3xJSguJSd4w2PdYAEwMSUZBaviiTrJwoyZE2Ktmgc7929X2weYQgy5_KU_Mqz_NWRo-SNJzdIVnAYMXDfhgQyHTpjENQtgS6-oRZhqA2OaDxPQ" +// invokeReq3 := Request{Did: "did:vtn:trustos:telefonica:0", Payload: verPayload} +// input, _ = json.Marshal(invokeReq3) +// res = stub.MockInvoke("1", [][]byte{[]byte("verifyIdentity"), input}) +// if res.Status == shim.OK { +// t.Error("Invoke failed", res.Status, res.Message) +// } + +// } + +// ######################### Service Functions ######################## + +func CreateService(t *testing.T, stub *testcc.MockStub, service Request) { + + input, _ := json.Marshal(service) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + +} + +func GetService(t *testing.T, stub *testcc.MockStub, service Request) { + + input, _ := json.Marshal(service) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + fmt.Printf("%s", string(res.Payload)) +} + +func UpdateService(t *testing.T, stub *testcc.MockStub, service Request) { + + // const access = { "did": "did:telefonica:29239293", "type": 0 } + // { did: "vtn:trustos:service:1", acess: access, isPublic: true } + input, _ := json.Marshal(service) + res := stub.MockInvoke("1", [][]byte{[]byte("proxy"), input}) + if res.Status != shim.OK { + t.Error("Invoke failed", res.Status, res.Message) + } + +} diff --git a/fabric-chaincode/go.mod b/fabric-chaincode/go.mod new file mode 100644 index 00000000..911d0bdd --- /dev/null +++ b/fabric-chaincode/go.mod @@ -0,0 +1,21 @@ +module coren-identitycc/src/chaincode + +go 1.12 + +require ( + github.com/fsouza/go-dockerclient v1.6.5 // indirect + github.com/go-logfmt/logfmt v0.4.0 // indirect + github.com/hyperledger/fabric v1.4.4 + github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a // indirect + github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a + github.com/hyperledger/fabric-lib-go v1.0.0 // indirect + github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 + github.com/pierrec/lz4 v2.0.5+incompatible // indirect + github.com/s7techlab/cckit v0.6.14 // indirect + github.com/sirupsen/logrus v1.6.0 + github.com/spf13/viper v1.4.0 // indirect + github.com/stretchr/testify v1.5.1 + github.com/sykesm/zap-logfmt v0.0.3 // indirect + github.com/syndtr/goleveldb v1.0.0 // indirect + gopkg.in/square/go-jose.v2 v2.5.1 +) diff --git a/fabric-chaincode/go.sum b/fabric-chaincode/go.sum new file mode 100644 index 00000000..3adee75c --- /dev/null +++ b/fabric-chaincode/go.sum @@ -0,0 +1,648 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= +contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= +git.apache.org/thrift.git v0.0.0-20181218151757-9b75e4fe745a/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/zstd v1.3.6-0.20190409195224-796139022798/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.4.0/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= +github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Microsoft/go-winio v0.4.7/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873 h1:93nQ7k53GjoMQ07HVP8g6Zj1fQZDDj7Xy2VkNNtvX8o= +github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.7 h1:ptnOoufxGSzauVTsdE+wMYnCWA301PdoN4xg5oRdZpg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Netflix/go-expect v0.0.0-20180615182759-c93bf25de8e8/go.mod h1:oX5x61PbNXchhh0oikYAH+4Pcfw5LKv21+Jnpr6r6Pc= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.0.0/go.mod h1:7/4sitnI9YlQgTLLk734QlzXT8DuHVnAyztLplQjk+o= +github.com/Shopify/sarama v1.17.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= +github.com/Shopify/sarama v1.22.1/go.mod h1:FRzlvRpMFO/639zY1SDxUxkqH97Y0ndM5CbGj6oG3As= +github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/c-bata/go-prompt v0.2.3/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= +github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cfssl v0.0.0-20180323000720-5d63dbd981b5/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cloudflare/cfssl v0.0.0-20190328212615-ea569c5aa1be/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/cloudflare/cfssl v0.0.0-20190510060611-9c027c93ba9e/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20180523223233-a60600ad77f3/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c h1:8ahmSVELW1wghbjerVAyuEYD5+Dio66RYvSS0iGfL1M= +github.com/containerd/continuity v0.0.0-20200228182428-0f16d7a0959c/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v0.0.0-20180524115659-aa2d23a7357d/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190212235812-0111ee70874a/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v0.7.3-0.20190309235953-33c3200e0d16/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 h1:oqgGT9O61YAYvI41EBsLePOr+LE6roB0xY4gpkZuFSE= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libnetwork v0.0.0-20180608203834-19279f049241/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-xerial-snappy v0.0.0-20180703130627-040cc1a32f57/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.6.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsouza/go-dockerclient v1.2.0/go.mod h1:KpcjM623fQYE9MZiTGzKhjfxXAV9wbyX2C1cyRHfhl0= +github.com/fsouza/go-dockerclient v1.3.6/go.mod h1:ptN6nXBwrXuiHAz2TYGOFCBB1aKGr371sGjMFdJEr1A= +github.com/fsouza/go-dockerclient v1.4.0/go.mod h1:GmPog78dvaRLJqt7QU7fRLaJKUkYW2hYjxKCp1uwGwE= +github.com/fsouza/go-dockerclient v1.6.5 h1:vuFDnPcds3LvTWGYb9h0Rty14FLgkjHZdwLDROCdgsw= +github.com/fsouza/go-dockerclient v1.6.5/go.mod h1:GOdftxWLWIbIWKbIMDroKFJzPdg6Iw7r+jX1DDZdVsA= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-critic/go-critic v0.3.5-0.20190526074819-1df300866540/go.mod h1:+sE8vrLDS2M0pZkBk0wy6+nLdKexVDrl/jBqQOTDThA= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= +github.com/golang/mock v1.0.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= +github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= +github.com/golangci/go-tools v0.0.0-20190318055746-e32c54105b7c/go.mod h1:unzUULGw35sjyOYjUt0jMTXqHlZPpPc6e+xfO4cd6mM= +github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= +github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= +github.com/golangci/gofmt v0.0.0-20181222123516-0b8337e80d98/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.17.2-0.20190910081718-bad04bb7378f/go.mod h1:kaqo8l0OZKYPtjNmG4z4HrWLgcYNIJ9B9q3LWri9uLg= +github.com/golangci/gosec v0.0.0-20190211064107-66fb7fc33547/go.mod h1:0qUabqiIQgfmlAmulqxyiGkkyF6/tOGSnY2cnPVwrzU= +github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= +github.com/golangci/lint-1 v0.0.0-20190420132249-ee948d087217/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= +github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/certificate-transparency-go v0.0.0-20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.0/go.mod h1:i+Q7XY+ArBveOUT36jiHGfuSK1fHICIg6sUkRxPAbCs= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/monologue v0.0.0-20190606152607-4b11a32b5934/go.mod h1:6NTfaQoUpg5QmPsCUWLR3ig33FHrKXhTtWzF0DVdmuk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/trillian v1.2.2-0.20190612132142-05461f4df60a/go.mod h1:YPmUVn5NGwgnDUgqlVyFGMTgaWlnSvH7W5p+NdOG8UA= +github.com/google/trillian-examples v0.0.0-20190603134952-4e75ba15216c/go.mod h1:WgL3XZ3pA8/9cm7yxqWrZE6iZkESB2ItGxy5Fo6k2lk= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.11.1/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/go-version v0.0.0-20180716215031-270f2f71b1ee/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174/go.mod h1:DqJ97dSdRW1W22yXSB90986pcOyQ7r45iio1KN2ez1A= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hyperledger/fabric v1.4.0/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= +github.com/hyperledger/fabric v1.4.4 h1:Joa6eO9HEGnzcuZF5RD+dZBPeYqxGF+ehYb7OSs3glY= +github.com/hyperledger/fabric v1.4.4/go.mod h1:tGFAOCT696D3rG0Vofd2dyWYLySHlh0aQjf7Q1HAju0= +github.com/hyperledger/fabric-amcl v0.0.0-20181230093703-5ccba6eab8d6/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= +github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a h1:JAKZdGuUIjVmES0X31YUD7UqMR2rz/kxLluJuGvsXPk= +github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a h1:KoFw2HnRfW+EItMP0zvUUl1FGzDb/7O0ov7uXZffQok= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= +github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= +github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= +github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 h1:75hBp86WljV3uQ7Q/wbO5w8ahfLAzxH7jfT5kVy2n6g= +github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v0.0.0-20161130080628-0de1eaf82fa3/go.mod h1:jxZFDH7ILpTPQTk+E2s+z4CUas9lVNjIuKR4c5/zKgM= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/letsencrypt/pkcs11key v2.0.1-0.20170608213348-396559074696+incompatible/go.mod h1:iGYXKqDXt0cpBthCHdr9ZdsQwyGlYFh/+8xa4WzIQ34= +github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= +github.com/magiconair/properties v1.7.6/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-tty v0.0.0-20181127064339-e4f871175a2f/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/miekg/pkcs11 v0.0.0-20180425180052-287d9350987c/go.mod h1:WCBAbTOdfhHhz7YXujeZMF7owC4tPb1naKFsgfUISjo= +github.com/miekg/pkcs11 v0.0.0-20190225171305-6120d95c0e95/go.mod h1:WCBAbTOdfhHhz7YXujeZMF7owC4tPb1naKFsgfUISjo= +github.com/miekg/pkcs11 v1.0.2 h1:CIBkOawOtzJNE0B+EpRiUBzuVW7JEQAwdwhSS6YhIeg= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v0.0.0-20170309133038-4fdf99ab2936/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= +github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v0.0.0-20180511142126-bb74f1db0675/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20190212092829-1f388280e944/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.5.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= +github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= +github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= +github.com/pelletier/go-toml v1.1.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0 h1:u3Z1r+oOXJIkxqw34zVhyPgjBsm6X2wn21NWs/HfSeg= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pierrec/lz4 v0.0.0-20190327172049-315a67e90e41/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= +github.com/pierrec/lz4 v2.0.3+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.0.0-20180311214515-816c9085562c/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/term v0.0.0-20190109203006-aa71e9d9e942/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM= +github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v0.9.4/go.mod h1:oCXIBxdI62A4cR6aTRJCgetEjecSIYzOEaeAn4iYEpM= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181218105931-67670fe90761/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= +github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/s7techlab/cckit v0.4.4/go.mod h1:i/XsLaJePLZFwNU0+lMtr6zFmebAh7ShOX+AGKpPems= +github.com/s7techlab/cckit v0.6.9/go.mod h1:ibV74uElwBNGU39eM7kmV9U3WD25nNLjH8gp3i7f2W8= +github.com/s7techlab/cckit v0.6.14 h1:YdUn8Y16o1UlbuIFQuLBgzciOIpAOwMQucvVD5F3Quo= +github.com/s7techlab/cckit v0.6.14/go.mod h1:LZakWnqsb+UGGGFi+HvCVgamk08p9X9kfBZRvVLhV8o= +github.com/s7techlab/hlf-sdk-go v0.0.0-20190321081842-4e70f5d9dcf3/go.mod h1:6gP0iaUnUDlTZZKkCGB9/T0t7GAoZpB+a9oJ9KCjmeg= +github.com/s7techlab/hlf-sdk-go v0.1.3/go.mod h1:AB6zbSaKecJXrwlls18P8hDH4c42OU5IJp2C2wAEIuE= +github.com/s7techlab/hlf-sdk-go v0.5.0 h1:d9Jmv9joNoOvZKSxSDWe/+u7Xjf1lfAsDoKkzO8s5Yg= +github.com/s7techlab/hlf-sdk-go v0.5.0/go.mod h1:RskEaCc8NxI7dtAEAgcsplg3awcz6jvdSx3Zrlqg0oU= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/shirou/gopsutil v0.0.0-20180427012116-c95755e4bcd7/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.0/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.2/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v0.0.0-20150908122457-1967d93db724/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/spf13/viper v1.0.2/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/sykesm/zap-logfmt v0.0.3 h1:3Wrhf7+I9JEUD8B6KPtDAr9j2jrS0/EPLy7GCE1t/+U= +github.com/sykesm/zap-logfmt v0.0.3/go.mod h1:AuBd9xQjAe3URrWT1BBDk2v2onAZHkZkWRMiYZXiZWA= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/goleveldb v0.0.0-20180708030551-c4c61651e9e3/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/tedsuo/ifrit v0.0.0-20180622163835-2a37a9eb7c3a/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/tedsuo/ifrit v0.0.0-20191009134036-9a97d0632f00/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/timakin/bodyclose v0.0.0-20190721030226-87058b9bfcec/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ultraware/funlen v0.0.1/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= +github.com/valyala/quicktemplate v1.1.1/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/etcd v3.3.13+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI= +go.opencensus.io v0.19.0/go.mod h1:AYeH0+ZxYyghG8diqaaIq/9P3VgCCt5GF2ldCY4dkFg= +go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= +go.opencensus.io v0.20.0/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.5.0 h1:OI5t8sDa1Or+q8AeE+yKeB/SDYioSHAgcVljj9JIETY= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.12.0 h1:dySoUQPFBGj6xwjmBzageVL8jGi8uxc6bEmJQjA06bw= +go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/net v0.0.0-20170915142106-8351a756f30f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181217023233-e147a9138326/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20171026204733-164713f0dfce/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180606202747-9527bec2660b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190310054646-10058d7d4faa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449 h1:gSbV7h1NRL2G1xTg/owz62CST1oJBmxy4QpMMregXVQ= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20170915090833-1cbadb444a80/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20170915040203-e531a2a1c15f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190121143147-24cd39ecf745/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190909030654-5b82db07426d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190605220351-eb0b1bdb6ae6/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= +google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +gopkg.in/AlecAivazis/survey.v1 v1.8.2/go.mod h1:iBNOmqKz/NUbZx3bA+4hAGLRC7fSK7tgtVDT4tB22XA= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20190209190245-fbb59629db34/go.mod h1:H6SUd1XjIs+qQCyskXg5OFSrilMRUkD8ePJpHKDPaeY= +sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/fabric-chaincode/id.gateway.go b/fabric-chaincode/id.gateway.go new file mode 100644 index 00000000..270bde8f --- /dev/null +++ b/fabric-chaincode/id.gateway.go @@ -0,0 +1,119 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + "errors" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +func (cc *Chaincode) getIdentity(stub shim.ChaincodeStubInterface, did string, identity *Identity, args interface{}) (string, error) { + log.Infof("[%s][getIdentity] Get Identity", IDGATEWAY) + var idReturn *Identity + var err error + idReq := make(map[string]interface{}) + idReq = args.(map[string]interface{}) + + log.Infof("[%s][verifyIdentity] Get Identity %v", IDGATEWAY, idReq["did"].(string)) + if idReq["did"].(string) != did { + idReturn, err = cc.getIDRegistry(stub, idReq["did"].(string)) + if err != nil { + log.Errorf("[%s][getIdentity] Problem getting identity: %v", IDGATEWAY, err.Error()) + return "nil", err + + } + } else { + idReturn = identity + } + + identityReponse := make(map[string]string) + identityReponse["did"] = idReq["did"].(string) + identityReponse["publicKey"] = idReturn.PublicKey + + log.Infof("[%s][getIdentity] Get Identity", IDGATEWAY) + + idBytes, err := json.Marshal(identityReponse) + + return string(idBytes), nil +} + +func (cc *Chaincode) createIdentity(stub shim.ChaincodeStubInterface, args []string) (string, error) { + idReq := IdentityRequest{} + err := json.Unmarshal([]byte(args[0]), &idReq) + + if err != nil { + log.Errorf("[%s][CreateIdentity] Error parsing: %v", IDGATEWAY, err.Error()) + } + identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Did} + _, err = cc.createIDRegistry(stub, idReq.Did, identityStore) + + return "", nil + +} + +func (cc *Chaincode) createSelfIdentity(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { + idReq := make(map[string]interface{}) + idReq = args.(map[string]interface{}) + log.Debugf("[%s][createSelfIdentity] Calling to registry", IDGATEWAY) + identityStore := Identity{PublicKey: idReq["publicKey"].(string)} + + _, err := cc.createIDRegistry(stub, idReq["did"].(string), identityStore) + if err != nil { + log.Errorf("[%s][createSelfIdentity] Error creating Identity: %v", IDGATEWAY, err.Error()) + return "", err + } + + return "", nil +} +func (cc *Chaincode) verifyIdentity(stub shim.ChaincodeStubInterface, did string, identity *Identity, args interface{}) (string, error) { + log.Infof("[%s][verifyIdentity]Verifying identity", IDGATEWAY) + idVerReq := make(map[string]interface{}) + idVerReq = args.(map[string]interface{}) + + log.Infof("[%s][verifyIdentity] Idenitity has access %v", IDGATEWAY, identity.Access) + + if identity.Access == 0 { + log.Errorf("[%s][verifyIdentity] Identity has not access to verify", IDGATEWAY) + return "", errors.New("Verification unauthorized, the did provided has not access") + } + + _, err := cc.updateIDRegistry(stub, idVerReq["did"].(string), did, 1) + if err != nil { + log.Errorf("[%s][verifyIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + return "", err + } + log.Infof("[%s][verifyIdentity]Idenitity updated", IDGATEWAY) + + return "", nil + +} + +func (cc *Chaincode) revokeIdentity(stub shim.ChaincodeStubInterface, did string, identity *Identity, args interface{}) (string, error) { + log.Infof("[%s][revokeIdentity]Verifying identity", IDGATEWAY) + var err error + idReq := make(map[string]interface{}) + idReq = args.(map[string]interface{}) + + if identity.Access == 0 { + log.Errorf("[%s][revokeIdentity] Identity has not access to revoke", IDGATEWAY) + return "", errors.New("Identity has not access to revoke") + } + + _, err = cc.revokeIDRegistry(stub, idReq["did"].(string), did) + if err != nil { + log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + return "", err + } + log.Infof("[%s][revokeIdentity]Idenitity revoked", IDGATEWAY) + + return "", nil + +} diff --git a/fabric-chaincode/id.registry.go b/fabric-chaincode/id.registry.go new file mode 100644 index 00000000..f61f4f0d --- /dev/null +++ b/fabric-chaincode/id.registry.go @@ -0,0 +1,115 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + "errors" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +var ccErrorCode = "CC-01" + +func (cc *Chaincode) createIDRegistry(stub shim.ChaincodeStubInterface, did string, identity Identity) (string, error) { + log.Infof("[%s][createIDRegistry] Create Identity for did %s", IDREGISTRY, did) + bytes, err := stub.GetState(did) + + if bytes != nil { + log.Errorf("[%s][createIDRegistry] The identity already exists", IDREGISTRY) + log.Errorf("[%s][createIDRegistry] Return error", IDREGISTRY) + return "", errors.New("Error creating ID in registry. The identity already exists") + } + idBytes, err := json.Marshal(identity) + if err != nil { + log.Errorf("[%s][createIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error parsing identity:" + err.Error()) + } + + err = stub.PutState(did, idBytes) + if err != nil { + log.Errorf("[%s][createIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error storing identity:" + err.Error()) + } + log.Infof("[%s][createIDRegistry] Indentity stored for did %s", IDREGISTRY, did) + + return "", nil +} + +func (cc *Chaincode) getIDRegistry(stub shim.ChaincodeStubInterface, did string) (*Identity, error) { + + log.Infof("[%s][getIDRegistry] Get Identity for did %s", IDREGISTRY, did) + idStored := Identity{} + idBytes, err := stub.GetState(did) + if err != nil { + log.Errorf("[%s][getIDRegistry] Error getting identity: %v", IDREGISTRY, err.Error()) + return nil, errors.New("Error getting identity:" + err.Error()) + } + if idBytes == nil { + log.Errorf("[%s][getIDRegistry] The identity doesn't exist", IDREGISTRY) + log.Errorf("[%s][getIDRegistry] Return error", IDREGISTRY) + return nil, errors.New("The identity doesn't exist") + } + err = json.Unmarshal(idBytes, &idStored) + if err != nil { + log.Errorf("[%s][getIDRegistry] Error parsing identity: %v", IDREGISTRY, err.Error()) + return nil, errors.New("Error parsing" + err.Error()) + } + log.Infof("[%s][getIDRegistry] Get PublicKey for did %s", IDREGISTRY, did) + + return &idStored, nil +} + +func (cc *Chaincode) updateIDRegistry(stub shim.ChaincodeStubInterface, did string, didController string, access int) (string, error) { + var identity *Identity + identity, err := cc.getIDRegistry(stub, did) + if err != nil { + log.Errorf("[%s][updateIDRegistry] Problem getting identity: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error getting identity:" + err.Error()) + } + + identity.Controller = didController + identity.Access = access + idBytes, err := json.Marshal(*identity) + if err != nil { + log.Errorf("[%s][updateIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error parsing when update" + err.Error()) + } + err = stub.PutState(did, idBytes) + if err != nil { + log.Errorf("[%s][updateIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error updatin in the ledger" + err.Error()) + } + log.Infof("[%s][updateIDRegistry] Identity updated", IDREGISTRY) + + return "", nil +} + +func (cc *Chaincode) revokeIDRegistry(stub shim.ChaincodeStubInterface, did string, didController string) (string, error) { + identity, err := cc.getIDRegistry(stub, did) + if err != nil { + log.Errorf("[%s][revokeIDRegistry] Problem checking identity: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error in revoke" + err.Error()) + } + if identity.Controller != didController { + err := errors.New("Unauthorized: The did provided has not access to revoke the identity") + log.Errorf("[%s][revokeIDRegistry] This is not the identity controller: %v", IDREGISTRY, err.Error()) + + return "", errors.New("Error revoking the did provided cannot revoke the identity") + } + + err = stub.DelState(did) + if err != nil { + log.Errorf("[%s][revokeIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) + return "", errors.New("Error deleting from ledger" + err.Error()) + } + log.Infof("[%s][updateIDRegistry] Identity revoked successfully", IDREGISTRY) + + return "", nil +} diff --git a/fabric-chaincode/jose.utils.go b/fabric-chaincode/jose.utils.go new file mode 100644 index 00000000..cdd7589c --- /dev/null +++ b/fabric-chaincode/jose.utils.go @@ -0,0 +1,71 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + "crypto/x509" + "encoding/base64" + "fmt" + "strings" + + jose "gopkg.in/square/go-jose.v2" +) + +func parseMessage(message string) (*jose.JSONWebSignature, error) { + jwsSignature, err := jose.ParseSigned(message) + if err != nil { + fmt.Println(err) + return nil, err + } + return jwsSignature, nil +} + +func parsePublicKeyX509(publicKey string) (interface{}, error) { + base64Data := []byte(publicKey) + + d := make([]byte, base64.StdEncoding.DecodedLen(len(base64Data))) + n, err := base64.StdEncoding.Decode(d, base64Data) + if err != nil { + // Handle error + } + d = d[:n] + + publicKeyImported, err := x509.ParsePKIXPublicKey(d) + if err != nil { + fmt.Println(err) + return nil, err + } + return publicKeyImported, nil +} + +func parseKey(publicKey string) string { + + begin := "-----BEGIN PUBLIC KEY-----" + end := "-----END PRIVATE KEY-----" + //pk := strings.ReplaceAll(publicKey, "\n", "") + + r := strings.NewReplacer("\n", "") + + // Replace all pairs. + pk := r.Replace(publicKey) + noBegin := strings.Split(pk, begin) + parsed := strings.Split(noBegin[1], end) + return parsed[0] +} + +func verifySignature(message string, key string) ([]byte, error) { + msg, err := parseMessage(message) + pbkey, err := parsePublicKeyX509(key) + result, err := jose.JSONWebSignature.Verify(*msg, pbkey) + if err != nil { + fmt.Printf("%v", err) + return nil, err + } + return result, nil + +} diff --git a/fabric-chaincode/log/logger.go b/fabric-chaincode/log/logger.go new file mode 100644 index 00000000..b8d14f99 --- /dev/null +++ b/fabric-chaincode/log/logger.go @@ -0,0 +1,110 @@ +package util + +import ( + "os" + + "github.com/sirupsen/logrus" +) + +const ( + logUtil = "[Logger Util]" +) + +func InitLogToStdoutDebug() { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true, FullTimestamp: true}) + logrus.SetOutput(os.Stdout) + logrus.SetLevel(logrus.DebugLevel) +} + +func InitLogToStdouWarning() { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true, FullTimestamp: true}) + logrus.SetOutput(os.Stdout) + logrus.SetLevel(logrus.WarnLevel) +} +func InitLogToStdoutInfo() { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true, FullTimestamp: true}) + logrus.SetOutput(os.Stdout) + logrus.SetLevel(logrus.InfoLevel) +} +func InitLogToStdoutFatal() { + logrus.SetFormatter(&logrus.TextFormatter{ForceColors: true, FullTimestamp: true}) + logrus.SetOutput(os.Stdout) + logrus.SetLevel(logrus.FatalLevel) +} + +// Init logrus +func Init(logLevel string) { + switch logLevel { + case "DEBUG": + InitLogToStdoutDebug() + case "INFO": + InitLogToStdoutInfo() + case "FATAL": + InitLogToStdoutFatal() + case "WARNING": + InitLogToStdouWarning() + default: + InitLogToStdoutDebug() + } + logrus.Info(logUtil + "[Init]" + "Logger Initialized with value " + logLevel) +} + +// Debug logs a message with debug log level. +func Debug(msg string) { + logrus.Debug(msg) +} + +// Debugf logs a formatted message with debug log level. +func Debugf(msg string, args ...interface{}) { + logrus.Debugf(msg, args...) +} + +// Info logs a message with info log level. +func Info(msg string) { + logrus.Info(msg) +} + +// Infof logs a formatted message with info log level. +func Infof(msg string, args ...interface{}) { + logrus.Infof(msg, args...) +} + +// Warn logs a message with warn log level. +func Warn(msg string) { + logrus.Warn(msg) +} + +// Warnf logs a formatted message with warn log level. +func Warnf(msg string, args ...interface{}) { + logrus.Warnf(msg, args...) +} + +// Error logs a message with error log level. +func Error(msg string) { + logrus.Error(msg) +} + +// Errorf logs a formatted message with error log level. +func Errorf(msg string, args ...interface{}) { + logrus.Errorf(msg, args...) +} + +// Fatal logs a message with fatal log level. +func Fatal(msg string) { + logrus.Fatal(msg) +} + +// Fatalf logs a formatted message with fatal log level. +func Fatalf(msg string, args ...interface{}) { + logrus.Fatalf(msg, args...) +} + +// Panic logs a message with panic log level. +func Panic(msg string) { + logrus.Panic(msg) +} + +// Panicf logs a formatted message with panic log level. +func Panicf(msg string, args ...interface{}) { + logrus.Panicf(msg, args...) +} diff --git a/fabric-chaincode/main.go b/fabric-chaincode/main.go new file mode 100644 index 00000000..dff8eba0 --- /dev/null +++ b/fabric-chaincode/main.go @@ -0,0 +1,65 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + + "github.com/hyperledger/fabric-chaincode-go/shim" + sc "github.com/hyperledger/fabric-protos-go/peer" +) + +// Chaincode struct +type Chaincode struct { +} + +const logLevel string = "DEBUG" + +// Init is called when the chaincode is instantiated by the blockchain network. +func (cc *Chaincode) Init(stub shim.ChaincodeStubInterface) sc.Response { + log.Init("DEBUG") + log.Infof("[IdentityCC][Init] Initializing identity root") + idReq := IdentityRequest{} + _, args := stub.GetFunctionAndParameters() + + err := json.Unmarshal([]byte(args[0]), &idReq) + + if err != nil { + log.Errorf("[IdentityGateway][CreateIdentity] Error parsing: %v", err.Error()) + } + identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Controller, Access: 0} + _, err = cc.createIDRegistry(stub, idReq.Did, identityStore) + log.Infof("[IdentityCC][Init] Chaincode initialized") + + return shim.Success(nil) +} + +// Invoke is called as a result of an application request to run the chaincode. +func (cc *Chaincode) Invoke(stub shim.ChaincodeStubInterface) sc.Response { + fcn, params := stub.GetFunctionAndParameters() + var err error + var result string + + if fcn == "proxy" { + result, err = cc.checkArgs(stub, params) + } + + if err != nil { + log.Errorf("[IdentityCC][Init] Errror %v", err) + return shim.Error(err.Error()) + } + return shim.Success([]byte(result)) +} + +func main() { + err := shim.Start(new(Chaincode)) + if err != nil { + panic(err) + } +} diff --git a/fabric-chaincode/model.go b/fabric-chaincode/model.go new file mode 100644 index 00000000..d60f44b1 --- /dev/null +++ b/fabric-chaincode/model.go @@ -0,0 +1,76 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +// Request to serialize args +type Request struct { + Did string `json:"did,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + Payload string `json:"payload,omitempty"` // me pasa una firma // el controller lo meto yo +} + +// Identity stored in bc +type Identity struct { + PublicKey string `json:"publicKey"` + Controller string `json:"controller"` // issuer's DID + Access int `json:"access,omitempty"` +} + +// IdentityRequest to serialize args +type IdentityRequest struct { + Did string `json:"did"` + Controller string `json:"controller,omitempty"` + PublicKey string `json:"publicKey,omitempty"` + Payload string `json:"payload,omitempty"` // me pasa una firma // el controller lo meto yo + Access int `json:"access,omitempty"` +} + +// Service stored in bc +type Service struct { + Name string `json:"name"` + Controller string `json:"controller,omitempty"` // issuer's DID + Access map[string]int `json:"access,omitempty"` // mapping did - access type + Public bool `json:"isPublic"` + Channel string `json:"channel"` +} + +// ServiceRequest stored in bc +type ServiceRequest struct { + Name string `json:"name"` + Did string `json:"did"` + Public bool `json:"isPublic"` +} + +// IdentityUnverifiedRequest to serialize args +type IdentityUnverifiedRequest struct { + PublicKey string `json:"publicKey"` + Payload string `json:"payload,omitempty"` // me pasa una firma // el controller lo meto yo +} + +// CcRequest payload from jws +type CcRequest struct { + Name string `json:"name,omitempty"` + Args []string `json:"args"` + Channel string `json:"channel"` + Did string `json:"did"` +} + +// Error responses +// ERROR_XXX occurs when XXX +const ( + ERRORWrongNumberArgs = `Wrong number of arguments. Expecting a JSON with token information.` + ERRORParsingData = `Error parsing data ` + ERRORPutState = `Failed to store data in the ledger. ` + ERRORGetState = `Failed to get data from the ledger. ` + ERRORDelState = `Failed to delete data from the ledger. ` + ERRORChaincodeCall = `Error calling chaincode` + IDGATEWAY = `IDGateway` + IDREGISTRY = `IDRegistry` + ServiceGATEWAY = `IDGateway` + ServiceREGISTRY = `IDRegistry` +) diff --git a/fabric-chaincode/proxy.gateway.go b/fabric-chaincode/proxy.gateway.go new file mode 100644 index 00000000..59a2042d --- /dev/null +++ b/fabric-chaincode/proxy.gateway.go @@ -0,0 +1,92 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + "errors" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) (string, error) { + log.Infof("[%s][checkArgs] Get Identity", IDGATEWAY) + var result string + + idReq := Request{} + err := json.Unmarshal([]byte(args[0]), &idReq) + + var identity *Identity + var publicKey string + if idReq.PublicKey != "" { + publicKey = parseKey(idReq.PublicKey) + params, err := checkSignature(idReq.Payload, publicKey) + if params["function"].(string) == "createSelfIdentity" { + result, err = cc.createSelfIdentity(stub, params["params"]) + + } + return result, err + + } + identity, err = cc.getIDRegistry(stub, idReq.Did) + if err != nil { + log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + return "", err + } + + publicKey = parseKey(identity.PublicKey) + params, err := checkSignature(idReq.Payload, publicKey) + + if params["function"].(string) == "getIdentity" { + result, err = cc.getIdentity(stub, idReq.Did, identity, params["params"]) + + } + if params["function"].(string) == "verifyIdentity" { + result, err = cc.verifyIdentity(stub, idReq.Did, identity, params["params"]) + + } + if params["function"].(string) == "revokeIdentity" { + result, err = cc.revokeIdentity(stub, idReq.Did, identity, params["params"]) + + } + if params["function"].(string) == "createServiceIdentity" { + result, err = cc.createServiceIdentity(stub, idReq.Did, params["params"]) + + } + if params["function"].(string) == "getServiceIdentity" { + result, err = cc.getServiceIdentity(stub, params["params"]) + + } + if params["function"].(string) == "updateServiceAccess" { + result, err = cc.updateServiceAccess(stub, params["params"]) + + } + if params["function"].(string) == "invoke" { + result, err = cc.invoke(stub, idReq.Did, params["params"]) + + } + return result, err + +} + +func checkSignature(payload string, key string) (map[string]interface{}, error) { + message, err := verifySignature(payload, key) + if err != nil { + log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + return nil, errors.New("Error verifying signature" + err.Error()) + } + params := make(map[string]interface{}) + + err = json.Unmarshal(message, ¶ms) + if err != nil { + log.Errorf("[%s][checkArgs] Error parsing: %v", IDGATEWAY, err.Error()) + return nil, errors.New("Error parsing signature") + } + return params, nil +} diff --git a/fabric-chaincode/service.gateway.go b/fabric-chaincode/service.gateway.go new file mode 100644 index 00000000..511bd2c6 --- /dev/null +++ b/fabric-chaincode/service.gateway.go @@ -0,0 +1,76 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +func (cc *Chaincode) createServiceIdentity(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { + var err error + service := make(map[string]interface{}) + service = args.(map[string]interface{}) + + log.Debugf("[%s][createServiceIdentity] Calling to registry", ServiceGATEWAY) + + serviceStore := Service{Name: service["name"].(string), Controller: did, Public: service["isPublic"].(bool)} + + res, err := cc.createServiceRegistry(stub, service["did"].(string), serviceStore) + if err != nil { + log.Errorf("[%s][createServiceIdentity] Error creating service in registry: %v", ServiceGATEWAY, err.Error()) + return "", err + } + + log.Infof("[%s][createServiceIdentity] Everything went ok", ServiceGATEWAY) + return res, nil + +} +func (cc *Chaincode) updateServiceAccess(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { + log.Infof("[%s][updateServiceAccess] Entry in updateServiceAccess", ServiceGATEWAY) + + service := make(map[string]interface{}) + service = args.(map[string]interface{}) + + m := make(map[string]interface{}) // parse access to interact + m = service["access"].(map[string]interface{}) + + result, err := cc.updateRegistryAccess(stub, service["did"].(string), m["did"].(string), int(m["type"].(float64))) + if err != nil { + log.Errorf("[%s][updateServiceAccess] Error updating registry access: %v", ServiceGATEWAY, err.Error()) + log.Errorf("[%s][updateServiceAccess] Return error", ServiceGATEWAY) + return "", err + + } + log.Infof("[%s][updateServiceAccess] Update registry Ok", ServiceGATEWAY) + + return result, nil + +} + +func (cc *Chaincode) getServiceIdentity(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { + var err error + servReq := make(map[string]interface{}) + servReq = args.(map[string]interface{}) + + result, err := cc.getServiceRegistry(stub, servReq["did"].(string)) + + if err != nil { + log.Errorf("[%s][getServiceIdentity] Error getting registry access: %v", ServiceGATEWAY, err.Error()) + log.Errorf("[%s][getServiceIdentity] Return error", ServiceGATEWAY) + return "", err + + } + + log.Infof("[%s][getServiceIdentity]Service to return Name: %s, Controller: %s, is Public %t", ServiceGATEWAY, result.Name, result.Controller, result.Public) + serviceBytes, err := json.Marshal(*result) + return string(serviceBytes), nil + +} diff --git a/fabric-chaincode/service.registry.go b/fabric-chaincode/service.registry.go new file mode 100644 index 00000000..53a5c2d4 --- /dev/null +++ b/fabric-chaincode/service.registry.go @@ -0,0 +1,98 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +package main + +import ( + log "coren-identitycc/src/chaincode/log" + "encoding/json" + "errors" + + "github.com/hyperledger/fabric-chaincode-go/shim" +) + +func (cc *Chaincode) createServiceRegistry(stub shim.ChaincodeStubInterface, did string, service Service) (string, error) { + log.Infof("[%s][createIDRegistry] Create Service for did %s", ServiceREGISTRY, did) + bytes, err := stub.GetState(did) + + if bytes != nil { + log.Errorf("[%s][createServiceRegistry] The service already exists", ServiceREGISTRY) + return "", errors.New("The service already exists in registry") + } + idBytes, err := json.Marshal(service) + + if err != nil { + log.Errorf("[%s][createIDRegistry] Error parsing: %v", ServiceREGISTRY, err.Error()) + return "", errors.New("Error parsing when create ID Registry:" + err.Error()) + } + err = stub.PutState(did, idBytes) + if err != nil { + log.Errorf("[%s][createIDRegistry] Error parsing: %v", ServiceREGISTRY, err.Error()) + return "", errors.New("Error storing in create ID Registry:" + err.Error()) + } + log.Infof("[%s][createIDRegistry] Service created", ServiceREGISTRY) + + return "Service created successfully", nil +} + +func (cc *Chaincode) getServiceRegistry(stub shim.ChaincodeStubInterface, didService string) (*Service, error) { + + log.Infof("[%s][getIDRegistry] Get Service for did %s", ServiceREGISTRY, didService) + idStored := Service{} + idBytes, err := stub.GetState(didService) + if idBytes == nil { + log.Errorf("[%s][createServiceRegistry] The service doesn't exist", ServiceREGISTRY) + return nil, errors.New("The service doesn't exist") + } + if err != nil { + log.Errorf("[%s][getIDRegistry] Error getting service: %v", ServiceREGISTRY, err.Error()) + return nil, errors.New("Error getting service:" + err.Error()) + } + err = json.Unmarshal(idBytes, &idStored) + log.Infof("[%s][getIDRegistry] The service info is %v", ServiceREGISTRY, idStored) + + return &idStored, nil +} + +// func (cc *Chaincode) getServiceRegistryNameAndAcess(stub shim.ChaincodeStubInterface, did string, didService string) (string, int, error) { + +// log.Infof("[%s][getServiceRegistryAcess] Get Service for did %s", ServiceREGISTRY, did) +// service, err := cc.getServiceRegistry(stub, didService) +// if err != nil { +// log.Errorf("[%s][getServiceRegistryAcess] Error getting service: %v", ServiceREGISTRY, err.Error()) + +// return "", 0, errors.New("Error getting service" + err.Error()) +// } +// access := service.Access[did] +// return service.Name, access, nil +// } + +func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didService string, didAccess string, accessType int) (string, error) { + + log.Infof("[%s][updateRegistryAccess] Get Service for did %s", ServiceREGISTRY, didService) + service, err := cc.getServiceRegistry(stub, didService) + if err != nil { + log.Errorf("[%s][updateRegistryAccess] Error getting service: %v", ServiceREGISTRY, err.Error()) + return "", errors.New("Error getting service in update" + err.Error()) + } + if len(service.Access) == 0 { + service.Access = make(map[string]int) + } + + service.Access[didAccess] = accessType + idBytes, err := json.Marshal(service) + if err != nil { + log.Errorf("[%s][updateRegistryAccess] Error parsing: %v", ServiceREGISTRY, err.Error()) + return "", errors.New("Error parsing" + err.Error()) + } + err = stub.PutState(didService, idBytes) + if err != nil { + log.Errorf("[%s][updateRegistryAccess] Error updating service: %v", ServiceREGISTRY, err.Error()) + return "", errors.New("Error updating service" + err.Error()) + } + return "Registry updated sucessfully", nil +} From 940efe945c82668b7887c5ec40339546d252e3b2 Mon Sep 17 00:00:00 2001 From: Maritere Nieto Date: Mon, 8 Jun 2020 15:32:51 +0200 Subject: [PATCH 03/25] Updated readme Signed-off-by: Maria Teresa Nieto --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4d8d60f..acd10d3c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # TrustID This repo include two components: - [Trustid-sdk](trustid-sdk/README.md): SDK based in javascript to interact with the trustId solution. -- [Fabric-chaincode](fabric-chaincode/README.md): Chaincode based in Hyperledger Fabric that implements trustId.(trustid-sdk/README.md) +- [Fabric-chaincode](fabric-chaincode/README.md): Chaincode based in Hyperledger Fabric that implements trustId. The chaincode has to be deployed in a Hyperledger Fabrc network + From b42241a875d38c3dd2e8d75435f2516b20a6403c Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Galan Date: Mon, 8 Jun 2020 16:03:36 +0200 Subject: [PATCH 04/25] contributors file Signed-off-by: Maria Teresa Nieto --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 6 ++ 2 files changed, 207 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..8dada3ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index acd10d3c..d248eff9 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,9 @@ This repo include two components: - [Fabric-chaincode](fabric-chaincode/README.md): Chaincode based in Hyperledger Fabric that implements trustId. The chaincode has to be deployed in a Hyperledger Fabrc network +## License + +Hyperledger Project source code files are made available under the Apache +License, Version 2.0 (Apache-2.0), located in the [LICENSE](LICENSE) file. +The files are made available under the Creative +Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/. \ No newline at end of file From 2e3eaaae282c953d10c48d8503898c64c748d4e2 Mon Sep 17 00:00:00 2001 From: Alfonso de la Rocha Date: Thu, 2 Jul 2020 08:24:22 +0200 Subject: [PATCH 05/25] Migrated private repo (#13) Co-authored-by: Ry Jones From bf3718ef32427b2c7629915b8174a50dfb8a1a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Mon, 20 Jul 2020 16:59:58 +0200 Subject: [PATCH 06/25] Updated Controllers and contributors (#16) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added contributing file Co-authored-by: adlrocha Co-authored-by: Ry Jones --- CONTRIBUTING.md | 34 + README.md | 4 +- fabric-chaincode/.gitignore | 1 + fabric-chaincode/Dockerfile | 19 + fabric-chaincode/chaincode.gateway.go | 56 +- fabric-chaincode/chaincode_test.go | 4 - fabric-chaincode/go.mod | 1 - fabric-chaincode/id.gateway.go | 25 +- fabric-chaincode/id.registry.go | 12 +- fabric-chaincode/log/logger.go | 8 + fabric-chaincode/main.go | 20 +- fabric-chaincode/model.go | 50 +- fabric-chaincode/proxy.gateway.go | 6 +- fabric-chaincode/service.gateway.go | 20 +- fabric-chaincode/service.registry.go | 41 +- trustid-sdk/.gitignore | 5 + trustid-sdk/.tslintrc.yml | 28 + trustid-sdk/README.md | 42 +- trustid-sdk/connection-profile.json | 205 ++ trustid-sdk/dist/index.d.ts | 6 - trustid-sdk/dist/index.js | 21 - .../dist/src/keystore/fileKeystore.d.ts | 16 - trustid-sdk/dist/src/keystore/fileKeystore.js | 172 -- trustid-sdk/dist/src/keystore/keystore.d.ts | 15 - trustid-sdk/dist/src/keystore/keystore.js | 24 - .../src/keystore/localStorageKeystore.d.ts | 10 - .../dist/src/keystore/localStorageKeystore.js | 108 -- .../dist/src/keystore/mongoKeystore.d.ts | 12 - .../dist/src/keystore/mongoKeystore.js | 155 -- trustid-sdk/dist/src/network/driver.d.ts | 10 - trustid-sdk/dist/src/network/driver.js | 21 - trustid-sdk/dist/src/network/hfdriver.d.ts | 21 - trustid-sdk/dist/src/network/hfdriver.js | 195 -- trustid-sdk/dist/src/network/trustHF.d.ts | 43 - trustid-sdk/dist/src/network/trustHF.js | 391 ---- .../dist/src/network/trustInterface.d.ts | 18 - .../dist/src/network/trustInterface.js | 9 - trustid-sdk/dist/src/wallet.d.ts | 55 - trustid-sdk/dist/src/wallet.js | 282 --- trustid-sdk/dist/test/fileKeystore.spec.d.ts | 1 - trustid-sdk/dist/test/fileKeystore.spec.js | 80 - trustid-sdk/dist/test/hfdiver.spec.d.ts | 1 - trustid-sdk/dist/test/hfdiver.spec.js | 466 ----- trustid-sdk/dist/test/integration/test.d.ts | 1 - trustid-sdk/dist/test/integration/test.js | 149 -- trustid-sdk/dist/test/trustHF.spec.d.ts | 1 - trustid-sdk/dist/test/trustHF.spec.js | 699 ------- trustid-sdk/dist/test/wallet.spec.d.ts | 1 - trustid-sdk/dist/test/wallet.spec.js | 171 -- trustid-sdk/index.ts | 6 +- trustid-sdk/package-lock.json | 1692 ++++++----------- trustid-sdk/package.json | 2 +- trustid-sdk/sonar-project.properties | 20 + trustid-sdk/src/network/trustHF.ts | 36 +- trustid-sdk/src/network/trustInterface.ts | 22 +- trustid-sdk/src/wallet.ts | 11 +- trustid-sdk/test/integration/test.ts | 118 ++ trustid-sdk/test/trustHF.spec.ts | 26 +- 58 files changed, 1253 insertions(+), 4415 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 fabric-chaincode/.gitignore create mode 100644 fabric-chaincode/Dockerfile create mode 100644 trustid-sdk/.gitignore create mode 100644 trustid-sdk/.tslintrc.yml create mode 100644 trustid-sdk/connection-profile.json delete mode 100644 trustid-sdk/dist/index.d.ts delete mode 100644 trustid-sdk/dist/index.js delete mode 100644 trustid-sdk/dist/src/keystore/fileKeystore.d.ts delete mode 100644 trustid-sdk/dist/src/keystore/fileKeystore.js delete mode 100644 trustid-sdk/dist/src/keystore/keystore.d.ts delete mode 100644 trustid-sdk/dist/src/keystore/keystore.js delete mode 100644 trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts delete mode 100644 trustid-sdk/dist/src/keystore/localStorageKeystore.js delete mode 100644 trustid-sdk/dist/src/keystore/mongoKeystore.d.ts delete mode 100644 trustid-sdk/dist/src/keystore/mongoKeystore.js delete mode 100644 trustid-sdk/dist/src/network/driver.d.ts delete mode 100644 trustid-sdk/dist/src/network/driver.js delete mode 100644 trustid-sdk/dist/src/network/hfdriver.d.ts delete mode 100644 trustid-sdk/dist/src/network/hfdriver.js delete mode 100644 trustid-sdk/dist/src/network/trustHF.d.ts delete mode 100644 trustid-sdk/dist/src/network/trustHF.js delete mode 100644 trustid-sdk/dist/src/network/trustInterface.d.ts delete mode 100644 trustid-sdk/dist/src/network/trustInterface.js delete mode 100644 trustid-sdk/dist/src/wallet.d.ts delete mode 100644 trustid-sdk/dist/src/wallet.js delete mode 100644 trustid-sdk/dist/test/fileKeystore.spec.d.ts delete mode 100644 trustid-sdk/dist/test/fileKeystore.spec.js delete mode 100644 trustid-sdk/dist/test/hfdiver.spec.d.ts delete mode 100644 trustid-sdk/dist/test/hfdiver.spec.js delete mode 100644 trustid-sdk/dist/test/integration/test.d.ts delete mode 100644 trustid-sdk/dist/test/integration/test.js delete mode 100644 trustid-sdk/dist/test/trustHF.spec.d.ts delete mode 100644 trustid-sdk/dist/test/trustHF.spec.js delete mode 100644 trustid-sdk/dist/test/wallet.spec.d.ts delete mode 100644 trustid-sdk/dist/test/wallet.spec.js create mode 100644 trustid-sdk/sonar-project.properties create mode 100755 trustid-sdk/test/integration/test.ts diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..be98fc32 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing to TrustID + +TrustID is Apache 2.0 licensed and accepts contributions via +[GitHub](https://github.com/hyperledger-labs/TrustID) pull requests. + +# Ways to contribute to TrustID + +- Bugs or issues: Report problems or defects found to the [Issues tab](https://github.com/hyperledger-labs/TrustID/issues) +- Features and enhancements: Provide expanded capabilities or optimizations +- Documentation: Improve existing documentation or create new information +- Tests for events and results: + - Functional + - Performance + - Usability + - Security + - Localization + +# The Commit Process + +When contributing code, please follow these guidelines: + +- Fork the repository and make your changes in a feature branch +- Include unit and integration tests for any new features and updates to existing tests +- Ensure that the unit and integration tests run successfully. +- Check that the lint tests pass + +## Important +Use `git rebase origin/master` to limit creating merge commits + +## Signed-off-by +Each commit must include a "Signed-off-by" line in the commit message (`git commit -s`). This sign-off indicates that you agree the commit satifies the [Developer Certificate of Origin](https://developercertificate.org). + +## Commit Email Address +Your commit email address must match your GitHub or GitLab email address. For more information, see https://help.github.com/articles/setting-your-commit-email-address-in-git/. \ No newline at end of file diff --git a/README.md b/README.md index d248eff9..c1289a62 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # TrustID This repo include two components: -- [Trustid-sdk](trustid-sdk/README.md): SDK based in javascript to interact with the trustId solution. -- [Fabric-chaincode](fabric-chaincode/README.md): Chaincode based in Hyperledger Fabric that implements trustId. The chaincode has to be deployed in a Hyperledger Fabrc network +- [Trustid-sdk](trustid-sdk/): SDK based in javascript to interact with the trustId solution. +- [Fabric-chaincode](fabric-chaincode/): Chaincode based in Hyperledger Fabric that implements trustId. The chaincode has to be deployed in a Hyperledger Fabric network ## License diff --git a/fabric-chaincode/.gitignore b/fabric-chaincode/.gitignore new file mode 100644 index 00000000..a725465a --- /dev/null +++ b/fabric-chaincode/.gitignore @@ -0,0 +1 @@ +vendor/ \ No newline at end of file diff --git a/fabric-chaincode/Dockerfile b/fabric-chaincode/Dockerfile new file mode 100644 index 00000000..884a1ac6 --- /dev/null +++ b/fabric-chaincode/Dockerfile @@ -0,0 +1,19 @@ +# This image is a microservice in golang for the Degree chaincode +FROM golang:1.13.8-alpine AS build + +COPY ./ /go/src/github.com/coren-identitycc +WORKDIR /go/src/github.com/coren-identitycc + +# Build application +RUN go build -o chaincode -v . + +# Production ready image +# Pass the binary to the prod image +FROM alpine:3.11 as prod + +COPY --from=build /go/src/github.com/coren-identitycc/chaincode /app/chaincode + +USER 1000 + +WORKDIR /app +CMD ./chaincode diff --git a/fabric-chaincode/chaincode.gateway.go b/fabric-chaincode/chaincode.gateway.go index 40e892ec..78fadb82 100644 --- a/fabric-chaincode/chaincode.gateway.go +++ b/fabric-chaincode/chaincode.gateway.go @@ -25,37 +25,45 @@ func toChaincodeArgs(args ...string) [][]byte { return ccArgs } -func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { +func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, userDID string, args interface{}) (string, error) { log.Infof("[%s][invoke] Invoke chaincode", proxyGateway) interact := make(map[string]interface{}) interact = args.(map[string]interface{}) - log.Debugf("[%s][invoke] Check access to interact for did: %s and service: %s", proxyGateway, did, interact["did"].(string)) - service, err := cc.getServiceRegistry(stub, did) + if interact["did"] == nil { + log.Errorf("[%s][invoke]*** Error calling service, no service DID Specified", proxyGateway) + return "", errors.New("Error calling service, no service DID Specified") + } + + log.Debugf("[%s][invoke] Check access to interact for did: %s and service: %s", proxyGateway, userDID, interact["did"].(string)) + service, err := cc.getServiceRegistry(stub, interact["did"].(string)) + if err != nil { + log.Errorf("[%s][invoke]*** Error calling service: ", err.Error()) + return "", err + } ccName := service.Name - checkAccess := service.Access[interact["did"].(string)] channel := service.Channel - log.Debugf("[%s][invoke] Access for did: %s and service: %d", proxyGateway, interact["did"].(string), checkAccess) + log.Debugf("[%s][invoke] Access for did: %s and service: %s", proxyGateway, userDID, interact["did"].(string)) if err != nil { log.Errorf("[%s][invoke]*** Error calling service, problem getting service", err.Error()) return "", err } - if checkAccess < 4 { - log.Debugf("[%s][invoke] Did: %s has access to service %s, invoking cc", proxyGateway, did, interact["did"].(string)) + + if cc.hasAccess(stub, service, userDID) { + log.Debugf("[%s][invoke] Did: %s has access to service %s, invoking cc", proxyGateway, userDID, interact["did"].(string)) log.Debugf("[%s][invoke] Interact for chaincode %s args are %v", proxyGateway, ccName, interact["args"]) s := make([]string, len(interact["args"].([]interface{}))) for i, v := range interact["args"].([]interface{}) { s[i] = fmt.Sprint(v) } - s = append(s, did) + s = append(s, userDID) argBytes := toChaincodeArgs(s...) response := stub.InvokeChaincode(ccName, argBytes, channel) if response.Status != shim.OK { - fmt.Printf("%v%", string(response.Payload)) - log.Debugf("[%s][invoke] Error invoking chaincode %s", proxyGateway, string(response.Payload)) - return "", errors.New(string(response.Payload)) + log.Debugf("[%s][invoke] Error invoking chaincode %s", proxyGateway, response.Message) + return "", errors.New(response.Message) } log.Debugf("[%s][invoke] Invoke OK, returning result", proxyGateway) log.Infof("%v", response.Payload) @@ -63,8 +71,32 @@ func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, did string, args i return string(response.Payload), nil } - log.Errorf("[%s][invoke] User %s has not access to this resources", proxyGateway, did) + log.Errorf("[%s][invoke] User %s has not access to this resources", proxyGateway, userDID) err = errors.New("User has not access") return "", err } + +// hasAccess implements the logic to determine if a user +// has access to a service +func (cc *Chaincode) hasAccess(stub shim.ChaincodeStubInterface, service *Service, userDid string) bool { + idReturn, err := cc.getIDRegistry(stub, userDid) + if err != nil { + log.Errorf("[%s][checkAccess] Error getting access policy %s ", proxyGateway, userDid) + return false + } + switch service.Access.Policy { + case PublicPolicy: + return true + case SameControllerPolicy: + if service.Controller == idReturn.Controller { + return true + } + case FineGrainedPolicy: + userLevel := service.Access.Registry[userDid] + if userLevel >= service.Access.Threshold { + return true + } + } + return false +} diff --git a/fabric-chaincode/chaincode_test.go b/fabric-chaincode/chaincode_test.go index 0d373a92..3a7f45b5 100644 --- a/fabric-chaincode/chaincode_test.go +++ b/fabric-chaincode/chaincode_test.go @@ -31,13 +31,9 @@ func TestIdenity(t *testing.T) { CreateUnverifiedIdentity(t, stub, invokeReq) }) t.Run("GetIdentity", func(t *testing.T) { - fmt.Printf("FALLA???") - verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImdldElkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.Zs1qPx3f6pgeoYOJCzFo51MeBGlEXYPtPMTxVI-ACeGJbA6hu8iBz_wCV-dVlvkvFRyKavhuOrxeh9Qo1PlQqhxPdDtiPN1CjqGrzYSFQZElTJUAwU2c9Qckui440z9riwLcxF5XnSOurNelZ1Z6-CLr5WZ_DB80K4fcf6ngX00450oSZgMIvuveuQJtFyzmIK91arMCy-bp9aUj8cYb8b7hGn0ahk2u7l-bUUSvTzxtdhjilApKvGy6YGnNxZ6-S321FntudCgvOOKfzVMPVeE7138F3xNmMWcGoeqbX315_lKjA15P3t0naSXUWkQejPFhac5YivJMjARhDM_THg" invokeReq := Request{Did: "did:vtn:trustos:telefonica:2", Payload: verPayload} GetUnverifiedIdentity(t, stub, invokeReq) - fmt.Printf("FALLA???") - }) t.Run("Verify Idenitity", func(t *testing.T) { verPayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6InZlcmlmeUlkZW50aXR5IiwicGFyYW1zIjp7ImRpZCI6ImRpZDp2dG46dHJ1c3Rvczp0ZWxlZm9uaWNhOjIifX0.JfKl8qeO1nTPQaPS00Td3ksOtQBhzHQgaqmX2Ojz5Mvu45SiGT2KEOsR8SZheuHuFBPgdq7Mu8BRwjbUMmATIZugM-uZdmwZF0HPPMQB7GikW-EiTCOU_rwKCKAEgINLtanXsOEK75XJ_QPUewYe2Fwn7SVt-sDk9ufIJXIL2f5gw9Kjp3gNjGCAmc4bUSMNlUM7XENxo6oq6HuWzEOU9SnLLxIBMDO1fhD639q13xA4XDGW7QavaBcalFDBAvzhKjcmcDlh0c5vL66V168mAXWq0wx_Rja-Sgj8zkGTGgdzBuMVkY-DAvca2UQbGod38BVqMWMbsFM4SfpSFVCIYQ" diff --git a/fabric-chaincode/go.mod b/fabric-chaincode/go.mod index 911d0bdd..40d5cefd 100644 --- a/fabric-chaincode/go.mod +++ b/fabric-chaincode/go.mod @@ -5,7 +5,6 @@ go 1.12 require ( github.com/fsouza/go-dockerclient v1.6.5 // indirect github.com/go-logfmt/logfmt v0.4.0 // indirect - github.com/hyperledger/fabric v1.4.4 github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a // indirect github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a github.com/hyperledger/fabric-lib-go v1.0.0 // indirect diff --git a/fabric-chaincode/id.gateway.go b/fabric-chaincode/id.gateway.go index 270bde8f..02d09ac0 100644 --- a/fabric-chaincode/id.gateway.go +++ b/fabric-chaincode/id.gateway.go @@ -45,15 +45,18 @@ func (cc *Chaincode) getIdentity(stub shim.ChaincodeStubInterface, did string, i return string(idBytes), nil } -func (cc *Chaincode) createIdentity(stub shim.ChaincodeStubInterface, args []string) (string, error) { - idReq := IdentityRequest{} - err := json.Unmarshal([]byte(args[0]), &idReq) +func (cc *Chaincode) createIdentity(stub shim.ChaincodeStubInterface, controller string, args interface{}) (string, error) { + idReq := make(map[string]interface{}) + idReq = args.(map[string]interface{}) + log.Debugf("[%s][createIdentity] Calling to registry", IDGATEWAY) + + identityStore := Identity{PublicKey: idReq["publicKey"].(string), Controller: controller} + _, err := cc.createIDRegistry(stub, idReq["did"].(string), identityStore) if err != nil { - log.Errorf("[%s][CreateIdentity] Error parsing: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][createIdentity] Error creating Identity: %v", IDGATEWAY, err.Error()) + return "", err } - identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Did} - _, err = cc.createIDRegistry(stub, idReq.Did, identityStore) return "", nil @@ -80,7 +83,7 @@ func (cc *Chaincode) verifyIdentity(stub shim.ChaincodeStubInterface, did string log.Infof("[%s][verifyIdentity] Idenitity has access %v", IDGATEWAY, identity.Access) - if identity.Access == 0 { + if identity.Access != 4 { log.Errorf("[%s][verifyIdentity] Identity has not access to verify", IDGATEWAY) return "", errors.New("Verification unauthorized, the did provided has not access") } @@ -92,7 +95,7 @@ func (cc *Chaincode) verifyIdentity(stub shim.ChaincodeStubInterface, did string } log.Infof("[%s][verifyIdentity]Idenitity updated", IDGATEWAY) - return "", nil + return "The Identity has been verified", nil } @@ -102,18 +105,18 @@ func (cc *Chaincode) revokeIdentity(stub shim.ChaincodeStubInterface, did string idReq := make(map[string]interface{}) idReq = args.(map[string]interface{}) - if identity.Access == 0 { + if identity.Access != 4 { log.Errorf("[%s][revokeIdentity] Identity has not access to revoke", IDGATEWAY) return "", errors.New("Identity has not access to revoke") } _, err = cc.revokeIDRegistry(stub, idReq["did"].(string), did) if err != nil { - log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][revokeIdentity] Error revoking signature: %v", IDGATEWAY, err.Error()) return "", err } log.Infof("[%s][revokeIdentity]Idenitity revoked", IDGATEWAY) - return "", nil + return "Identity revoked successfully", nil } diff --git a/fabric-chaincode/id.registry.go b/fabric-chaincode/id.registry.go index f61f4f0d..46ff9b25 100644 --- a/fabric-chaincode/id.registry.go +++ b/fabric-chaincode/id.registry.go @@ -11,6 +11,7 @@ import ( log "coren-identitycc/src/chaincode/log" "encoding/json" "errors" + "fmt" "github.com/hyperledger/fabric-chaincode-go/shim" ) @@ -71,7 +72,7 @@ func (cc *Chaincode) updateIDRegistry(stub shim.ChaincodeStubInterface, did stri identity, err := cc.getIDRegistry(stub, did) if err != nil { log.Errorf("[%s][updateIDRegistry] Problem getting identity: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error getting identity:" + err.Error()) + return "", errors.New("Error getting identity: " + err.Error()) } identity.Controller = didController @@ -84,7 +85,7 @@ func (cc *Chaincode) updateIDRegistry(stub shim.ChaincodeStubInterface, did stri err = stub.PutState(did, idBytes) if err != nil { log.Errorf("[%s][updateIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error updatin in the ledger" + err.Error()) + return "", errors.New("Error updating in the ledger" + err.Error()) } log.Infof("[%s][updateIDRegistry] Identity updated", IDREGISTRY) @@ -95,8 +96,9 @@ func (cc *Chaincode) revokeIDRegistry(stub shim.ChaincodeStubInterface, did stri identity, err := cc.getIDRegistry(stub, did) if err != nil { log.Errorf("[%s][revokeIDRegistry] Problem checking identity: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error in revoke" + err.Error()) + return "", errors.New("Error in revoke: " + err.Error()) } + fmt.Printf(didController) if identity.Controller != didController { err := errors.New("Unauthorized: The did provided has not access to revoke the identity") log.Errorf("[%s][revokeIDRegistry] This is not the identity controller: %v", IDREGISTRY, err.Error()) @@ -109,7 +111,7 @@ func (cc *Chaincode) revokeIDRegistry(stub shim.ChaincodeStubInterface, did stri log.Errorf("[%s][revokeIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) return "", errors.New("Error deleting from ledger" + err.Error()) } - log.Infof("[%s][updateIDRegistry] Identity revoked successfully", IDREGISTRY) + log.Infof("[%s][revokeIDRegistry] Identity revoked successfully", IDREGISTRY) - return "", nil + return "Identity revoked successfully", nil } diff --git a/fabric-chaincode/log/logger.go b/fabric-chaincode/log/logger.go index b8d14f99..ba43b42c 100644 --- a/fabric-chaincode/log/logger.go +++ b/fabric-chaincode/log/logger.go @@ -1,3 +1,11 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ + package util import ( diff --git a/fabric-chaincode/main.go b/fabric-chaincode/main.go index dff8eba0..0e5a5230 100644 --- a/fabric-chaincode/main.go +++ b/fabric-chaincode/main.go @@ -33,7 +33,7 @@ func (cc *Chaincode) Init(stub shim.ChaincodeStubInterface) sc.Response { if err != nil { log.Errorf("[IdentityGateway][CreateIdentity] Error parsing: %v", err.Error()) } - identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Controller, Access: 0} + identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Controller, Access: 4} _, err = cc.createIDRegistry(stub, idReq.Did, identityStore) log.Infof("[IdentityCC][Init] Chaincode initialized") @@ -42,6 +42,7 @@ func (cc *Chaincode) Init(stub shim.ChaincodeStubInterface) sc.Response { // Invoke is called as a result of an application request to run the chaincode. func (cc *Chaincode) Invoke(stub shim.ChaincodeStubInterface) sc.Response { + log.Init("DEBUG") fcn, params := stub.GetFunctionAndParameters() var err error var result string @@ -58,6 +59,23 @@ func (cc *Chaincode) Invoke(stub shim.ChaincodeStubInterface) sc.Response { } func main() { + + // server := &shim.ChaincodeServer{ + // CCID: os.Getenv("CHAINCODE_CCID"), + // Address: os.Getenv("CHAINCODE_ADDRESS"), + // CC: new(Chaincode), + // TLSProps: shim.TLSProperties{ + // Disabled: true, + // }, + // } + + // // Start the chaincode external server + // err := server.Start() + + // if err != nil { + // log.Errorf("Error starting chaincode: %s", err) + // } + err := shim.Start(new(Chaincode)) if err != nil { panic(err) diff --git a/fabric-chaincode/model.go b/fabric-chaincode/model.go index d60f44b1..93c58243 100644 --- a/fabric-chaincode/model.go +++ b/fabric-chaincode/model.go @@ -25,25 +25,49 @@ type Identity struct { type IdentityRequest struct { Did string `json:"did"` Controller string `json:"controller,omitempty"` - PublicKey string `json:"publicKey,omitempty"` + PublicKey string `json:"publicKey"` Payload string `json:"payload,omitempty"` // me pasa una firma // el controller lo meto yo Access int `json:"access,omitempty"` } // Service stored in bc type Service struct { - Name string `json:"name"` - Controller string `json:"controller,omitempty"` // issuer's DID - Access map[string]int `json:"access,omitempty"` // mapping did - access type - Public bool `json:"isPublic"` - Channel string `json:"channel"` + Name string `json:"name"` + Controller string `json:"controller,omitempty"` // issuer's DID + // Access map[string]int `json:"access,omitempty"` // mapping did - access type + Access AccessPolicy `json:"access,omitempty"` // issuer's DID + // Access map[string]int `json:"access,omit + // TODO: Remove, it will be included in the access policy + + Channel string `json:"channel"` +} + +// PolicyType .. +type PolicyType string + +const ( + // PublicPolicy the service is public + PublicPolicy PolicyType = "PUBLIC" + // SameControllerPolicy the controller service must be equal to the did's controller that is invoking the service + SameControllerPolicy = "SAME_CONTROLLER" + // FineGrainedPolicy anyone with access can interact + FineGrainedPolicy = "FINE_GRAINED" + // TODO: You can add additional PolicyTypes. Remember to add verification + // logic in hasAccess from chaincode.gateway.go. +) + +// AccessPolicy policy +type AccessPolicy struct { + Policy PolicyType `json:"policy"` + Threshold int `json:"threshold,omitempty"` + Registry map[string]int `json:"registry,omitempty"` } // ServiceRequest stored in bc type ServiceRequest struct { - Name string `json:"name"` - Did string `json:"did"` - Public bool `json:"isPublic"` + Name string `json:"name"` + Did string `json:"did"` + Access AccessPolicy `json:"access,omitempty"` } // IdentityUnverifiedRequest to serialize args @@ -69,8 +93,8 @@ const ( ERRORGetState = `Failed to get data from the ledger. ` ERRORDelState = `Failed to delete data from the ledger. ` ERRORChaincodeCall = `Error calling chaincode` - IDGATEWAY = `IDGateway` - IDREGISTRY = `IDRegistry` - ServiceGATEWAY = `IDGateway` - ServiceREGISTRY = `IDRegistry` + IDGATEWAY = `ID Gateway` + IDREGISTRY = `ID Registry` + ServiceGATEWAY = `ID Service Gateway` + ServiceREGISTRY = `ID Service Registry` ) diff --git a/fabric-chaincode/proxy.gateway.go b/fabric-chaincode/proxy.gateway.go index 59a2042d..2d69e3ab 100644 --- a/fabric-chaincode/proxy.gateway.go +++ b/fabric-chaincode/proxy.gateway.go @@ -58,13 +58,17 @@ func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) if params["function"].(string) == "createServiceIdentity" { result, err = cc.createServiceIdentity(stub, idReq.Did, params["params"]) + } + if params["function"].(string) == "createIdentity" { + result, err = cc.createIdentity(stub, idReq.Did, params["params"]) + } if params["function"].(string) == "getServiceIdentity" { result, err = cc.getServiceIdentity(stub, params["params"]) } if params["function"].(string) == "updateServiceAccess" { - result, err = cc.updateServiceAccess(stub, params["params"]) + result, err = cc.updateServiceAccess(stub, idReq.Did, params["params"]) } if params["function"].(string) == "invoke" { diff --git a/fabric-chaincode/service.gateway.go b/fabric-chaincode/service.gateway.go index 511bd2c6..f76a9d7b 100644 --- a/fabric-chaincode/service.gateway.go +++ b/fabric-chaincode/service.gateway.go @@ -20,8 +20,13 @@ func (cc *Chaincode) createServiceIdentity(stub shim.ChaincodeStubInterface, did service = args.(map[string]interface{}) log.Debugf("[%s][createServiceIdentity] Calling to registry", ServiceGATEWAY) + log.Debugf("[%s][createServiceIdentity] ****The service store is %v", ServiceGATEWAY, args) - serviceStore := Service{Name: service["name"].(string), Controller: did, Public: service["isPublic"].(bool)} + serviceStore := Service{Name: service["name"].(string), Controller: did, Channel: service["channel"].(string)} + access := AccessPolicy{} + accessBt, _ := json.Marshal(service["access"]) + json.Unmarshal(accessBt, &access) + serviceStore.updateAccess(access) res, err := cc.createServiceRegistry(stub, service["did"].(string), serviceStore) if err != nil { @@ -33,16 +38,19 @@ func (cc *Chaincode) createServiceIdentity(stub shim.ChaincodeStubInterface, did return res, nil } -func (cc *Chaincode) updateServiceAccess(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { +func (cc *Chaincode) updateServiceAccess(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { log.Infof("[%s][updateServiceAccess] Entry in updateServiceAccess", ServiceGATEWAY) service := make(map[string]interface{}) service = args.(map[string]interface{}) - m := make(map[string]interface{}) // parse access to interact - m = service["access"].(map[string]interface{}) + // m := make(map[string]interface{}) // parse access to interact + access := AccessPolicy{} + accessBt, _ := json.Marshal(service["access"]) + json.Unmarshal(accessBt, &access) + // m = service["access"].(AccessPolicy) - result, err := cc.updateRegistryAccess(stub, service["did"].(string), m["did"].(string), int(m["type"].(float64))) + result, err := cc.updateRegistryAccess(stub, did, service["did"].(string), access) if err != nil { log.Errorf("[%s][updateServiceAccess] Error updating registry access: %v", ServiceGATEWAY, err.Error()) log.Errorf("[%s][updateServiceAccess] Return error", ServiceGATEWAY) @@ -69,7 +77,7 @@ func (cc *Chaincode) getServiceIdentity(stub shim.ChaincodeStubInterface, args i } - log.Infof("[%s][getServiceIdentity]Service to return Name: %s, Controller: %s, is Public %t", ServiceGATEWAY, result.Name, result.Controller, result.Public) + log.Infof("[%s][getServiceIdentity]Service to return Name: %s, Controller: %s, Access: %v", ServiceGATEWAY, result.Name, result.Controller, result.Access) serviceBytes, err := json.Marshal(*result) return string(serviceBytes), nil diff --git a/fabric-chaincode/service.registry.go b/fabric-chaincode/service.registry.go index 53a5c2d4..4164b683 100644 --- a/fabric-chaincode/service.registry.go +++ b/fabric-chaincode/service.registry.go @@ -44,8 +44,9 @@ func (cc *Chaincode) getServiceRegistry(stub shim.ChaincodeStubInterface, didSer log.Infof("[%s][getIDRegistry] Get Service for did %s", ServiceREGISTRY, didService) idStored := Service{} idBytes, err := stub.GetState(didService) - if idBytes == nil { - log.Errorf("[%s][createServiceRegistry] The service doesn't exist", ServiceREGISTRY) + + if len(idBytes) == 0 { + log.Errorf("[%s][getIDRegistry] The service doesn't exist", ServiceREGISTRY) return nil, errors.New("The service doesn't exist") } if err != nil { @@ -71,7 +72,7 @@ func (cc *Chaincode) getServiceRegistry(stub shim.ChaincodeStubInterface, didSer // return service.Name, access, nil // } -func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didService string, didAccess string, accessType int) (string, error) { +func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didController string, didService string, accessPolicy AccessPolicy) (string, error) { log.Infof("[%s][updateRegistryAccess] Get Service for did %s", ServiceREGISTRY, didService) service, err := cc.getServiceRegistry(stub, didService) @@ -79,11 +80,14 @@ func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didS log.Errorf("[%s][updateRegistryAccess] Error getting service: %v", ServiceREGISTRY, err.Error()) return "", errors.New("Error getting service in update" + err.Error()) } - if len(service.Access) == 0 { - service.Access = make(map[string]int) + if didController != service.Controller { + log.Errorf("[%s][updateRegistryAccess] User has not access to update Registry") + return "", errors.New("User has not access to update de service") } - service.Access[didAccess] = accessType + // service.Access[didAccess] = accessType + service.updateAccess(accessPolicy) + idBytes, err := json.Marshal(service) if err != nil { log.Errorf("[%s][updateRegistryAccess] Error parsing: %v", ServiceREGISTRY, err.Error()) @@ -96,3 +100,28 @@ func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didS } return "Registry updated sucessfully", nil } + +func (s *Service) updateAccess(newAccess AccessPolicy) { + + if newAccess.Policy == "" { + s.Access = AccessPolicy{Policy: PublicPolicy} + return + } + + //TODO: Update a bit smarter. + // If + switch newAccess.Policy { + case SameControllerPolicy: + s.Access = newAccess + case FineGrainedPolicy: + // Update threshold if present + s.Access.Threshold = newAccess.Threshold + s.Access.Policy = newAccess.Policy + // Update in service the keys that are present. + for k, v := range newAccess.Registry { + s.Access.Registry[k] = v + } + default: + s.Access = AccessPolicy{Policy: PublicPolicy} + } +} diff --git a/trustid-sdk/.gitignore b/trustid-sdk/.gitignore new file mode 100644 index 00000000..86a7cbcd --- /dev/null +++ b/trustid-sdk/.gitignore @@ -0,0 +1,5 @@ +dist/ + +node_modules/ + + diff --git a/trustid-sdk/.tslintrc.yml b/trustid-sdk/.tslintrc.yml new file mode 100644 index 00000000..bb7b6428 --- /dev/null +++ b/trustid-sdk/.tslintrc.yml @@ -0,0 +1,28 @@ +env: + node: true + commonjs: true + es6: true +extends: 'eslint:recommended' +parser: '@typescript-eslint/parser' +plugins: + - '@typescript-eslint' +parserOptions: + sourceType: module + ecmaVersion: 2017 +rules: + indent: + - error + - tab + linebreak-style: + - off + quotes: + - off + semi: + - error + - never + no-useless-escape: + - warn + no-console: + - off + no-var: + - error \ No newline at end of file diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md index 9de9440a..dfa5ef83 100644 --- a/trustid-sdk/README.md +++ b/trustid-sdk/README.md @@ -7,15 +7,15 @@ TRUSTID-based DLT networks. ### Install * To install this library you need access to the private repo: ``` -npm install core-id-sdk +$ npm install @hyperledger-labs/trustid-sdk@1.0.0 ``` ### Example of use ```js // Use library -var id = require('coren-id-sdk') -import { Keystore } from './keystore/keystore'; - +var id = require('trustid-sdk') +import { TrustIdHf, Keystore, FileKeystore } from 'trustid-sdk'; +import {AccessPolicy, PolicyType} from 'trustid-sdk'; // Initialize wallet wal = id.Wallet.Instance; @@ -30,8 +30,8 @@ wal.setKeystore(ks) let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); let config = { stateStore: '/tmp/statestore', - caURL: 'https://ca.org1.example.com:7054', - caName: 'ca.org1.example.com', + caURL: 'https://ca.org1.telefonica.com:7054', + caName: 'ca.org1.telefonica.com', caAdmin: 'adminCA', caPassword: 'adminpw', tlsOptions: { @@ -44,7 +44,7 @@ let config = { ccp: ccp, chaincodeName: "identitycc", fcn: "proxy", - channel: "examplechannel" + channel: "telefonicachannel" } const trustID = new TrustIdHf(config); @@ -55,7 +55,10 @@ await wal.networks["hf"].configureDriver(); wal.generateDID("RSA") await wal.networks["hf"].createIdentity(wal.getDID("default")) await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); -await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", true); + +let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; + +await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", access, "mychannel"); ``` @@ -76,7 +79,7 @@ exposes the following methods: * `public pubkey: string`: PublicKey of the DID. * `public type: string`: Key type (RSA / EC / OKP). * `public controller: string`: Verifier of the identity - * `public access: number`: Access level + * `public access: number`: Access level. This is the access level to be checked in the service AccessPolicy threshold. * `private privkey: string`: Private Key of the DID. And exposes the following functions: @@ -85,7 +88,7 @@ exposes the following methods: * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. -* `driver.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is +* `trustInterface.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is the `hfdriver.ts` enabling the interaction with Hyperledger Fabric TrustID networks. @@ -94,11 +97,28 @@ networks. * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. - * `createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise`: Creates a new service in the TrustID network. + * `createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise`: Creates a new service in the TrustID network. * `updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the information from a service. * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network + * `PolicyType (policy: PolicyType, threshold:?Number, registry:?object)`: It + defined the policyType to be used for a service. There are currently three + types of policyTypes supported (more could be easily added according to + your needs) + * PublicPolicy: Grants public access by any user to your service. + * SameControllerPolicy: Only verified identities whose controller is the + same controller who created the service has access to the service (this + policy comes pretty handy when you want to define "corporate-wide" services). + * FineGrainedPolicy: Grants fine-grained access to users to your service. + In this policy you explicitly define the access of users to the service. + There are two ways of using this policyType, you can define a threshold + so every user with an access level equal or higher than the threshold + is granted access to the service; or you could use fine-grained + access levels defined in the registry, where you would add the following + tuple: `{, }`. Thus, only users in the registry + with an access level over the threshold will be granted access to the + service with `access_role` permissions. * `keystore.ts`: Interface that enables the implementation of keystore storages. There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). diff --git a/trustid-sdk/connection-profile.json b/trustid-sdk/connection-profile.json new file mode 100644 index 00000000..c5df0927 --- /dev/null +++ b/trustid-sdk/connection-profile.json @@ -0,0 +1,205 @@ +{ + "version": "1.0.0", + "client": { + "organization": "org1", + "logging": { + "level": "debug" + }, + "peer": { + "timeout": { + "connection": "15s", + "response": "180s", + "discovery": { + "greylistExpiry": "10s" + } + } + }, + "orderer": { + "timeout": { + "connection": "15s", + "response": "15s" + } + }, + "global": { + "timeout": { + "query": "180s", + "execute": "180s", + "resmgmt": "180s" + }, + "cache": { + "connectionIdle": "30s", + "eventServiceIdle": "2m", + "channelConfig": "30m", + "channelMembership": "30s", + "discovery": "10s", + "selection": "10m" + } + }, + "cryptoconfig": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config" + }, + "credentialStore": { + "path": "/Users/mtng/go1.10/credentialstore", + "cryptoStore": { + "path": "/Users/mtng/go1.10/credentialstore" + } + }, + "BCCSP": { + "security": { + "enabled": true, + "default": { + "provider": "SW" + }, + "hashAlgorithm": "SHA2", + "softVerify": true, + "level": 256 + } + }, + "tlsCerts": { + "systemCertPool": true, + "client": { + "key": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/tls/client.key" + }, + "cert": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/tls/client.crt" + } + } + } + }, + "channels": { + "telefonicachannel": { + "peers": { + "peer0.org1.telefonica.com": { + "endorsingPeer": true, + "chaincodeQuery": true, + "ledgerQuery": true, + "eventSource": true + } + + }, + "orderers": [ + "orderer0.telefonica.com" + ], + "policies": { + "queryChannelConfig": { + "minResponses": 1, + "maxTargets": 1, + "retryOpts": { + "attempts": 5, + "initialBackoff": "500ms", + "maxBackoff": "5s", + "backoffFactor": 2.0 + } + } + } + }, + "channel2": { + "peers": { + "peer0.org1.telefonica.com": { + "endorsingPeer": true, + "chaincodeQuery": true, + "ledgerQuery": true, + "eventSource": true + } + + }, + "orderers": [ + "orderer0.telefonica.com" + ], + + "policies": { + "queryChannelConfig": { + "minResponses": 1, + "maxTargets": 1, + "retryOpts": { + "attempts": 5, + "initialBackoff": "500ms", + "maxBackoff": "5s", + "backoffFactor": 2.0 + } + } + } + } + }, + "organizations": { + "org1": { + "mspid": "org1MSP", + "cryptoPath": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/msp", + "peers": [ + "peer0.org1.telefonica.com" + ], + "certificateAuthorities": [ + "ca.org1.telefonica.com" + ] + }, + "ordererorg": { + "mspID": "OrdererMSP", + "cryptoPath": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/msp" + } + }, + "orderers": { + "orderer0.telefonica.com": { + "url": "grpcs://localhost:7050", + "grpcOptions": { + "ssl-target-name-override": "orderer0.telefonica.com" + }, + "tlsCACerts": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" + } + }, + "orderer1.telefonica.com": { + "url": "grpcs://localhost:8050", + "grpcOptions": { + "ssl-target-name-override": "orderer1.telefonica.com" + }, + "tlsCACerts": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" + } + }, + "orderer2.telefonica.com": { + "url": "grpcs://localhost:9050", + "grpcOptions": { + "ssl-target-name-override": "orderer2.telefonica.com" + }, + "tlsCACerts": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" + } + } + }, + + + "peers": { + "peer0.org1.telefonica.com": { + "url": "grpcs://localhost:7051", + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.telefonica.com" + }, + "tlsCACerts": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/peers/peer0.org1.telefonica.com/tls/ca.crt" + } + } + }, + + "certificateAuthorities": { + "ca.org1.telefonica.com": { + "url": "https://ca.org1.telefonica.com:7054", + "tlsCACerts": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/ca/ca.org1.telefonica.com-cert.pem", + "client": { + "key": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/sdk-keys/MyKey.key" + }, + "cert": { + "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/sdk-keys/MyCertificate.crt" + } + } + }, + "registrar": { + "enrollId": "adminCA", + "enrollSecret": "adminpw" + }, + "caName": "ca.org1.telefonica.com" + } + } +} \ No newline at end of file diff --git a/trustid-sdk/dist/index.d.ts b/trustid-sdk/dist/index.d.ts deleted file mode 100644 index 47ea532e..00000000 --- a/trustid-sdk/dist/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Wallet, DID } from "./src/wallet"; -import { FileKeystore } from "./src/keystore/fileKeystore"; -import { MongoKeystore } from "./src/keystore/mongoKeystore"; -import { LocalStorageKeystore } from "./src/keystore/localStorageKeystore"; -import { TrustIdHf } from "./src/network/trustHF"; -export { Wallet, DID, FileKeystore, MongoKeystore, LocalStorageKeystore, TrustIdHf }; diff --git a/trustid-sdk/dist/index.js b/trustid-sdk/dist/index.js deleted file mode 100644 index 33b53b82..00000000 --- a/trustid-sdk/dist/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TrustIdHf = exports.LocalStorageKeystore = exports.MongoKeystore = exports.FileKeystore = exports.DID = exports.Wallet = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var wallet_1 = require("./src/wallet"); -Object.defineProperty(exports, "Wallet", { enumerable: true, get: function () { return wallet_1.Wallet; } }); -Object.defineProperty(exports, "DID", { enumerable: true, get: function () { return wallet_1.DID; } }); -var fileKeystore_1 = require("./src/keystore/fileKeystore"); -Object.defineProperty(exports, "FileKeystore", { enumerable: true, get: function () { return fileKeystore_1.FileKeystore; } }); -var mongoKeystore_1 = require("./src/keystore/mongoKeystore"); -Object.defineProperty(exports, "MongoKeystore", { enumerable: true, get: function () { return mongoKeystore_1.MongoKeystore; } }); -var localStorageKeystore_1 = require("./src/keystore/localStorageKeystore"); -Object.defineProperty(exports, "LocalStorageKeystore", { enumerable: true, get: function () { return localStorageKeystore_1.LocalStorageKeystore; } }); -var trustHF_1 = require("./src/network/trustHF"); -Object.defineProperty(exports, "TrustIdHf", { enumerable: true, get: function () { return trustHF_1.TrustIdHf; } }); diff --git a/trustid-sdk/dist/src/keystore/fileKeystore.d.ts b/trustid-sdk/dist/src/keystore/fileKeystore.d.ts deleted file mode 100644 index 439a9150..00000000 --- a/trustid-sdk/dist/src/keystore/fileKeystore.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Keystore } from './keystore'; -import { DID } from '../wallet'; -export declare class FileKeystore extends Keystore { - readonly WALLET_SRCS: string[]; - /** InMemory Keystore representing all the DIDs loaded in the wallet*/ - private dir; - constructor(type?: string, dir?: string); - /** SaveKeystore with all the DIDs. Store status of the wallet */ - saveKeystore(type?: string): void; - /** LoadKeystore loads the stored status of a wallet */ - loadKeystore(source: string, dir?: string): void; - /** getKey gets a key from the keystore of the wallet */ - getDID(id?: string): Promise; - /** Stores DID in the permanent keystore */ - storeDID(did: DID): Promise; -} diff --git a/trustid-sdk/dist/src/keystore/fileKeystore.js b/trustid-sdk/dist/src/keystore/fileKeystore.js deleted file mode 100644 index fa920ae7..00000000 --- a/trustid-sdk/dist/src/keystore/fileKeystore.js +++ /dev/null @@ -1,172 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FileKeystore = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var keystore_1 = require("./keystore"); -var wallet_1 = require("../wallet"); -var fs_1 = __importDefault(require("fs")); -var FileKeystore = /** @class */ (function (_super) { - __extends(FileKeystore, _super); - function FileKeystore(type, dir) { - if (type === void 0) { type = "file"; } - if (dir === void 0) { dir = './keystore/keystore'; } - var _this = _super.call(this) || this; - _this.WALLET_SRCS = [ - "file", - "empty", - "localStorage" - ]; - // Reset keystore from file if existing. - _this.loadKeystore(type, dir); - _this.dir = dir; - return _this; - } - /** SaveKeystore with all the DIDs. Store status of the wallet */ - FileKeystore.prototype.saveKeystore = function (type) { - if (type === void 0) { type = "file"; } - switch (type) { - case "file": { - fs_1.default.writeFileSync(this.dir, JSON.stringify(this.keystore), 'utf8'); - break; - } - case "localStorage": { - localStorage.setItem('keystore', JSON.stringify(this.keystore)); - break; - } - default: { - throw new Error("Storage type not implemented."); - } - } - }; - /** LoadKeystore loads the stored status of a wallet */ - FileKeystore.prototype.loadKeystore = function (source, dir) { - if (dir === void 0) { dir = ""; } - // If type not supported throw error. - if (!Object.values(this.WALLET_SRCS).includes(source)) { - throw new Error("Wallet source to initialize not valid!"); - } - switch (source) { - case "file": { - var auxKs = void 0; - try { - var val = fs_1.default.readFileSync(dir, 'utf8'); - auxKs = JSON.parse(val); - } - catch (_a) { - auxKs = {}; - } - for (var k in auxKs) { - var emptyDID = new wallet_1.DID("RSA", undefined); - emptyDID.loadFromObject(auxKs[k]); - auxKs[k] = emptyDID; - } - this.keystore = auxKs; - // this.keystore = JSON.parse(fs.readFileSync(dir, 'utf8')) - break; - } - case "localStorage": { - var val = localStorage.getItem('keystore'); - this.keystore = JSON.parse(val || ""); - break; - } - default: { - throw new Error("Storage type not implemented."); - } - } - }; - /** getKey gets a key from the keystore of the wallet */ - FileKeystore.prototype.getDID = function (id) { - if (id === void 0) { id = "default"; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - // We only get from inMemory keystore for performance purposes. - if (!(this.keystore.hasOwnProperty(id))) { - // throw new Error("This DID does not exist in the keystore."); - return [2 /*return*/, {}]; - } - return [2 /*return*/, this.keystore[id]]; - }); - }); - }; - /** Stores DID in the permanent keystore */ - FileKeystore.prototype.storeDID = function (did) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - // Check if did already in keystore and save keystore. - // If not add DID and save keystore. - try { - if (this.keystore[did.id] == undefined) { - // Add in inmemory storage - this.keystore[did.id] = did; - } - this.saveKeystore(); - return [2 /*return*/, true]; - } - catch (_b) { - return [2 /*return*/, false]; - } - return [2 /*return*/]; - }); - }); - }; - return FileKeystore; -}(keystore_1.Keystore)); -exports.FileKeystore = FileKeystore; diff --git a/trustid-sdk/dist/src/keystore/keystore.d.ts b/trustid-sdk/dist/src/keystore/keystore.d.ts deleted file mode 100644 index 156ada51..00000000 --- a/trustid-sdk/dist/src/keystore/keystore.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { DID } from "../wallet"; -export declare abstract class Keystore { - /** InMemory Keystore representing all the DIDs loaded in the wallet*/ - protected keystore: { - [k: string]: any; - }; - constructor(); - abstract getDID(id: string): Promise; - abstract storeDID(did: DID): Promise; - storeInMemory(did: DID): boolean; - /** List available keys in the keystore inmemory*/ - listDID(): string[]; - /** setDefault sets a DID as the default key for the wallet */ - setDefault(did: DID): boolean; -} diff --git a/trustid-sdk/dist/src/keystore/keystore.js b/trustid-sdk/dist/src/keystore/keystore.js deleted file mode 100644 index 5ca99d8a..00000000 --- a/trustid-sdk/dist/src/keystore/keystore.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Keystore = void 0; -var Keystore = /** @class */ (function () { - function Keystore() { - this.keystore = {}; - } - // Store DID in memory - Keystore.prototype.storeInMemory = function (did) { - this.keystore[did.id] = did; - return true; - }; - /** List available keys in the keystore inmemory*/ - Keystore.prototype.listDID = function () { - return Object.keys(this.keystore); - }; - /** setDefault sets a DID as the default key for the wallet */ - Keystore.prototype.setDefault = function (did) { - this.keystore["default"] = did; - return true; - }; - return Keystore; -}()); -exports.Keystore = Keystore; diff --git a/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts b/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts deleted file mode 100644 index 283fd65a..00000000 --- a/trustid-sdk/dist/src/keystore/localStorageKeystore.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Keystore } from './keystore'; -import { DID } from '../wallet'; -export declare class LocalStorageKeystore extends Keystore { - readonly WALLET_SRCS: string[]; - constructor(); - /** getKey gets a key from the keystore of the wallet */ - getDID(id?: string): Promise; - /** Stores DID in the permanent keystore */ - storeDID(did: DID): Promise; -} diff --git a/trustid-sdk/dist/src/keystore/localStorageKeystore.js b/trustid-sdk/dist/src/keystore/localStorageKeystore.js deleted file mode 100644 index 5647b2c6..00000000 --- a/trustid-sdk/dist/src/keystore/localStorageKeystore.js +++ /dev/null @@ -1,108 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LocalStorageKeystore = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var keystore_1 = require("./keystore"); -var wallet_1 = require("../wallet"); -var LocalStorageKeystore = /** @class */ (function (_super) { - __extends(LocalStorageKeystore, _super); - function LocalStorageKeystore() { - var _this = _super.call(this) || this; - _this.WALLET_SRCS = [ - "file", - "empty", - "localStorage" - ]; - return _this; - } - /** getKey gets a key from the keystore of the wallet */ - LocalStorageKeystore.prototype.getDID = function (id) { - if (id === void 0) { id = "default"; } - return __awaiter(this, void 0, void 0, function () { - var did, value; - return __generator(this, function (_a) { - did = new wallet_1.DID(); - value = localStorage.getItem(id); - if (value) { - did.loadFromObject(JSON.parse(value)); - } - else { - did = {}; - } - return [2 /*return*/, did]; - }); - }); - }; - /** Stores DID in the permanent keystore */ - LocalStorageKeystore.prototype.storeDID = function (did) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - try { - localStorage.setItem(did.id, JSON.stringify(did)); - return [2 /*return*/, true]; - } - catch (_b) { - return [2 /*return*/, false]; - } - return [2 /*return*/]; - }); - }); - }; - return LocalStorageKeystore; -}(keystore_1.Keystore)); -exports.LocalStorageKeystore = LocalStorageKeystore; diff --git a/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts b/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts deleted file mode 100644 index 343923f0..00000000 --- a/trustid-sdk/dist/src/keystore/mongoKeystore.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Keystore } from './keystore'; -import { DID } from '../wallet'; -export declare class MongoKeystore extends Keystore { - private database; - private uri; - constructor(mongoURI: string); - init(): Promise; - /** getKey gets a key from the keystore of the wallet */ - getDID(id?: string): Promise; - /** Stores DID in the permanent keystore */ - storeDID(did: DID): Promise; -} diff --git a/trustid-sdk/dist/src/keystore/mongoKeystore.js b/trustid-sdk/dist/src/keystore/mongoKeystore.js deleted file mode 100644 index e2f12b6c..00000000 --- a/trustid-sdk/dist/src/keystore/mongoKeystore.js +++ /dev/null @@ -1,155 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.MongoKeystore = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var keystore_1 = require("./keystore"); -var wallet_1 = require("../wallet"); -var Mongoose = require("mongoose"); -var DIDSchema = new Mongoose.Schema({ - id: String, - pubkey: String, - type: String, - controller: String, - access: Number, - privkey: String, -}); -var DIDModel = Mongoose.model("did", DIDSchema); -var MongoKeystore = /** @class */ (function (_super) { - __extends(MongoKeystore, _super); - // Create connection to the keystore database. - function MongoKeystore(mongoURI) { - var _this = _super.call(this) || this; - _this.uri = mongoURI; - _this.database = null; - return _this; - } - MongoKeystore.prototype.init = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, Mongoose.connect(this.uri, { - useNewUrlParser: true, - useFindAndModify: true, - useUnifiedTopology: true, - useCreateIndex: true, - })]; - case 1: - _a.sent(); - this.database = Mongoose.connection; - return [2 /*return*/]; - } - }); - }); - }; - /** getKey gets a key from the keystore of the wallet */ - MongoKeystore.prototype.getDID = function (id) { - if (id === void 0) { id = "default"; } - return __awaiter(this, void 0, void 0, function () { - var didObj, emptyDID, _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!!(id in this.keystore)) return [3 /*break*/, 4]; - _b.label = 1; - case 1: - _b.trys.push([1, 3, , 4]); - return [4 /*yield*/, DIDModel.findOne({ id: id })]; - case 2: - didObj = _b.sent(); - emptyDID = new wallet_1.DID("RSA", undefined); - emptyDID.loadFromObject(didObj); - this.keystore[id] = emptyDID; - return [3 /*break*/, 4]; - case 3: - _a = _b.sent(); - throw new Error("DID not found in database"); - case 4: return [2 /*return*/, this.keystore[id]]; - } - }); - }); - }; - /** Stores DID in the permanent keystore */ - MongoKeystore.prototype.storeDID = function (did) { - return __awaiter(this, void 0, void 0, function () { - var didObj, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 5, , 6]); - return [4 /*yield*/, DIDModel.findOne({ id: did.id })]; - case 1: - didObj = _a.sent(); - console.log(didObj); - if (!!didObj) return [3 /*break*/, 3]; - return [4 /*yield*/, DIDModel.create(did)]; - case 2: - _a.sent(); - return [2 /*return*/, true]; - case 3: throw new Error("The identity already exists in the storage"); - case 4: return [3 /*break*/, 6]; - case 5: - err_1 = _a.sent(); - throw err_1; - case 6: return [2 /*return*/]; - } - }); - }); - }; - return MongoKeystore; -}(keystore_1.Keystore)); -exports.MongoKeystore = MongoKeystore; diff --git a/trustid-sdk/dist/src/network/driver.d.ts b/trustid-sdk/dist/src/network/driver.d.ts deleted file mode 100644 index f1cf42cf..00000000 --- a/trustid-sdk/dist/src/network/driver.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export declare abstract class Driver { - protected connection: any; - constructor(); - abstract connect(config: object): any; - abstract disconnect(config: object): void; - abstract callContractTransaction(id: string, fcn: string, args: any, channel?: string): any; - abstract getContractTransaction(id: string, fcn: string, args: any, channel?: string): any; - /** Return connection */ - getConnection(): any; -} diff --git a/trustid-sdk/dist/src/network/driver.js b/trustid-sdk/dist/src/network/driver.js deleted file mode 100644 index c1b2972d..00000000 --- a/trustid-sdk/dist/src/network/driver.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Driver = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var Driver = /** @class */ (function () { - function Driver() { - this.connection = {}; - } - /** Return connection */ - Driver.prototype.getConnection = function () { - return this.connection; - }; - return Driver; -}()); -exports.Driver = Driver; diff --git a/trustid-sdk/dist/src/network/hfdriver.d.ts b/trustid-sdk/dist/src/network/hfdriver.d.ts deleted file mode 100644 index 806cc70f..00000000 --- a/trustid-sdk/dist/src/network/hfdriver.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Driver } from "./driver"; -export interface HfConfig { - stateStore: string; - caURL: string; - caName: string; - caAdmin: string; - caPassword: string; - tlsOptions: any; - mspId: string; - walletID: string; - asLocalhost: boolean; - ccp: any; -} -export declare class HfDriver extends Driver { - protected connection: any; - constructor(); - callContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined): Promise; - getContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined): Promise; - connect(config: HfConfig): Promise; - disconnect(): Promise; -} diff --git a/trustid-sdk/dist/src/network/hfdriver.js b/trustid-sdk/dist/src/network/hfdriver.js deleted file mode 100644 index 28f51743..00000000 --- a/trustid-sdk/dist/src/network/hfdriver.js +++ /dev/null @@ -1,195 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __spreadArrays = (this && this.__spreadArrays) || function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HfDriver = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var driver_1 = require("./driver"); -var FabricCAServices = require("fabric-ca-client"); -var _a = require("fabric-network"), Gateway = _a.Gateway, Wallets = _a.Wallets, DefaultEventHandlerStrategies = _a.DefaultEventHandlerStrategies; -var HfDriver = /** @class */ (function (_super) { - __extends(HfDriver, _super); - function HfDriver() { - var _this = _super.call(this) || this; - _this.connection = {}; - return _this; - } - HfDriver.prototype.callContractTransaction = function (id, fcn, args, channel) { - return __awaiter(this, void 0, void 0, function () { - var network, contract, result, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 4, , 5]); - return [4 /*yield*/, this.connection.getNetwork(channel)]; - case 1: - network = _a.sent(); - return [4 /*yield*/, network.getContract(id)]; - case 2: - contract = _a.sent(); - return [4 /*yield*/, contract.submitTransaction.apply(contract, __spreadArrays([fcn], args))]; - case 3: - result = _a.sent(); - return [2 /*return*/, result.toString()]; - case 4: - err_1 = _a.sent(); - if (err_1.responses) { - throw new Error(err_1.responses[0].response.message); - } - else { - throw err_1; - } - return [3 /*break*/, 5]; - case 5: return [2 /*return*/]; - } - }); - }); - }; - HfDriver.prototype.getContractTransaction = function (id, fcn, args, channel) { - return __awaiter(this, void 0, void 0, function () { - var network, contract, result, err_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 4, , 5]); - return [4 /*yield*/, this.connection.getNetwork(channel)]; - case 1: - network = _a.sent(); - return [4 /*yield*/, network.getContract(id)]; - case 2: - contract = _a.sent(); - return [4 /*yield*/, contract.evaluateTransaction.apply(contract, __spreadArrays([fcn], args))]; - case 3: - result = _a.sent(); - return [2 /*return*/, result.toString()]; - case 4: - err_2 = _a.sent(); - throw err_2; - case 5: return [2 /*return*/]; - } - }); - }); - }; - HfDriver.prototype.connect = function (config) { - return __awaiter(this, void 0, void 0, function () { - var wallet, caService, req, enrollment, identity, err_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 5, , 6]); - this.connection = new Gateway(); - return [4 /*yield*/, Wallets.newFileSystemWallet(config.stateStore)]; - case 1: - wallet = _a.sent(); - caService = new FabricCAServices(config.caURL, config.tlsOptions, config.caName); - req = { - enrollmentID: config.caAdmin, - enrollmentSecret: config.caPassword, - }; - return [4 /*yield*/, caService.enroll(req)]; - case 2: - enrollment = _a.sent(); - identity = { - credentials: { - certificate: enrollment.certificate, - privateKey: enrollment.key.toBytes(), - }, - mspId: config.mspId, - type: "X.509", - }; - return [4 /*yield*/, wallet.put(config.walletID, identity)]; - case 3: - _a.sent(); - return [4 /*yield*/, this.connection.connect(config.ccp, { - wallet: wallet, - identity: config.walletID, - discovery: { - enabled: true, - asLocalhost: config.asLocalhost, - }, - eventHandlerOptions: { - strategy: DefaultEventHandlerStrategies.NETWORK_SCOPE_ANYFORTX, - }, - })]; - case 4: - _a.sent(); - return [2 /*return*/, this.connection]; - case 5: - err_3 = _a.sent(); - throw err_3; - case 6: return [2 /*return*/]; - } - }); - }); - }; - HfDriver.prototype.disconnect = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - this.connection.disconnect(); - return [2 /*return*/]; - }); - }); - }; - return HfDriver; -}(driver_1.Driver)); -exports.HfDriver = HfDriver; diff --git a/trustid-sdk/dist/src/network/trustHF.d.ts b/trustid-sdk/dist/src/network/trustHF.d.ts deleted file mode 100644 index 1609b22c..00000000 --- a/trustid-sdk/dist/src/network/trustHF.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { TrustID, Access } from "./trustInterface"; -import { HfDriver } from "./hfdriver"; -import { DID } from "../wallet"; -export interface Config { - fcn: string; - channel: string; - chaincodeName: string; - stateStore: string; - caURL: string; - caName: string; - caAdmin: string; - caPassword: string; - tlsOptions: any; - mspId: string; - walletID: string; - asLocalhost: boolean; - ccp: any; -} -export declare class TrustIdHf extends TrustID { - config: Config; - driver: HfDriver; - constructor(config: Config); - configureDriver(): Promise; - disconnectDriver(): Promise; - /** createIdentity registers a new unverified identity */ - createIdentity(did: DID): Promise; - /** VerifyIdentity allow admins to verify user identityes */ - verifyIdentity(adminDID: DID, id: string): Promise; - /** Revoke allow admins to revoke user identityes */ - revokeIdentity(adminDID: DID, id: string): Promise; - /** GetIdentity gets a new identity */ - getIdentity(did: DID, id: string): Promise; - /** Registers new service in the platform */ - createService(did: DID, serviceDID: string, name: string, isPublic?: boolean): Promise; - /** Updates accesses for a service */ - updateService(did: DID, serviceDID: string, access: Access, isPublic?: boolean): Promise; - /** Gets information from a service */ - getService(did: DID, serviceDID: string): Promise; - /** Invokes a chaincode through the proxy */ - invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise; - /** Invokes a chaincode through the proxy */ - query(did: DID, serviceDID: string, args: string[], channel: string): Promise; -} diff --git a/trustid-sdk/dist/src/network/trustHF.js b/trustid-sdk/dist/src/network/trustHF.js deleted file mode 100644 index 51c93012..00000000 --- a/trustid-sdk/dist/src/network/trustHF.js +++ /dev/null @@ -1,391 +0,0 @@ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TrustIdHf = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var trustInterface_1 = require("./trustInterface"); -var hfdriver_1 = require("./hfdriver"); -var TrustIdHf = /** @class */ (function (_super) { - __extends(TrustIdHf, _super); - function TrustIdHf(config) { - var _this = _super.call(this) || this; - _this.config = config; - _this.driver = new hfdriver_1.HfDriver(); - return _this; - } - TrustIdHf.prototype.configureDriver = function () { - return __awaiter(this, void 0, void 0, function () { - var cfg; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - cfg = { - stateStore: this.config.stateStore, - caURL: this.config.caURL, - caName: this.config.caName, - caAdmin: this.config.caAdmin, - caPassword: this.config.caPassword, - tlsOptions: this.config.tlsOptions, - mspId: this.config.mspId, - walletID: this.config.walletID, - asLocalhost: this.config.asLocalhost, - ccp: this.config.ccp, - }; - return [4 /*yield*/, this.driver.connect(cfg)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - TrustIdHf.prototype.disconnectDriver = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.driver.disconnect()]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - /** createIdentity registers a new unverified identity */ - TrustIdHf.prototype.createIdentity = function (did) { - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - publicKey: did.pubkey - }; - return [4 /*yield*/, did.sign({ - function: "createSelfIdentity", - params: { - did: did.id, - publicKey: did.pubkey, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** VerifyIdentity allow admins to verify user identityes */ - TrustIdHf.prototype.verifyIdentity = function (adminDID, id) { - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: adminDID.id - }; - return [4 /*yield*/, adminDID.sign({ - function: "verifyIdentity", - params: { - did: id, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Revoke allow admins to revoke user identityes */ - TrustIdHf.prototype.revokeIdentity = function (adminDID, id) { - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: adminDID.id - }; - return [4 /*yield*/, adminDID.sign({ - function: "revokeIdentity", - params: { - did: id, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** GetIdentity gets a new identity */ - TrustIdHf.prototype.getIdentity = function (did, id) { - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "getIdentity", - params: { - did: id, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Registers new service in the platform */ - TrustIdHf.prototype.createService = function (did, serviceDID, name, isPublic) { - if (isPublic === void 0) { isPublic = true; } - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "createServiceIdentity", - params: { - did: serviceDID, - name: name, - isPublic: isPublic, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Updates accesses for a service */ - TrustIdHf.prototype.updateService = function (did, serviceDID, access, isPublic) { - if (isPublic === void 0) { isPublic = true; } - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "updateServiceAccess", - params: { - did: serviceDID, - access: access, - isPublic: isPublic, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Gets information from a service */ - TrustIdHf.prototype.getService = function (did, serviceDID) { - return __awaiter(this, void 0, void 0, function () { - var args, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "getServiceIdentity", - params: { - did: serviceDID, - }, - })]; - case 1: - args = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, args, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Invokes a chaincode through the proxy */ - TrustIdHf.prototype.invoke = function (did, serviceDID, args, channel) { - return __awaiter(this, void 0, void 0, function () { - var argsCall, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "invoke", - params: { - did: serviceDID, - args: args, - channel: channel, - }, - })]; - case 1: - argsCall = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.callContractTransaction(this.config.chaincodeName, this.config.fcn, argsCall, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - /** Invokes a chaincode through the proxy */ - TrustIdHf.prototype.query = function (did, serviceDID, args, channel) { - return __awaiter(this, void 0, void 0, function () { - var argsCall, _a, _b, _c, res; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = (_a = JSON).stringify; - _c = { - did: did.id - }; - return [4 /*yield*/, did.sign({ - function: "invoke", - params: { - did: serviceDID, - args: args, - channel: channel, - }, - })]; - case 1: - argsCall = [ - _b.apply(_a, [(_c.payload = _d.sent(), - _c)]) - ]; - return [4 /*yield*/, this.driver.getContractTransaction(this.config.chaincodeName, this.config.fcn, argsCall, this.config.channel)]; - case 2: - res = _d.sent(); - return [2 /*return*/, res]; - } - }); - }); - }; - return TrustIdHf; -}(trustInterface_1.TrustID)); -exports.TrustIdHf = TrustIdHf; diff --git a/trustid-sdk/dist/src/network/trustInterface.d.ts b/trustid-sdk/dist/src/network/trustInterface.d.ts deleted file mode 100644 index bca611f6..00000000 --- a/trustid-sdk/dist/src/network/trustInterface.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { DID } from "../wallet"; -export declare abstract class TrustID { - abstract configureDriver(): Promise; - abstract disconnectDriver(): Promise; - abstract createIdentity(did: DID): Promise; - abstract verifyIdentity(adminDID: DID, id: string): Promise; - abstract getIdentity(did: DID, id: string): Promise; - abstract revokeIdentity(adminDID: DID, id: string): Promise; - abstract createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise; - abstract updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise; - abstract getService(did: DID, serviceDID: string): Promise; - abstract invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise; - abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; -} -export interface Access { - did: string; - type: number; -} diff --git a/trustid-sdk/dist/src/network/trustInterface.js b/trustid-sdk/dist/src/network/trustInterface.js deleted file mode 100644 index 27097dab..00000000 --- a/trustid-sdk/dist/src/network/trustInterface.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.TrustID = void 0; -var TrustID = /** @class */ (function () { - function TrustID() { - } - return TrustID; -}()); -exports.TrustID = TrustID; diff --git a/trustid-sdk/dist/src/wallet.d.ts b/trustid-sdk/dist/src/wallet.d.ts deleted file mode 100644 index 8bc967c3..00000000 --- a/trustid-sdk/dist/src/wallet.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { TrustID } from "./network/trustInterface"; -import { Keystore } from "./keystore/keystore"; -export declare class DID { - id: string; - pubkey: string; - type: string; - controller: string; - access: number; - private privkey; - private unlockedKey; - readonly ALGO_TYPES: string[]; - constructor(type?: any, controller?: string); - private keyGeneration; - createKey(passphrase?: string): Promise; - unlockAccount(passphrase?: string): Promise; - lockAccount(): any; - loadFromObject(obj: any): void; - exportDID(withPrivate: boolean): { - id: string; - type: string; - pubkey: string; - privkey: string; - controller: string; - }; - /** sign Generates a JWS from a payload using an id from the wallet */ - sign(payload: object): Promise; - /** verify Verifies a JWS from a payload using a did */ - verify(signature: string, did: DID): Promise; -} -/** Class representing Wallets - * It follows a Singleton pattern. - */ -export declare class Wallet { - /** Instance for the wallet */ - private static _instance; - private keystore; - /** Drivers to connected blockchains */ - networks: { - [k: string]: TrustID; - }; - /** Constructor for the wallet */ - private constructor(); - static get Instance(): Wallet; - getDID(id: string): Promise; - storeDID(did: DID): Promise; - listDID(): string[]; - setDefault(did: DID): boolean; - storeInMemory(did: DID): boolean; - /** Set the Keystore to use in the wallet. */ - setKeystore(keystore: Keystore): void; - /** Set the Keystore to use in the wallet. */ - addNetwork(id: string, network: TrustID): void; - /** generateDID generates a new DID in the wallet */ - generateDID(type: string, controller?: string, passphrase?: string): Promise; -} diff --git a/trustid-sdk/dist/src/wallet.js b/trustid-sdk/dist/src/wallet.js deleted file mode 100644 index 94c787d9..00000000 --- a/trustid-sdk/dist/src/wallet.js +++ /dev/null @@ -1,282 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Wallet = exports.DID = void 0; -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var node_jose_1 = require("node-jose"); -var crypto_js_1 = __importDefault(require("crypto-js")); -var fileKeystore_1 = require("./keystore/fileKeystore"); -var DID = /** @class */ (function () { - function DID(type, controller) { - if (type === void 0) { type = "RSA"; } - if (controller === void 0) { controller = "default"; } - // TODO: Default parameters for now: - // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. - this.ALGO_TYPES = ["RSA", "EC", "oct"]; - // If type not supported throw error. - if (!Object.values(this.ALGO_TYPES).includes(type)) { - throw new Error("Key algorithm not supported"); - } - this.id = ""; - this.type = type; - this.controller = controller; - this.access = 0; - this.privkey = ""; - this.pubkey = ""; - this.unlockedKey = null; - } - // TODO: Can we do this more efficiently? - DID.prototype.keyGeneration = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (this.type) { - case "RSA": - return [2 /*return*/, node_jose_1.JWK.createKey("RSA", 2048, { alg: "" })]; - case "EC": - return [2 /*return*/, node_jose_1.JWK.createKey("EC", "P-521", { alg: "" })]; - case "oct": - return [2 /*return*/, node_jose_1.JWK.createKey("oct", 256, { alg: "" })]; - default: - throw new Error("Key algorithm not supported"); - } - return [2 /*return*/]; - }); - }); - }; - DID.prototype.createKey = function (passphrase) { - if (passphrase === void 0) { passphrase = ""; } - return __awaiter(this, void 0, void 0, function () { - var key, addr, pk; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(this.privkey + this.id + this.pubkey === "")) return [3 /*break*/, 2]; - return [4 /*yield*/, this.keyGeneration()]; - case 1: - key = _a.sent(); - addr = crypto_js_1.default.SHA256(key.toPEM(false)).toString(crypto_js_1.default.enc.Hex); - this.id = "did:vtn:trustid:" + addr; - this.pubkey = key.toPEM(); - pk = key.toPEM(true); - this.privkey = crypto_js_1.default.AES.encrypt(pk, passphrase).toString(); - _a.label = 2; - case 2: return [2 /*return*/]; - } - }); - }); - }; - DID.prototype.unlockAccount = function (passphrase) { - if (passphrase === void 0) { passphrase = ""; } - return __awaiter(this, void 0, void 0, function () { - var pem, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - _c.trys.push([0, 2, , 3]); - pem = crypto_js_1.default.AES.decrypt(this.privkey, passphrase).toString(crypto_js_1.default.enc.Utf8); - _a = this; - return [4 /*yield*/, node_jose_1.JWK.asKey(pem, "pem")]; - case 1: - _a.unlockedKey = _c.sent(); - return [3 /*break*/, 3]; - case 2: - _b = _c.sent(); - throw new Error("Private key couldn't be deciphered"); - case 3: return [2 /*return*/]; - } - }); - }); - }; - DID.prototype.lockAccount = function () { - this.unlockedKey = undefined; - }; - DID.prototype.loadFromObject = function (obj) { - var id = obj.id, type = obj.type, controller = obj.controller, access = obj.access, pubkey = obj.pubkey, privkey = obj.privkey; - this.id = id; - this.type = type; - this.controller = controller; - this.access = access; - this.pubkey = pubkey; - this.privkey = privkey; - }; - DID.prototype.exportDID = function (withPrivate) { - var privkey = withPrivate ? this.privkey : ""; - return { - id: this.id, - type: this.type, - pubkey: this.pubkey, - privkey: privkey, - controller: this.controller - }; - }; - /** sign Generates a JWS from a payload using an id from the wallet */ - DID.prototype.sign = function (payload) { - return __awaiter(this, void 0, void 0, function () { - var buf, sign; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this.unlockedKey) { - throw Error("You must unlock the account before signing the message."); - } - buf = Buffer.from(JSON.stringify(payload)); - return [4 /*yield*/, node_jose_1.JWS.createSign({ - fields: { cty: 'jwk+json' }, - format: 'compact' - }, this.unlockedKey) - .update(buf) - .final()]; - case 1: - sign = _a.sent(); - return [2 /*return*/, sign.toString()]; - } - }); - }); - }; - /** verify Verifies a JWS from a payload using a did */ - DID.prototype.verify = function (signature, did) { - return __awaiter(this, void 0, void 0, function () { - var pk, verify; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, node_jose_1.JWK.asKey(did.pubkey, 'pem')]; - case 1: - pk = _a.sent(); - return [4 /*yield*/, node_jose_1.JWS.createVerify(pk).verify(signature)]; - case 2: - verify = _a.sent(); - return [2 /*return*/, JSON.parse(verify.payload.toString())]; - } - }); - }); - }; - return DID; -}()); -exports.DID = DID; -/** Class representing Wallets - * It follows a Singleton pattern. - */ -var Wallet = /** @class */ (function () { - /** Constructor for the wallet */ - function Wallet() { - this.keystore = new fileKeystore_1.FileKeystore(); - this.networks = {}; - } - Object.defineProperty(Wallet, "Instance", { - get: function () { - return this._instance || (this._instance = new this()); - }, - enumerable: false, - configurable: true - }); - // Functions from specific keystore that will be overloaded - // in wallet - Wallet.prototype.getDID = function (id) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.keystore.getDID(id)]; - }); - }); - }; - Wallet.prototype.storeDID = function (did) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 /*return*/, this.keystore.storeDID(did)]; - }); - }); - }; - Wallet.prototype.listDID = function () { - return this.keystore.listDID(); - }; - Wallet.prototype.setDefault = function (did) { - return this.keystore.setDefault(did); - }; - Wallet.prototype.storeInMemory = function (did) { - return this.keystore.storeInMemory(did); - }; - /** Set the Keystore to use in the wallet. */ - Wallet.prototype.setKeystore = function (keystore) { - this.keystore = keystore; - }; - /** Set the Keystore to use in the wallet. */ - Wallet.prototype.addNetwork = function (id, network) { - this.networks[id] = network; - }; - /** generateDID generates a new DID in the wallet */ - Wallet.prototype.generateDID = function (type, controller, passphrase) { - if (controller === void 0) { controller = "default"; } - if (passphrase === void 0) { passphrase = ""; } - return __awaiter(this, void 0, void 0, function () { - var value, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - value = new DID(type, controller); - return [4 /*yield*/, value.createKey(passphrase)]; - case 1: - _c.sent(); - return [4 /*yield*/, this.keystore.storeDID(value)]; - case 2: - _c.sent(); - _b = (_a = Object).keys; - return [4 /*yield*/, this.keystore.getDID(value.id)]; - case 3: - // If it is the first key assign key as default. - // if (Object.keys(await this.keystore.getDID("default")).length === 0) { - // this.keystore.setDefault(value); - // } - if (_b.apply(_a, [_c.sent()]).length === 0) { - this.keystore.storeInMemory(value); - } - return [2 /*return*/, value]; - } - }); - }); - }; - return Wallet; -}()); -exports.Wallet = Wallet; diff --git a/trustid-sdk/dist/test/fileKeystore.spec.d.ts b/trustid-sdk/dist/test/fileKeystore.spec.d.ts deleted file mode 100644 index 87ad0c95..00000000 --- a/trustid-sdk/dist/test/fileKeystore.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -import "mocha"; diff --git a/trustid-sdk/dist/test/fileKeystore.spec.js b/trustid-sdk/dist/test/fileKeystore.spec.js deleted file mode 100644 index 39e9e886..00000000 --- a/trustid-sdk/dist/test/fileKeystore.spec.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var chai_1 = require("chai"); -var wallet_1 = require("../src/wallet"); -var fileKeystore_1 = require("../src/keystore/fileKeystore"); -require("mocha"); -var wal = wallet_1.Wallet.Instance; -// const ksfile = './keystore/keystore'+Date.now() -var ksfile = "./keystore"; -var ks = new fileKeystore_1.FileKeystore("file", ksfile); -wal.setKeystore(ks); -describe("Keystore tests", function () { return __awaiter(void 0, void 0, void 0, function () { - var did, hfChaincodeServiceStub, jwtHelperStubC; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; - case 1: - did = _a.sent(); - it("Creates FileKeystore", function () { - chai_1.expect(ks).to.not.equal({}); - }); - // TODO: Fixed this test - // it("Get DID", () => { - // expect(ks.getDID(did.id)).to.eql(did); - // }); - it("Store and load keystore", function () { - var ksfile2 = "./keystore"; - var did2 = wal.generateDID("RSA"); - ks.saveKeystore(); - var ks2 = new fileKeystore_1.FileKeystore("file", ksfile); - ks2.loadKeystore("file", ksfile); - // expect(ks.getDID(did2.id)).to.eql(did2) - }); - return [2 /*return*/]; - } - }); -}); }); diff --git a/trustid-sdk/dist/test/hfdiver.spec.d.ts b/trustid-sdk/dist/test/hfdiver.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/trustid-sdk/dist/test/hfdiver.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/trustid-sdk/dist/test/hfdiver.spec.js b/trustid-sdk/dist/test/hfdiver.spec.js deleted file mode 100644 index 9883729a..00000000 --- a/trustid-sdk/dist/test/hfdiver.spec.js +++ /dev/null @@ -1,466 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var hfdriver_1 = require("../src/network/hfdriver"); -/* global describe, it, before, after */ -var expect = require("chai").expect; -var sinon = require("sinon"); -var FabricCAServices = require("fabric-ca-client"); -var _a = require("fabric-network"), Wallets = _a.Wallets, Gateway = _a.Gateway; -describe("HF Driver - Test", function () { - before(function () { }); - describe("Connect ", function () { - var gatewayStub; - var walletStub; - var fabricCAServicesStub; - var errolment = { - certificate: "skdjsd00", - key: { - toBytes: function () { }, - }, - }; - before(function (done) { - var wallet = { - put: function () { - } - }; - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub.onSecondCall().rejects(new Error("Error connecting")); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - after(function (done) { - gatewayStub.restore(); - walletStub.restore(); - fabricCAServicesStub.restore(); - done(); - }); - it("Connect Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, config, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - hfdriver = new hfdriver_1.HfDriver(); - config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - sinon.assert.calledOnce(gatewayStub); - sinon.assert.calledOnce(walletStub); - sinon.assert.calledOnce(fabricCAServicesStub); - return [3 /*break*/, 3]; - case 2: - err_1 = _a.sent(); - console.log(err_1); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Connect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, config, err_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - hfdriver = new hfdriver_1.HfDriver(); - config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_2 = _a.sent(); - expect(err_2.message).to.equal('Error connecting'); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Disconnect ", function () { - var gatewayStub2; - var gatewayStub; - var walletStub; - var fabricCAServicesStub; - var config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - var errolment = { - certificate: "skdjsd00", - key: { - toBytes: function () { }, - }, - }; - before(function (done) { - var wallet = { - put: function () { - } - }; - gatewayStub2 = sinon.stub(Gateway.prototype, "disconnect").resolves(); - gatewayStub2.onSecondCall().throws(new Error("Error disconnecting")); - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - after(function (done) { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - it("Disconnect Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, err_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.disconnect()]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_3 = _a.sent(); - console.log(err_3); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - it("Disconnect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, err_4; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.disconnect()]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_4 = _a.sent(); - expect(err_4.message).to.equal('Error disconnecting'); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Call contract transaction ", function () { - var gatewayStub; - var walletStub; - var gatewayStub2; - var fabricCAServicesStub; - var config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - var errolment = { - certificate: "skdjsd00", - key: { - toBytes: function () { }, - }, - }; - before(function (done) { - var wallet = { - put: function () { - } - }; - var contract = { - submitTransaction: function () { - return new Promise(function (resolve) { - resolve("OK"); - }); - } - }; - var network = { - getContract: function () { - return new Promise(function (resolve) { - resolve(contract); - }); - } - }; - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); - gatewayStub2.onSecondCall().rejects(new Error("Network not exists")); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - after(function (done) { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - it("Call Contract Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, res, err_5; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; - case 2: - res = _a.sent(); - expect(res).to.equal("OK"); - return [3 /*break*/, 4]; - case 3: - err_5 = _a.sent(); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - it("Disconnect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, err_6; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_6 = _a.sent(); - expect(err_6.message).to.equal('Network not exists'); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Get contract transaction ", function () { - var gatewayStub; - var walletStub; - var gatewayStub2; - var fabricCAServicesStub; - var config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - var errolment = { - certificate: "skdjsd00", - key: { - toBytes: function () { }, - }, - }; - before(function (done) { - var wallet = { - put: function () { - } - }; - var contract = { - evaluateTransaction: function () { - return new Promise(function (resolve) { - resolve("OK"); - }); - } - }; - var network = { - getContract: function () { - return new Promise(function (resolve) { - resolve(contract); - }); - } - }; - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); - gatewayStub2.onSecondCall().rejects(new Error("Network not exists")); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - after(function (done) { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - it("get Contract Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, res, err_7; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.callContractTransaction("name", "invoke", ["a"])]; - case 2: - res = _a.sent(); - expect(res).to.equal("OK"); - return [3 /*break*/, 4]; - case 3: - err_7 = _a.sent(); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - it("Get contract Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var hfdriver, err_8; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 3, , 4]); - hfdriver = new hfdriver_1.HfDriver(); - return [4 /*yield*/, hfdriver.connect(config)]; - case 1: - _a.sent(); - return [4 /*yield*/, hfdriver.getContractTransaction("name", "invoke", ["a"])]; - case 2: - _a.sent(); - return [3 /*break*/, 4]; - case 3: - err_8 = _a.sent(); - expect(err_8.message).to.equal('Network not exists'); - return [3 /*break*/, 4]; - case 4: return [2 /*return*/]; - } - }); - }); }); - }); -}); diff --git a/trustid-sdk/dist/test/integration/test.d.ts b/trustid-sdk/dist/test/integration/test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/trustid-sdk/dist/test/integration/test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/trustid-sdk/dist/test/integration/test.js b/trustid-sdk/dist/test/integration/test.js deleted file mode 100644 index 097b05bd..00000000 --- a/trustid-sdk/dist/test/integration/test.js +++ /dev/null @@ -1,149 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var wallet_1 = require("../../src/wallet"); -var chai_1 = require("chai"); -var trustHF_1 = require("../../src/network/trustHF"); -var path = require("path"); -var fs = require("fs"); -var ccpPath = path.resolve(__dirname, "..", "..", "..", "connection-profile.json"); -var adminPriv = "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7Th71Us2fUkeB\ng0gxGtRDgkeEefTBnE8IP2Rw/PrdIwGJicK1EzbikrzqABpO4zgPxXYuOsDp28Fb\nAE5/a4X/iKshFcw5ojny61cQKwDSvoLDZKkJhJXwErXLyGmezDTb9PTFhENsWp+G\n+pywEnbgsjoXi0Khs+h6ASlsJNagsy4wRPdZkUvKZhKIbjY2ZtxnQpMaTBPOIvKU\nvbafnABlOV+6+4FANFsr9L181bNeOiaEmaqzJCajZgBHQUDVpefs96qj/S0J+0mT\nwmNajN0+DedN4Z6Xl/E25XuuaU3brEFTqnTE2DXa3P7iCCsR6r313OCR8/4pCliX\nNlUEs12ZAgMBAAECggEAZ/0SQP9Mu5RxsJzTWrfbevN8gzc2RLtkQV74g6ZgHJ/P\nva1nFSLqyNXQ3lVaRcvulwr49ueVrQBdlAlSi3mFtn4JDGBOtvyzEYPJHWfSmC4+\n6P4cvvUGTXgFyHKm+QvEmQ2hS3uH90NE6CqBDVvi9hLdH68oOiBpBDta5Ph61FJS\nOcaVQ20jEldMkz6bYv9pOYl6hunJnYB+ZYKcq25SkTEERwKQueDtzwB8ulsazbuw\nn8CraL2ncN7cAOlfcVYUica1LnP74roEK+zIUFFsjTxC9xMS47GwWkFls1VLEDb1\ntKUxJLnYJJy/18b+gpFDztr3BZFgiUpO1QUaY9aPgQKBgQDwBNm9usvfB/w76z0A\nU5JNfC1Pk3MpxRBKOM84s3HCUiu7KbCnLmOKTmORAcsbO0H+uU5xMYcsUdIgQF2C\n9SAGcKize12xqcsutoQPiEisEi387rsk1iQ8jJ03fQY6SNBe+fZta3JXuVogeiRd\nzz0YfZ7OBh2MkwEDpNjUAeXiaQKBgQDHxsIPvFGq0cbzmuIYQsQJV71y3H4iPGRI\nDVkTs6Vc9VDMAN5GtRB1HkfpQtVBFwpDZIhvfySmLhnGi2vs6fKFwo9SpRmxSypZ\nrkzs1/0Gc7ZRbHRwt1n326s2Sry+6+0AxOxsM6+OJNqfugN9RAfg8zeJeEEJTYTU\n3ty+pULbsQKBgQDPl7JoGib4mSR9AqH5JU8Vu4BJIkPp7aqAN5Bq/zE2G/H86DsE\n7edkGRaetYlg3SjgUo/Y8ThzibUO9fyrJq3zQ/91dQ79edjlZzDjakFIqlSiPi0Y\n2CnxQME92+HGCXJHozSTQOpdm0+rZVkM1hCGnSf8E2f9TKwE5dAv1hBpeQKBgQC/\npL7DQ5+AY68cP+dG6L2QTNgTWMuzYgW9TPi3uq0WiMqSeP7CC64W/A52CUP0JfsV\nfVqYwvpQZIcbfOHyqtaZVHQTDwifmICu+VMYHXa/+r7aS1VET8+BwvvyoC2CZWa9\nRyuZ/NcbX+VONq5kO5/nPsp3GKIjH3cekhBm3rhNcQKBgBlCEJfRyslFjv90wI5N\niWEOYoTkY3R8RhAooq9AbFIbPPXHUiJOyqnau4FeiUTtc0ZyRv5A55qhKbsj7p4o\nbmyvEGp6cvVmnn3UGH49k5blWzm0MoksxSiYphtBxHqMyuY+Gfj6BN+JAwyrEKwl\ng/fADk89eHUjNgoedy6wWqL3\n-----END PRIVATE KEY-----"; -var adminPub = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu04e9VLNn1JHgYNIMRrU\nQ4JHhHn0wZxPCD9kcPz63SMBiYnCtRM24pK86gAaTuM4D8V2LjrA6dvBWwBOf2uF\n/4irIRXMOaI58utXECsA0r6Cw2SpCYSV8BK1y8hpnsw02/T0xYRDbFqfhvqcsBJ2\n4LI6F4tCobPoegEpbCTWoLMuMET3WZFLymYSiG42NmbcZ0KTGkwTziLylL22n5wA\nZTlfuvuBQDRbK/S9fNWzXjomhJmqsyQmo2YAR0FA1aXn7Peqo/0tCftJk8JjWozd\nPg3nTeGel5fxNuV7rmlN26xBU6p0xNg12tz+4ggrEeq99dzgkfP+KQpYlzZVBLNd\nmQIDAQAB\n-----END PUBLIC KEY-----\n"; -describe("Integration test", function () { - it("Invoke service", function () { return __awaiter(void 0, void 0, void 0, function () { - var wal, ccp, config, identity, trustID, access, didUnlock, _a, _b, _c, _d, _e, id, _f, _g, _h, _j, result, _k, _l, err_1; - return __generator(this, function (_m) { - switch (_m.label) { - case 0: - wal = wallet_1.Wallet.Instance; - _m.label = 1; - case 1: - _m.trys.push([1, 19, , 21]); - ccp = JSON.parse(fs.readFileSync(ccpPath, "utf8")); - config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: ccp, - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; - case 2: - identity = _m.sent(); - return [4 /*yield*/, wal.setDefault(identity)]; - case 3: - _m.sent(); - trustID = new trustHF_1.TrustIdHf(config); - wal.addNetwork("hf", trustID); - return [4 /*yield*/, wal.networks["hf"].configureDriver()]; - case 4: - _m.sent(); - access = { did: "did:vtn:trustos:telefonica:0", type: 2 }; - return [4 /*yield*/, wal.getDID("default")]; - case 5: - didUnlock = _m.sent(); - return [4 /*yield*/, didUnlock.unlockAccount("secret")]; - case 6: - _m.sent(); - _b = (_a = wal.networks["hf"]).createIdentity; - return [4 /*yield*/, wal.getDID("default")]; - case 7: return [4 /*yield*/, _b.apply(_a, [_m.sent()])]; - case 8: - _m.sent(); - console.log("Getting created key..."); - _d = (_c = trustID).getIdentity; - return [4 /*yield*/, wal.getDID("default")]; - case 9: - _e = [_m.sent()]; - return [4 /*yield*/, didUnlock.id]; - case 10: return [4 /*yield*/, _d.apply(_c, _e.concat([_m.sent()]))]; - case 11: - _m.sent(); - id = Date.now(); - _g = (_f = trustID).createService; - return [4 /*yield*/, wal.getDID("default")]; - case 12: return [4 /*yield*/, _g.apply(_f, [_m.sent(), "vtn:trustos:service:" + id, "chaincode", true])]; - case 13: - _m.sent(); - _j = (_h = trustID).updateService; - return [4 /*yield*/, wal.getDID("default")]; - case 14: return [4 /*yield*/, _j.apply(_h, [_m.sent(), "vtn:trustos:service:" + id, access, true])]; - case 15: - _m.sent(); - _l = (_k = trustID).invoke; - return [4 /*yield*/, wal.getDID("default")]; - case 16: return [4 /*yield*/, _l.apply(_k, [_m.sent(), - "vtn:trustos:service:1" + id, ["set", "5", "100"], - "telefonicachannel"])]; - case 17: - result = _m.sent(); - return [4 /*yield*/, wal.networks["hf"].disconnectDriver()]; - case 18: - _m.sent(); - chai_1.expect(result).to.equal("100"); - return [3 /*break*/, 21]; - case 19: - err_1 = _m.sent(); - return [4 /*yield*/, wal.networks["hf"].disconnectDriver()]; - case 20: - _m.sent(); - console.log(err_1); - return [3 /*break*/, 21]; - case 21: return [2 /*return*/]; - } - }); - }); }); -}); diff --git a/trustid-sdk/dist/test/trustHF.spec.d.ts b/trustid-sdk/dist/test/trustHF.spec.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/trustid-sdk/dist/test/trustHF.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/trustid-sdk/dist/test/trustHF.spec.js b/trustid-sdk/dist/test/trustHF.spec.js deleted file mode 100644 index d5858445..00000000 --- a/trustid-sdk/dist/test/trustHF.spec.js +++ /dev/null @@ -1,699 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var hfdriver_1 = require("../src/network/hfdriver"); -var trustHF_1 = require("../src/network/trustHF"); -var wallet_1 = require("../src/wallet"); -/* global describe, it, before, after */ -var expect = require("chai").expect; -var sinon = require("sinon"); -describe("TrustHF - Test", function () { return __awaiter(void 0, void 0, void 0, function () { - var config, wal, identity; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - wal = wallet_1.Wallet.Instance; - return [4 /*yield*/, wal.generateDID("RSA", "default", "secret")]; - case 1: - identity = _a.sent(); - return [4 /*yield*/, identity.unlockAccount("secret")]; - case 2: - _a.sent(); - before(function () { }); - describe("Configure Driver ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "connect").resolves(); - driverStub.onSecondCall().rejects(new Error("Error connecting")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Configure Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.configureDriver()]; - case 1: - _a.sent(); - sinon.assert.calledOnce(driverStub); - return [3 /*break*/, 3]; - case 2: - err_1 = _a.sent(); - console.log(err_1); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Configure Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.configureDriver()]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_2 = _a.sent(); - expect(err_2.message).to.equal("Error connecting"); - sinon.assert.calledTwice(driverStub); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Disconnect Driver ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "disconnect").resolves(); - driverStub.onSecondCall().rejects(new Error("Error disconnect")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Configure Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_3; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.disconnectDriver()]; - case 1: - _a.sent(); - sinon.assert.calledOnce(driverStub); - return [3 /*break*/, 3]; - case 2: - err_3 = _a.sent(); - console.log(err_3); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Configure Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_4; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.disconnectDriver()]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_4 = _a.sent(); - expect(err_4.message).to.equal("Error disconnect"); - sinon.assert.calledTwice(driverStub); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Create identity ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Create Identity", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_5; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.createIdentity(identity)]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_5 = _a.sent(); - console.log(err_5); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Connect Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - return __generator(this, function (_a) { - try { - } - catch (err) { - expect(err.message).to.equal("Error calling contract"); - } - return [2 /*return*/]; - }); - }); }); - }); - describe("Create identity ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Create Identity", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_6; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.createIdentity(identity)]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_6 = _a.sent(); - console.log(err_6); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Create Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_7; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.createIdentity(identity)]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_7 = _a.sent(); - expect(err_7.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Verify identity ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Verify IdentitY", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_8; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.verifyIdentity(identity, "id")]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_8 = _a.sent(); - console.log(err_8); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Verify Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_9; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.verifyIdentity(identity, "id")]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_9 = _a.sent(); - expect(err_9.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Revoke identity ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Revoke IdentitY Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_10; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.revokeIdentity(identity, "id")]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_10 = _a.sent(); - console.log(err_10); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Revoke Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_11; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.revokeIdentity(identity, "id")]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_11 = _a.sent(); - expect(err_11.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Get identity ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("This is identity"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Get IdentitY Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_12; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.getIdentity(identity, "id")]; - case 1: - result = _a.sent(); - expect(result).to.equal("This is identity"); - return [3 /*break*/, 3]; - case 2: - err_12 = _a.sent(); - console.log(err_12); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Get identity Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_13; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.getIdentity(identity, "id")]; - case 1: - result = _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_13 = _a.sent(); - expect(err_13.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Create Service ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Create Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_14; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.createService(identity, "id", "name")]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_14 = _a.sent(); - console.log(err_14); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Create Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_15; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.createService(identity, "id", "name")]; - case 1: - result = _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_15 = _a.sent(); - expect(err_15.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Update Service ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - var access = { - type: 1, - did: "ksjdskjd" - }; - it("Update Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_16; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.updateService(identity, "id", access)]; - case 1: - result = _a.sent(); - expect(result).to.equal("OK"); - return [3 /*break*/, 3]; - case 2: - err_16 = _a.sent(); - console.log(err_16); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Update Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_17; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.updateService(identity, "id", access)]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_17 = _a.sent(); - expect(err_17.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Get Service ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("Service1"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - var access = { - type: 1, - did: "ksjdskjd" - }; - it("Get Service Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_18; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.getService(identity, "id")]; - case 1: - result = _a.sent(); - expect(result).to.equal("Service1"); - return [3 /*break*/, 3]; - case 2: - err_18 = _a.sent(); - console.log(err_18); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Get Service Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_19; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.getService(identity, "id")]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_19 = _a.sent(); - expect(err_19.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Invoke Service ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "callContractTransaction").resolves("result"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Invoke Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_20; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.invoke(identity, "id", ["a"], "channel1")]; - case 1: - result = _a.sent(); - expect(result).to.equal("result"); - return [3 /*break*/, 3]; - case 2: - err_20 = _a.sent(); - console.log(err_20); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Invoke Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_21; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.invoke(identity, "id", ["a"], "channel1")]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_21 = _a.sent(); - expect(err_21.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - describe("Query Service ", function () { - var driverStub; - before(function (done) { - driverStub = sinon.stub(hfdriver_1.HfDriver.prototype, "getContractTransaction").resolves("result"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); - done(); - }); - after(function (done) { - driverStub.restore(); - done(); - }); - it("Query Success", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, result, err_22; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.query(identity, "id", ["a"], "channel1")]; - case 1: - result = _a.sent(); - expect(result).to.equal("result"); - return [3 /*break*/, 3]; - case 2: - err_22 = _a.sent(); - console.log(err_22); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - it("Query Fail", function () { return __awaiter(void 0, void 0, void 0, function () { - var trustID, err_23; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2, , 3]); - trustID = new trustHF_1.TrustIdHf(config); - return [4 /*yield*/, trustID.query(identity, "id", ["a"], "channel1")]; - case 1: - _a.sent(); - return [3 /*break*/, 3]; - case 2: - err_23 = _a.sent(); - expect(err_23.message).to.equal("Error calling contract"); - return [3 /*break*/, 3]; - case 3: return [2 /*return*/]; - } - }); - }); }); - }); - return [2 /*return*/]; - } - }); -}); }); diff --git a/trustid-sdk/dist/test/wallet.spec.d.ts b/trustid-sdk/dist/test/wallet.spec.d.ts deleted file mode 100644 index 53eb506e..00000000 --- a/trustid-sdk/dist/test/wallet.spec.d.ts +++ /dev/null @@ -1 +0,0 @@ -import 'mocha'; diff --git a/trustid-sdk/dist/test/wallet.spec.js b/trustid-sdk/dist/test/wallet.spec.js deleted file mode 100644 index 8d08723a..00000000 --- a/trustid-sdk/dist/test/wallet.spec.js +++ /dev/null @@ -1,171 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (this && this.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - 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; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; -Object.defineProperty(exports, "__esModule", { value: true }); -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -var chai_1 = require("chai"); -var wallet_1 = require("../src/wallet"); -var fileKeystore_1 = require("../src/keystore/fileKeystore"); -require("mocha"); -var wal = wallet_1.Wallet.Instance; -//const hfdriver = wal.drivers.hf -var ks = new fileKeystore_1.FileKeystore('file'); -wal.setKeystore(ks); -describe('Wallet tests', function () { - it('creates new wallet', function () { - chai_1.expect(wal).to.not.equal({}); - }); - it('Creates FileKeystore for integration in wallet', function () { - chai_1.expect(ks).to.not.equal({}); - }); - it('wallet not initialized twice', function () { - var wal2 = wallet_1.Wallet.Instance; - chai_1.expect(wal).to.equal(wal2); - }); - it('generate RSA DID', function () { return __awaiter(void 0, void 0, void 0, function () { - var did, did2, _a, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: return [4 /*yield*/, wal.generateDID('RSA', 'default', 'secret')]; - case 1: - did = _c.sent(); - return [4 /*yield*/, wal.generateDID('RSA', 'default', 'secret')]; - case 2: - did2 = _c.sent(); - chai_1.expect([did.type, did.controller]).to.eql(['RSA', 'default']); - _a = chai_1.expect; - return [4 /*yield*/, wal.getDID(did.id)]; - case 3: - _a.apply(void 0, [_c.sent()]).to.eql(did); - _b = chai_1.expect; - return [4 /*yield*/, wal.getDID(did.id)]; - case 4: - _b.apply(void 0, [_c.sent()]).to.not.eql(did2); - return [2 /*return*/]; - } - }); - }); }); - it('DID operations', function () { return __awaiter(void 0, void 0, void 0, function () { - var did, did2, payload, err_1, err_2, err_3, signed, verified, err_4, err_5; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, wal.generateDID('EC', 'default', 'secret')]; - case 1: - did = _a.sent(); - return [4 /*yield*/, wal.generateDID('EC', 'default', 'secret')]; - case 2: - did2 = _a.sent(); - payload = { my: "payload" }; - _a.label = 3; - case 3: - _a.trys.push([3, 5, , 6]); - return [4 /*yield*/, wal.generateDID('ed213', 'default', 'secret')]; - case 4: - _a.sent(); - return [3 /*break*/, 6]; - case 5: - err_1 = _a.sent(); - chai_1.expect(err_1).to.be.an('error'); - return [3 /*break*/, 6]; - case 6: - _a.trys.push([6, 8, , 9]); - return [4 /*yield*/, did.unlockAccount('wrong')]; - case 7: - _a.sent(); - return [3 /*break*/, 9]; - case 8: - err_2 = _a.sent(); - chai_1.expect(err_2).to.be.an('error'); - return [3 /*break*/, 9]; - case 9: - _a.trys.push([9, 11, , 12]); - return [4 /*yield*/, did.sign(payload)]; - case 10: - _a.sent(); - return [3 /*break*/, 12]; - case 11: - err_3 = _a.sent(); - chai_1.expect(err_3).to.be.an('error'); - return [3 /*break*/, 12]; - case 12: return [4 /*yield*/, did2.unlockAccount('secret')]; - case 13: - _a.sent(); - return [4 /*yield*/, did.unlockAccount('secret')]; - case 14: - _a.sent(); - return [4 /*yield*/, did2.sign(payload)]; - case 15: - signed = _a.sent(); - return [4 /*yield*/, did.verify(signed, did2)]; - case 16: - verified = _a.sent(); - chai_1.expect(verified).to.eql(payload); - _a.label = 17; - case 17: - _a.trys.push([17, 19, , 20]); - return [4 /*yield*/, did.verify(signed, did)]; - case 18: - _a.sent(); - return [3 /*break*/, 20]; - case 19: - err_4 = _a.sent(); - chai_1.expect(err_4).to.be.an('error'); - return [3 /*break*/, 20]; - case 20: - did.lockAccount(); - _a.label = 21; - case 21: - _a.trys.push([21, 23, , 24]); - return [4 /*yield*/, did.sign(payload)]; - case 22: - _a.sent(); - return [3 /*break*/, 24]; - case 23: - err_5 = _a.sent(); - chai_1.expect(err_5).to.be.an('error'); - return [3 /*break*/, 24]; - case 24: return [2 /*return*/]; - } - }); - }); }); -}); diff --git a/trustid-sdk/index.ts b/trustid-sdk/index.ts index 7fca5bf2..96722b40 100755 --- a/trustid-sdk/index.ts +++ b/trustid-sdk/index.ts @@ -11,5 +11,9 @@ import {FileKeystore} from "./src/keystore/fileKeystore"; import {MongoKeystore} from "./src/keystore/mongoKeystore"; import {LocalStorageKeystore} from "./src/keystore/localStorageKeystore"; import {TrustIdHf} from "./src/network/trustHF" +import {AccessPolicy, PolicyType} from "./src/network/trustInterface"; -export {Wallet, DID, FileKeystore, MongoKeystore, LocalStorageKeystore, TrustIdHf}; +export {Wallet, DID, + FileKeystore, MongoKeystore, + LocalStorageKeystore, TrustIdHf, + AccessPolicy, PolicyType}; diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 5dc6efe0..9e339151 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -5,19 +5,102 @@ "requires": true, "dependencies": { "@babel/runtime": { - "version": "7.9.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.6.tgz", - "integrity": "sha512-64AF1xY3OAkFHqOb9s4jpgk1Mm5vDZ4L3acHvAml+53nO1XbXLuDodsVpO4OIUsmemlUHMxNdYMNJmsvOwLrvQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", + "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", "dev": true, "requires": { "regenerator-runtime": "^0.13.4" } }, + "@grpc/grpc-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", + "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", + "optional": true, + "requires": { + "semver": "^6.2.0" + } + }, + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", + "optional": true, + "requires": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + } + }, "@panva/asn1.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", + "optional": true + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "optional": true + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "optional": true + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", + "optional": true + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "optional": true, + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", + "optional": true + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", + "optional": true + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", + "optional": true + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", + "optional": true + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", + "optional": true + }, "@semantic-ui-react/event-stack": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz", @@ -29,9 +112,9 @@ } }, "@sinonjs/commons": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.2.tgz", - "integrity": "sha512-+DUO6pnp3udV/v2VfUWgaY5BIE1IfT7lLfeDzPVeMT1XKkaAp9LgSI9x5RtrFQoZ9Oi0PgXQQHPaoKu7dCjVxw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", + "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", "dev": true, "requires": { "type-detect": "4.0.8" @@ -102,16 +185,6 @@ "@types/node": "*" } }, - "@types/bytebuffer": { - "version": "5.0.41", - "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.41.tgz", - "integrity": "sha512-Mdrv4YcaHvpkx25ksqqFaezktx3yZRcd51GZY0rY/9avyaqZdiT/GiWRhfrJhMpgzXqTOSHgGvsumGxJFNiZZA==", - "optional": true, - "requires": { - "@types/long": "*", - "@types/node": "*" - } - }, "@types/caseless": { "version": "0.12.2", "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", @@ -125,9 +198,9 @@ "dev": true }, "@types/crypto-js": { - "version": "3.1.46", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.46.tgz", - "integrity": "sha512-w1rUo6jY6dhNQXOl85UAvJHPX8pIqzfUH2E1+HxU3Z4HsuAaiYPkogEplJqD5QmtDtWC5MUkULtJEvpX5501xQ==", + "version": "3.1.47", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", + "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", "dev": true }, "@types/jwk-to-pem": { @@ -155,66 +228,53 @@ "dev": true }, "@types/mongodb": { - "version": "3.5.14", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.14.tgz", - "integrity": "sha512-6SBBf4/pFTPu+Xmio6A4JPv/zXbsS/h7d3SdhaXRfTdE8pPNKUfOG3Tn7O0sjcu7Nz0syorSiQE6CMcoQD15TQ==", + "version": "3.5.25", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.25.tgz", + "integrity": "sha512-2H/Owt+pHCl9YmBOYnXc3VdnxejJEjVdH+QCWL5ZAfPehEn3evygKBX3/vKRv7aTwfNbUd0E5vjJdQklH/9a6w==", "requires": { "@types/bson": "*", "@types/node": "*" } }, "@types/mongoose": { - "version": "5.7.14", - "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.14.tgz", - "integrity": "sha512-jdMhuIluxmPKP58juOvQEl1C0syqyG0LK19zP+FRha0gvlFUwttXr2uxX4pzTHcuu/V6omzia9iGeXCoTEOT+w==", + "version": "5.7.29", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.29.tgz", + "integrity": "sha512-+7u1akCerciZ2MG66p6Vy+9Tg7dYcgSeNbDInxdOA5vB5xAZhNiIBj8HESnJmIqOBcWxQ90HpaPWtEwggBqXug==", "requires": { "@types/mongodb": "*", "@types/node": "*" } }, "@types/node": { - "version": "13.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.1.tgz", - "integrity": "sha512-Zq8gcQGmn4txQEJeiXo/KiLpon8TzAl0kmKH4zdWctPj05nWwp1ClMdAVEloqrQKfaC48PNLdgN/aVaLqUrluA==" + "version": "13.13.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.12.tgz", + "integrity": "sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw==" }, "@types/node-jose": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.3.tgz", - "integrity": "sha512-rjFWRAc7hHhdTUutZsrL3P4q+ousHuFBibK4xfUsjq8hogGtaVMQsBY9PBapB9Axxz1t8pPlT+VpJX8Xpz44Fg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.4.tgz", + "integrity": "sha512-qdCc4utrY71TF8Ghm+uW92EAZU9PW3kok4yvEbdFT/GRZ5VvsU3NuZH59mxfOFBtdsHiLjWjOsXlVSPC3z6cJw==", "dev": true, "requires": { "@types/node": "*" } }, "@types/request": { - "version": "2.48.4", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.4.tgz", - "integrity": "sha512-W1t1MTKYR8PxICH+A4HgEIPuAC3sbljoEVfyZbeFJJDbr30guDspJri2XOaM2E+Un7ZjrihaDi7cf6fPa2tbgw==", + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", "optional": true, "requires": { "@types/caseless": "*", "@types/node": "*", "@types/tough-cookie": "*", "form-data": "^2.5.0" - }, - "dependencies": { - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } } }, "@types/sinon": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.0.tgz", - "integrity": "sha512-v2TkYHkts4VXshMkcmot/H+ERZ2SevKa10saGaJPGCJ8vh3lKrC4u663zYEeRZxep+VbG6YRDtQ6gVqw9dYzPA==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", + "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -251,10 +311,9 @@ "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "3.2.1", @@ -290,16 +349,6 @@ "sprintf-js": "~1.0.2" } }, - "ascli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", - "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", - "optional": true, - "requires": { - "colour": "~0.7.1", - "optjs": "~3.2.2" - } - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -340,9 +389,9 @@ "optional": true }, "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", "optional": true }, "axios": { @@ -365,7 +414,8 @@ "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "base64-js": { "version": "1.3.1", @@ -387,9 +437,9 @@ } }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true }, "bl": { @@ -407,15 +457,16 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" }, "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -468,20 +519,17 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "bytebuffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", - "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", - "optional": true, - "requires": { - "long": "~3" - } + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", + "optional": true }, "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "optional": true }, "caseless": { "version": "0.12.0", @@ -554,64 +602,42 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "optional": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } - }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - } + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, "cloudant-follow": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", - "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", + "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", "optional": true, "requires": { "browser-request": "~0.3.0", - "debug": "^3.0.0", - "request": "^2.83.0" + "debug": "^4.0.1", + "request": "^2.88.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "optional": true + } } }, "code-point-at": { @@ -639,12 +665,6 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" }, - "colour": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", - "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=", - "optional": true - }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -655,16 +675,16 @@ } }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -780,9 +800,9 @@ } }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "optional": true, "requires": { "bn.js": "^4.4.0", @@ -807,22 +827,22 @@ "optional": true }, "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", "object-inspect": "^1.7.0", "object-keys": "^1.1.1", "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" } }, "es-to-primitive": { @@ -883,41 +903,37 @@ "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", "optional": true, "requires": { - "fabric-common": "^2.1.0", + "fabric-common": "^2.1.1", "jsrsasign": "^7.2.2", "url": "^0.11.0", "util": "^0.10.3", "winston": "^2.4.0" + } + }, + "fabric-common": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.1.tgz", + "integrity": "sha512-IwkOTB/jJIm2aOfJaYFirCYrorIb8TvW7lvU65b/CGwpXK1GuFWYOYCZa+SXggl9z4ZoADDrIYTZ76BAaFIDKQ==", + "optional": true, + "requires": { + "callsite": "^1.0.0", + "elliptic": "^6.5.2", + "fabric-protos": "2.1.1", + "js-sha3": "^0.7.0", + "jsrsasign": "^8.0.15", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" }, "dependencies": { - "fabric-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.0.tgz", - "integrity": "sha512-t980mEGBlbVTq2y6Zi3ZtVN5RnUy5xNoRWhPTpifAsI1m0KYBSh8jPcxtybMrLds12J/PAE7qI4TrgbZMqapKg==", - "optional": true, - "requires": { - "elliptic": "^6.2.3", - "fabric-protos": "^2.1.0", - "js-sha3": "^0.7.0", - "nano": "^6.4.4", - "nconf": "^0.10.0", - "pkcs11js": "^1.0.6", - "promise-settle": "^0.3.0", - "sjcl": "1.0.7", - "winston": "^2.4.0", - "yn": "^3.1.0" - } - }, - "fabric-protos": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.0.tgz", - "integrity": "sha512-99+5ouNLUGz6sA5wQJyhpCYUGlfk8JHWSPUtjutnTRyb40TnbfebmG6k7lBCI6Kjyd7l9AHlD5yZuF7oCqAgkA==", - "optional": true, - "requires": { - "grpc": "1.24.2", - "lodash.clone": "4.5.0", - "protobufjs": "^5.0.3" - } + "jsrsasign": { + "version": "8.0.20", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", + "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", + "optional": true } } }, @@ -927,161 +943,49 @@ "integrity": "sha512-9VqUvYX2fROleTl1sKIx51EhLDfhDxDMHIgafRvicBFJKYAeQ6nyKWmk3gZIlGxmB2LjpIV+WzwR5Z2PiNI03w==", "optional": true, "requires": { - "fabric-ca-client": "^2.1.0", - "fabric-common": "^2.1.0", + "fabric-ca-client": "^2.1.1", + "fabric-common": "^2.1.1", "fs-extra": "^8.1.0", "long": "^4.0.0", "nano": "^8.1.0", "winston": "^2.4.0" }, "dependencies": { - "cloudant-follow": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", - "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", - "optional": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, "fabric-ca-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", - "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.1.tgz", + "integrity": "sha512-TcX/frTOun76DPh3FcKQ3kCue1K2CK00H43ZGBqIQGqtF42pDeNRqDSrAbvYTujg9lzKVLRZl2k0h4m/oP2UaQ==", "optional": true, "requires": { - "fabric-common": "^2.1.0", - "jsrsasign": "^7.2.2", + "fabric-common": "2.1.1", + "jsrsasign": "^8.0.15", "url": "^0.11.0", - "util": "^0.10.3", "winston": "^2.4.0" } }, - "fabric-common": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.0.tgz", - "integrity": "sha512-t980mEGBlbVTq2y6Zi3ZtVN5RnUy5xNoRWhPTpifAsI1m0KYBSh8jPcxtybMrLds12J/PAE7qI4TrgbZMqapKg==", - "optional": true, - "requires": { - "elliptic": "^6.2.3", - "fabric-protos": "^2.1.0", - "js-sha3": "^0.7.0", - "nano": "^6.4.4", - "nconf": "^0.10.0", - "pkcs11js": "^1.0.6", - "promise-settle": "^0.3.0", - "sjcl": "1.0.7", - "winston": "^2.4.0", - "yn": "^3.1.0" - }, - "dependencies": { - "cloudant-follow": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", - "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", - "optional": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^3.0.0", - "request": "^2.83.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "optional": true, - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "optional": true - } - } - }, - "nano": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", - "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", - "optional": true, - "requires": { - "cloudant-follow": "~0.17.0", - "debug": "^2.2.0", - "errs": "^0.3.2", - "lodash.isempty": "^4.4.0", - "request": "^2.85.0" - } - } - } - }, - "fabric-protos": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.0.tgz", - "integrity": "sha512-99+5ouNLUGz6sA5wQJyhpCYUGlfk8JHWSPUtjutnTRyb40TnbfebmG6k7lBCI6Kjyd7l9AHlD5yZuF7oCqAgkA==", - "optional": true, - "requires": { - "grpc": "1.24.2", - "lodash.clone": "4.5.0", - "protobufjs": "^5.0.3" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "optional": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "jsrsasign": { + "version": "8.0.20", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", + "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", "optional": true - }, - "nano": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", - "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", - "optional": true, - "requires": { - "@types/request": "^2.48.4", - "cloudant-follow": "^0.18.2", - "debug": "^4.1.1", - "errs": "^0.3.2", - "request": "^2.88.0" - } } } }, + "fabric-protos": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.1.tgz", + "integrity": "sha512-ENki8xgRQqxd/qe0EVvNlr7k2LmEOMqGrrw22+ufY/sAE8OyFXpQa3+1J9wErzN+cASt2t/DuCaIIKURPJrFRg==", + "optional": true, + "requires": { + "@grpc/grpc-js": "1.0.3", + "@grpc/proto-loader": "0.5.4", + "lodash.clone": "4.5.0" + } + }, "fast-deep-equal": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "optional": true }, "fast-json-stable-stringify": { @@ -1130,656 +1034,107 @@ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "optional": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "grpc": { - "version": "1.24.2", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.24.2.tgz", - "integrity": "sha512-EG3WH6AWMVvAiV15d+lr+K77HJ/KV/3FvMpjKjulXHbTwgDZkhkcWbwhxFAoTdxTkQvy0WFcO3Nog50QBbHZWw==", - "optional": true, - "requires": { - "@types/bytebuffer": "^5.0.40", - "lodash.camelcase": "^4.3.0", - "lodash.clone": "^4.5.0", - "nan": "^2.13.2", - "node-pre-gyp": "^0.14.0", - "protobufjs": "^5.0.3" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "resolved": false, - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": false, - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "optional": true - }, - "aproba": { - "version": "1.2.0", - "resolved": false, - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "resolved": false, - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": false, - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "resolved": false, - "integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==", - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": false, - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": false, - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "optional": true - }, - "debug": { - "version": "3.2.6", - "resolved": false, - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": false, - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "optional": true - }, - "delegates": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": false, - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "resolved": false, - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "optional": true - }, - "gauge": { - "version": "2.7.4", - "resolved": false, - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.4", - "resolved": false, - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "resolved": false, - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": false, - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "resolved": false, - "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": false, - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": false, - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "optional": true - }, - "ini": { - "version": "1.3.5", - "resolved": false, - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": false, - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": false, - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": false, - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "optional": true - }, - "minipass": { - "version": "2.9.0", - "resolved": false, - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "resolved": false, - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "resolved": false, - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "optional": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": false, - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "optional": true - } - } - }, - "ms": { - "version": "2.1.2", - "resolved": false, - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - }, - "needle": { - "version": "2.4.0", - "resolved": false, - "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "resolved": false, - "integrity": "sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==", - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "resolved": false, - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "resolved": false, - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", - "optional": true - }, - "npm-packlist": { - "version": "1.4.6", - "resolved": false, - "integrity": "sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg==", - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": false, - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": false, - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": false, - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "optional": true - }, - "once": { - "version": "1.4.0", - "resolved": false, - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": false, - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": false, - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": false, - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "optional": true - }, - "rc": { - "version": "1.2.8", - "resolved": false, - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": false, - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": false, - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": false, - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": false, - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true - }, - "sax": { - "version": "1.2.4", - "resolved": false, - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "optional": true - }, - "semver": { - "version": "5.7.1", - "resolved": false, - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": false, - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": false, - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": false, - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": false, - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": false, - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "optional": true - }, - "tar": { - "version": "4.4.13", - "resolved": false, - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": false, - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": false, - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "optional": true - }, - "yallist": { - "version": "3.1.1", - "resolved": false, - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "optional": true - } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" } }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, "gud": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", @@ -1889,6 +1244,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -1906,9 +1262,9 @@ "optional": true }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true }, "invert-kv": { @@ -1939,9 +1295,9 @@ "dev": true }, "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", "dev": true }, "is-date-object": { @@ -1980,12 +1336,12 @@ "dev": true }, "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", "dev": true, "requires": { - "has": "^1.0.3" + "has-symbols": "^1.0.1" } }, "is-symbol": { @@ -2021,9 +1377,9 @@ "optional": true }, "jose": { - "version": "1.27.0", - "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.0.tgz", - "integrity": "sha512-SxYPCM9pWDaK070CXbxgL4ktVzLlE0yJxevDJtbWxv2WMQwYfpBZLYlG8PhChsiOfOXp6FrceRgTuZh1vZeDlg==", + "version": "1.27.1", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.1.tgz", + "integrity": "sha512-VyHM6IJPw0TTGqHVNlPWg16/ASDPAmcChcLqSb3WNBvwWFoWPeFqlmAUCm8/oIG1GjZwAlUDuRKFfycowarcVA==", "requires": { "@panva/asn1.js": "^1.0.0" } @@ -2165,12 +1521,6 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "lodash.isempty": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", - "optional": true - }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -2181,10 +1531,9 @@ } }, "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=", - "optional": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, "loose-envify": { "version": "1.4.0", @@ -2250,6 +1599,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2270,9 +1620,9 @@ } }, "mocha": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", - "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -2301,6 +1651,23 @@ "yargs-unparser": "1.6.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -2310,20 +1677,6 @@ "ms": "^2.1.1" } }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -2356,6 +1709,17 @@ "ansi-regex": "^4.1.0" } }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", @@ -2383,9 +1747,9 @@ } }, "mongodb": { - "version": "3.5.7", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.7.tgz", - "integrity": "sha512-lMtleRT+vIgY/JhhTn1nyGwnSMmJkJELp+4ZbrjctrnBxuLbj6rmLuJFz8W2xUzUqWmqoyVxJLYuC58ZKpcTYQ==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz", + "integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==", "requires": { "bl": "^2.2.0", "bson": "^1.1.4", @@ -2396,13 +1760,13 @@ } }, "mongoose": { - "version": "5.9.15", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.15.tgz", - "integrity": "sha512-dGIDqaQkAJoLl7lsRLy70mDg+VcL1IPOHr/0f23MLF45PtnM5exRdmienfyVjdrSVGgTus+1sMUKef6vSnrDZg==", + "version": "5.9.20", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.20.tgz", + "integrity": "sha512-vRP6Csu2obzSl3ed7kTQMrolBNgweiRJ/eBU1PSe/rJfjqWS1oqDE2D1ZPGxkVOsKXs7Gyd84GAXerj8IB2UWg==", "requires": { "bson": "^1.1.4", "kareem": "2.3.1", - "mongodb": "3.5.7", + "mongodb": "3.5.9", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.7.0", "mquery": "3.2.2", @@ -2466,26 +1830,32 @@ "optional": true }, "nano": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", - "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", + "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", "optional": true, "requires": { - "cloudant-follow": "~0.17.0", - "debug": "^2.2.0", + "@types/request": "^2.48.4", + "cloudant-follow": "^0.18.2", + "debug": "^4.1.1", "errs": "^0.3.2", - "lodash.isempty": "^4.4.0", - "request": "^2.85.0" + "request": "^2.88.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "optional": true } } }, @@ -2514,9 +1884,9 @@ "dev": true }, "nise": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.3.tgz", - "integrity": "sha512-EGlhjm7/4KvmmE6B/UFsKh7eHykRl9VH+au8dduHLCyWUO/hr7+N+WtTvDUwc9zHuM1IaIJs/0lQ6Ag1jDkQSg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", + "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0", @@ -2532,13 +1902,6 @@ "integrity": "sha512-y5pClvPYkG7cTPRDmyNeCuOseyRFuZbrvQVbyAEhkfRWtfhyyu6lHYUjBSJzrSZXlbkCIlx+TKqLDAEhxc9Vkw==", "requires": { "node-bin-setup": "^1.0.0" - }, - "dependencies": { - "node-darwin-x64": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/node-darwin-x64/-/node-darwin-x64-13.14.0.tgz", - "integrity": "sha512-51Dp2ZSLt4aV4hy2GvbsVOw6YXmEBE+25nTDas92OdxtdJiSWf6kVwVjlY45EVqlnT9j/b11UY4hSeQQskM8VA==" - } } }, "node-bin-setup": { @@ -2554,6 +1917,14 @@ "requires": { "object.getownpropertydescriptors": "^2.0.3", "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "node-forge": { @@ -2574,13 +1945,6 @@ "pako": "^1.0.11", "process": "^0.11.10", "uuid": "^3.3.3" - }, - "dependencies": { - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - } } }, "normalize-path": { @@ -2607,9 +1971,9 @@ "dev": true }, "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", "dev": true }, "object-is": { @@ -2654,6 +2018,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -2663,12 +2028,6 @@ "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" }, - "optjs": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", - "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=", - "optional": true - }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -2725,7 +2084,8 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-parse": { "version": "1.0.6", @@ -2817,15 +2177,24 @@ } }, "protobufjs": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", - "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", + "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", "optional": true, "requires": { - "ascli": "~1", - "bytebuffer": "~5", - "glob": "^7.0.5", - "yargs": "^3.10.0" + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" } }, "psl": { @@ -2835,9 +2204,9 @@ "optional": true }, "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", "optional": true }, "qs": { @@ -2982,6 +2351,19 @@ "tough-cookie": "~2.5.0", "tunnel-agent": "^0.6.0", "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } } }, "require-directory": { @@ -3003,6 +2385,13 @@ "requires": { "resolve-from": "^2.0.0", "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "resolve": { @@ -3084,9 +2473,10 @@ } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "optional": true }, "set-blocking": { "version": "2.0.0", @@ -3239,28 +2629,6 @@ "es-abstract": "^1.17.5" } }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" - } - }, "string.prototype.trimstart": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", @@ -3292,13 +2660,6 @@ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - } } }, "strip-json-comments": { @@ -3343,12 +2704,20 @@ "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "optional": true + } } }, "ts-lib-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.6.1.tgz", - "integrity": "sha512-370VtR3BMf5urHirZ7rRaUdlMqERjz0BjK50qqNlc6QLur4yUr/rC6oq2XdbGUU86kNsg+gtHude+kzDijlFYA==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.7.2.tgz", + "integrity": "sha512-SBOsyeNB8ECoSQkwgYaecn2yVIY7WCFkcfzXIu0iGyg6gCC5bXGr+jwBbDVnUjAfN0MOI3J66gVLdnv/GYak3g==", "dev": true, "requires": { "glob": "7", @@ -3356,9 +2725,9 @@ } }, "ts-node": { - "version": "8.10.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.1.tgz", - "integrity": "sha512-bdNz1L4ekHiJul6SHtZWs1ujEKERJnHs4HxN7rjTyyVOFf3HaJ6sLqe6aPG62XTzAB/63pKRh5jTSWL0D7bsvw==", + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", "dev": true, "requires": { "arg": "^4.1.0", @@ -3415,13 +2784,13 @@ "optional": true }, "type-coverage-core": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.6.1.tgz", - "integrity": "sha512-KO3LcbWj8BVsiz2PTS0qyE/r3QBvR7NhBfrCnvp9Wm2OWQCJAVzjVuzvNri4MI848AD0xP9K0AIkLtPWflKtIQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.8.3.tgz", + "integrity": "sha512-Go4QSExs0kGcW9yxvIAv4XSAuIC89cAbdb9Qqj/XdqcYoT2X3fB6x+2jwYwE/opbgrAHijh23TT/C6w9VEj6rw==", "dev": true, "requires": { "minimatch": "3", - "ts-lib-utils": "^2.6.1", + "ts-lib-utils": "^2.7.2", "tslib": "1 || 2", "tsutils": "3" } @@ -3478,9 +2847,9 @@ } }, "typescript": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", - "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", + "version": "3.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", + "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", "dev": true }, "typescript-coverage-report": { @@ -3506,24 +2875,15 @@ "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", "dev": true - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true } } }, "uglify-js": { - "version": "3.9.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz", - "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==", + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", + "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", "dev": true, - "optional": true, - "requires": { - "commander": "~2.20.3" - } + "optional": true }, "underscore": { "version": "1.10.2", @@ -3543,6 +2903,14 @@ "optional": true, "requires": { "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "optional": true + } } }, "url": { @@ -3553,14 +2921,6 @@ "requires": { "punycode": "1.3.2", "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "optional": true - } } }, "util": { @@ -3639,9 +2999,9 @@ "optional": true }, "winston": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz", - "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", "optional": true, "requires": { "async": "~1.0.0", @@ -3679,7 +3039,8 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "y18n": { "version": "3.2.1", @@ -3700,25 +3061,6 @@ "string-width": "^1.0.1", "window-size": "^0.1.4", "y18n": "^3.2.0" - }, - "dependencies": { - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "optional": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - } } }, "yargs-parser": { @@ -3729,6 +3071,14 @@ "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } } }, "yargs-unparser": { @@ -3742,6 +3092,23 @@ "yargs": "^13.3.0" }, "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -3768,6 +3135,17 @@ "ansi-regex": "^4.1.0" } }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, "y18n": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json index 3a10b608..760918ce 100755 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "test": "mocha --require ts-node/register dist/test/integration", + "test": "mocha --timeout 50000 --require ts-node/register dist/test/integration", "build": "rm -rf dist && tsc", "build-light": "rm -rf dist-light && tsc --build tsconfig-light.json", "build-single-file": "rm -rf dist-light && tsc --build tsconfig-singleFile.json", diff --git a/trustid-sdk/sonar-project.properties b/trustid-sdk/sonar-project.properties new file mode 100644 index 00000000..dec65f11 --- /dev/null +++ b/trustid-sdk/sonar-project.properties @@ -0,0 +1,20 @@ +# must be unique in a given SonarQube instance +sonar.projectKey=blockchainteam:coren-trustid-sdk +# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. +sonar.projectName=coren-trustid-sdk +sonar.projectVersion=0.0.1 +sonar.language=ts +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +# Since SonarQube 4.2, this property is optional if sonar.modules is set. +# If not set, SonarQube starts looking for source code from the directory containing +# the sonar-project.properties file. +sonar.sources=src/ +sonar.exclusions=.properties, *.md, node_modules/**, test/**, coverage/**,*.sh, *.sh, *.py, test/**, dist/src/**, dist/test/**.d.ts +sonar.tests=dist/test/ + +sonar.dynamicAnalysis=reuseReports + +sonar.javascript.lcov.reportPaths=coverage/lcov.info + +# Encoding of the source code. Default is default system encoding +sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/trustid-sdk/src/network/trustHF.ts b/trustid-sdk/src/network/trustHF.ts index 93d63e9c..ebc4524f 100755 --- a/trustid-sdk/src/network/trustHF.ts +++ b/trustid-sdk/src/network/trustHF.ts @@ -5,7 +5,7 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {TrustID, Access} from "./trustInterface"; +import {TrustID, AccessPolicy} from "./trustInterface"; import {HfDriver, HfConfig} from "./hfdriver"; import {DID} from "../wallet"; @@ -55,7 +55,7 @@ export class TrustIdHf extends TrustID { await this.driver.disconnect(); } /** createIdentity registers a new unverified identity */ - public async createIdentity(did: DID): Promise { + public async createSelfIdentity(did: DID): Promise { const args = [ JSON.stringify({ publicKey: did.pubkey, @@ -76,7 +76,28 @@ export class TrustIdHf extends TrustID { ); return res; } - + /** createIdentity registers a new unverified identity */ + public async createIdentity(did: DID, controller: DID): Promise { + const args = [ + JSON.stringify({ + did: controller.id, + payload: await controller.sign({ + function: "createIdentity", + params: { + did: did.id, + publicKey: did.pubkey, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } /** VerifyIdentity allow admins to verify user identityes */ public async verifyIdentity(adminDID: DID, id: string): Promise { const args = [ @@ -146,7 +167,7 @@ export class TrustIdHf extends TrustID { } /** Registers new service in the platform */ - public async createService(did: DID, serviceDID: string, name: string, isPublic: boolean = true): Promise { + public async createService(did: DID, serviceDID: string, name: string, accessPolicy: AccessPolicy, channel: string): Promise { const args = [ JSON.stringify({ did: did.id, @@ -155,7 +176,8 @@ export class TrustIdHf extends TrustID { params: { did: serviceDID, name: name, - isPublic: isPublic, + channel: channel, + accessPolicy: accessPolicy, }, }), }), @@ -173,8 +195,7 @@ export class TrustIdHf extends TrustID { public async updateService( did: DID, serviceDID: string, - access: Access, - isPublic: boolean = true + access: AccessPolicy ): Promise { const args = [ JSON.stringify({ @@ -184,7 +205,6 @@ export class TrustIdHf extends TrustID { params: { did: serviceDID, access: access, - isPublic: isPublic, }, }), }), diff --git a/trustid-sdk/src/network/trustInterface.ts b/trustid-sdk/src/network/trustInterface.ts index c1f438d5..6369e766 100755 --- a/trustid-sdk/src/network/trustInterface.ts +++ b/trustid-sdk/src/network/trustInterface.ts @@ -12,12 +12,14 @@ export abstract class TrustID { abstract configureDriver(): Promise; abstract disconnectDriver(): Promise; - abstract createIdentity(did: DID): Promise; + abstract createIdentity(did: DID, controller: DID): Promise; + abstract createSelfIdentity(did: DID): Promise; + abstract verifyIdentity(adminDID: DID, id:string): Promise; abstract getIdentity(did: DID, id: string): Promise; abstract revokeIdentity(adminDID: DID, id: string): Promise; - abstract createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise; - abstract updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise; + abstract createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise; + abstract updateService(did: DID, serviceDID: string, access: AccessPolicy): Promise; abstract getService(did: DID, serviceDID: string): Promise; abstract invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise; abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; @@ -25,7 +27,15 @@ export abstract class TrustID { } -export interface Access { - did: string, - type: number, +export enum PolicyType { + PublicPolicy = "PUBLIC", + SameControllerPolicy = "SAME_CONTROLLER", + FineGrainedPolicy = "FINE_GRAINED", +} + +export interface AccessPolicy { + policy: PolicyType, + threshold?: Number, + registry?: object, } + diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts index 968d1133..c7e42cf0 100755 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -22,6 +22,7 @@ export class DID { public access: number; private privkey: string; private unlockedKey: any; + private unlockTimestamp : any; // TODO: Default parameters for now: // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. @@ -43,7 +44,7 @@ export class DID { this.privkey = ""; this.pubkey = ""; this.unlockedKey = null; - + this.unlockTimestamp = 0; } // TODO: Can we do this more efficiently? @@ -72,8 +73,9 @@ export class DID { } } - public async unlockAccount(passphrase: string = ""): Promise { + public async unlockAccount(passphrase: string = "", timeout: number = 30): Promise { try { + this.unlockTimestamp = Date.now() + timeout*1000 const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8) this.unlockedKey = await JWK.asKey( pem, @@ -113,6 +115,11 @@ export class DID { /** sign Generates a JWS from a payload using an id from the wallet */ public async sign(payload: object): Promise { + + if (this.unlockTimestamp < Date.now()) { + this.unlockedKey = null; + } + if (!this.unlockedKey) { throw Error("You must unlock the account before signing the message."); } diff --git a/trustid-sdk/test/integration/test.ts b/trustid-sdk/test/integration/test.ts new file mode 100755 index 00000000..cd74e967 --- /dev/null +++ b/trustid-sdk/test/integration/test.ts @@ -0,0 +1,118 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {Wallet} from "../../src/wallet"; +import {AccessPolicy, PolicyType} from "../../src/network/trustInterface"; +import {expect} from "chai"; + +import {TrustIdHf} from "../../src/network/trustHF"; +const path = require("path"); +const fs = require("fs"); +const ccpPath = path.resolve(__dirname, "..", "..", "..", "connection-profile.json"); + +const adminPriv = `-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7Th71Us2fUkeB +g0gxGtRDgkeEefTBnE8IP2Rw/PrdIwGJicK1EzbikrzqABpO4zgPxXYuOsDp28Fb +AE5/a4X/iKshFcw5ojny61cQKwDSvoLDZKkJhJXwErXLyGmezDTb9PTFhENsWp+G ++pywEnbgsjoXi0Khs+h6ASlsJNagsy4wRPdZkUvKZhKIbjY2ZtxnQpMaTBPOIvKU +vbafnABlOV+6+4FANFsr9L181bNeOiaEmaqzJCajZgBHQUDVpefs96qj/S0J+0mT +wmNajN0+DedN4Z6Xl/E25XuuaU3brEFTqnTE2DXa3P7iCCsR6r313OCR8/4pCliX +NlUEs12ZAgMBAAECggEAZ/0SQP9Mu5RxsJzTWrfbevN8gzc2RLtkQV74g6ZgHJ/P +va1nFSLqyNXQ3lVaRcvulwr49ueVrQBdlAlSi3mFtn4JDGBOtvyzEYPJHWfSmC4+ +6P4cvvUGTXgFyHKm+QvEmQ2hS3uH90NE6CqBDVvi9hLdH68oOiBpBDta5Ph61FJS +OcaVQ20jEldMkz6bYv9pOYl6hunJnYB+ZYKcq25SkTEERwKQueDtzwB8ulsazbuw +n8CraL2ncN7cAOlfcVYUica1LnP74roEK+zIUFFsjTxC9xMS47GwWkFls1VLEDb1 +tKUxJLnYJJy/18b+gpFDztr3BZFgiUpO1QUaY9aPgQKBgQDwBNm9usvfB/w76z0A +U5JNfC1Pk3MpxRBKOM84s3HCUiu7KbCnLmOKTmORAcsbO0H+uU5xMYcsUdIgQF2C +9SAGcKize12xqcsutoQPiEisEi387rsk1iQ8jJ03fQY6SNBe+fZta3JXuVogeiRd +zz0YfZ7OBh2MkwEDpNjUAeXiaQKBgQDHxsIPvFGq0cbzmuIYQsQJV71y3H4iPGRI +DVkTs6Vc9VDMAN5GtRB1HkfpQtVBFwpDZIhvfySmLhnGi2vs6fKFwo9SpRmxSypZ +rkzs1/0Gc7ZRbHRwt1n326s2Sry+6+0AxOxsM6+OJNqfugN9RAfg8zeJeEEJTYTU +3ty+pULbsQKBgQDPl7JoGib4mSR9AqH5JU8Vu4BJIkPp7aqAN5Bq/zE2G/H86DsE +7edkGRaetYlg3SjgUo/Y8ThzibUO9fyrJq3zQ/91dQ79edjlZzDjakFIqlSiPi0Y +2CnxQME92+HGCXJHozSTQOpdm0+rZVkM1hCGnSf8E2f9TKwE5dAv1hBpeQKBgQC/ +pL7DQ5+AY68cP+dG6L2QTNgTWMuzYgW9TPi3uq0WiMqSeP7CC64W/A52CUP0JfsV +fVqYwvpQZIcbfOHyqtaZVHQTDwifmICu+VMYHXa/+r7aS1VET8+BwvvyoC2CZWa9 +RyuZ/NcbX+VONq5kO5/nPsp3GKIjH3cekhBm3rhNcQKBgBlCEJfRyslFjv90wI5N +iWEOYoTkY3R8RhAooq9AbFIbPPXHUiJOyqnau4FeiUTtc0ZyRv5A55qhKbsj7p4o +bmyvEGp6cvVmnn3UGH49k5blWzm0MoksxSiYphtBxHqMyuY+Gfj6BN+JAwyrEKwl +g/fADk89eHUjNgoedy6wWqL3 +-----END PRIVATE KEY-----`; + +const adminPub = `-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu04e9VLNn1JHgYNIMRrU +Q4JHhHn0wZxPCD9kcPz63SMBiYnCtRM24pK86gAaTuM4D8V2LjrA6dvBWwBOf2uF +/4irIRXMOaI58utXECsA0r6Cw2SpCYSV8BK1y8hpnsw02/T0xYRDbFqfhvqcsBJ2 +4LI6F4tCobPoegEpbCTWoLMuMET3WZFLymYSiG42NmbcZ0KTGkwTziLylL22n5wA +ZTlfuvuBQDRbK/S9fNWzXjomhJmqsyQmo2YAR0FA1aXn7Peqo/0tCftJk8JjWozd +Pg3nTeGel5fxNuV7rmlN26xBU6p0xNg12tz+4ggrEeq99dzgkfP+KQpYlzZVBLNd +mQIDAQAB +-----END PUBLIC KEY----- +`; + +describe("Integration test", async() => { + + it("Invoke service", async () => { + + const wal = Wallet.Instance; + try { + let ccp = JSON.parse(fs.readFileSync(ccpPath, "utf8")); + let config = { + stateStore: "/tmp/statestore", + caURL: "https://ca.org1.telefonica.com:7054", + caName: "ca.org1.telefonica.com", + caAdmin: "adminCA", + caPassword: "adminpw", + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: ccp, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", + }; + let identity = await wal.generateDID("RSA", "default", "secret"); + + await wal.setDefault(identity); + + const trustID = new TrustIdHf(config); + wal.addNetwork("hf", trustID); + await wal.networks["hf"].configureDriver(); + + let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; + + const didUnlock = await wal.getDID("default"); + await didUnlock.unlockAccount("secret"); + await wal.networks["hf"].createSelfIdentity(await wal.getDID("default")); + + console.log("Getting created key..."); + await trustID.getIdentity(await wal.getDID("default"), await didUnlock.id); + const id = Date.now(); + const res = await trustID.createService(await wal.getDID("default"), `vtn:trustos:service:${id}`, "chaincode", access,"telefonicachannel"); + await trustID.updateService(await wal.getDID("default"), `vtn:trustos:service:${id}`, access); + const result = await trustID.invoke( + await wal.getDID("default"), + `vtn:trustos:service:${id}`, + ["set", "5", "100"], + "telefonicachannel" + ); + await wal.networks["hf"].disconnectDriver(); + + expect(result).to.equal("100"); + } catch (err) { + await wal.networks["hf"].disconnectDriver(); + + console.log(err); + } + + }); +}); diff --git a/trustid-sdk/test/trustHF.spec.ts b/trustid-sdk/test/trustHF.spec.ts index 27b80367..bc19c1ff 100644 --- a/trustid-sdk/test/trustHF.spec.ts +++ b/trustid-sdk/test/trustHF.spec.ts @@ -9,6 +9,7 @@ import {HfDriver} from "../src/network/hfdriver"; import {TrustIdHf} from "../src/network/trustHF"; import {DID} from "../src/wallet"; import {Wallet} from "../src/wallet"; +import { AccessPolicy, PolicyType} from "../src/network/trustInterface"; /* global describe, it, before, after */ const {expect} = require("chai"); @@ -123,7 +124,7 @@ describe("TrustHF - Test", async() => { it("Create Identity", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createIdentity(identity); + const result = await trustID.createSelfIdentity(identity); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -152,7 +153,7 @@ describe("TrustHF - Test", async() => { it("Create Identity", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createIdentity(identity); + const result = await trustID.createSelfIdentity(identity); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -161,7 +162,7 @@ describe("TrustHF - Test", async() => { it("Create Fail", async () => { try { const trustID = new TrustIdHf(config); - await trustID.createIdentity(identity); + await trustID.createSelfIdentity(identity); } catch (err) { expect(err.message).to.equal("Error calling contract"); } @@ -262,6 +263,8 @@ describe("TrustHF - Test", async() => { }); describe("Create Service ", () => { let driverStub: any; + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + before((done) => { driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); driverStub.onSecondCall().rejects(new Error("Error calling contract")); @@ -276,7 +279,7 @@ describe("TrustHF - Test", async() => { it("Create Service Success", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createService(identity, "id", "name"); + const result = await trustID.createService(identity, "id", "name", access, true, "channel"); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -285,7 +288,7 @@ describe("TrustHF - Test", async() => { it("Create Service Fail", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createService(identity, "id", "name"); + const result = await trustID.createService(identity, "id", "name", access, true, "channel"); } catch (err) { expect(err.message).to.equal("Error calling contract"); } @@ -303,10 +306,9 @@ describe("TrustHF - Test", async() => { driverStub.restore(); done(); }); - let access = { - type: 1, - did: "ksjdskjd" - } + + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + it("Update Service Success", async () => { try { @@ -339,10 +341,8 @@ describe("TrustHF - Test", async() => { driverStub.restore(); done(); }); - let access = { - type: 1, - did: "ksjdskjd" - } + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + it("Get Service Success", async () => { try { From 8e11807962b25a2ffae24751a6b1d832536d7e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Thu, 23 Jul 2020 09:00:58 +0200 Subject: [PATCH 07/25] Getting started (#18) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added new controller management (#14) * Migrated private repo (#13) Co-authored-by: Ry Jones * added create delegated identity Signed-off-by: Maria Teresa Nieto Co-authored-by: Ry Jones Co-authored-by: Maria Teresa Nieto Galan * Added contributing file * Updated getting started * fixed #16. Added getting started and examples Signed-off-by: Alfonso de la Rocha Co-authored-by: adlrocha Co-authored-by: Ry Jones --- README.md | 39 +++++++++- trustid-sdk/.gitignore | 2 +- trustid-sdk/README.md | 30 ++++++++ trustid-sdk/examples/README.md | 25 +++++++ trustid-sdk/examples/getting-started.ts | 98 +++++++++++++++++++++++++ 5 files changed, 192 insertions(+), 2 deletions(-) create mode 100644 trustid-sdk/examples/README.md create mode 100644 trustid-sdk/examples/getting-started.ts diff --git a/README.md b/README.md index c1289a62..b7545383 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,47 @@ This repo include two components: - [Trustid-sdk](trustid-sdk/): SDK based in javascript to interact with the trustId solution. - [Fabric-chaincode](fabric-chaincode/): Chaincode based in Hyperledger Fabric that implements trustId. The chaincode has to be deployed in a Hyperledger Fabric network + +## Getting started + +First of all it's necessary to create one or many controllers identities. These identities are going to be self signed certificates and must represent the trust anchor identities that are going serve as roots to validate others. It is possible to have more than one to be decentralized. +To create these identites, you need to create an initial identity to have at least one controller: +``` +var id = require('trustid-sdk') +var wal = id.Wallet.Instance; +wal.generateDID("RSA", "password").then(result => { + console.log(result) +}) +``` + +Now you have a DID with a public and private keys. + +Before you start using TrustID, you need to run a Hyperledger Fabric network. You can use for example a testnet from the [Fabric Samples Repository](https://github.com/hyperledger/fabric-samples). It's a requeriment that the version of the network to be 2.X + +Once we have a hyperledger fabric network we can deploy the TrustID chaincode. To install and approve the chaincode with the [new chaincode lifecycle](https://hyperledger-fabric.readthedocs.io/en/release-2.0/commands/peerlifecycle.html) + +In the last step, for the initialization fo the chaincode, it's necessary to deploy it with the controller information in the following way: +``` +'{"Args":["Init", "{\"did\":\"did:vtn:trustid:29222201b6662e5b2a07815f7f98b8653b306e3af3830dbaf2387da49ec744db\",\"controller\":\"did:vtn:trustid:29222201b6662e5b2a07815f7f98b8653b306e3af3830dbaf2387da49ec744db\",\"publicKey\":\"-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzP4bEUzWUJQh+gm9apHT6H1myWMqje4I3+F0d4NSPV8Y3HG0mOYr034fx34je9F82+YpToOO5utbQFlDTmCcI3S2hO4oNwV4xuvt+DCMm2QsYOPCy8BjMHFHiOxTVzlDNaq9YVrGeiEY6+e5e5c61y+Yi5YeaRld0RLBWkIfaQIAQyx/FgYFpzDDhxB/TznO9hiw5O5/MFqVOKFEhjT3ndXPRuHUi1F5BfidzlKzfU8G9LO4M+VLzRwnsWGsrgdyQwK8SG9RhcYwPBKMqxwdyUwwccX3DEovshPMxEdPGaj1zuJuAuJlcd504FZDSqszcTjbdSGUgivVWMv8HvRIoQIDAQAB-----END PUBLIC KEY-----\"}"]}' +``` + +This data is a JSON with the fields: +```js +{ + did: "did:vtn:trustid:29222201b6662e5b2a07815f7f98b8653b306e3af3830dbaf2387da49ec744db", + controller: "did:vtn:trustid:29222201b6662e5b2a07815f7f98b8653b306e3af3830dbaf2387da49ec744db", + publicKey: "-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzP4bEUzWUJQh+gm9apHT6H1myWMqje4I3+F0d4NSPV8Y3HG0mOYr034fx34je9F82+YpToOO5utbQFlDTmCcI3S2hO4oNwV4xuvt+DCMm2QsYOPCy8BjMHFHiOxTVzlDNaq9YVrGeiEY6+e5e5c61y+Yi5YeaRld0RLBWkIfaQIAQyx/FgYFpzDDhxB/TznO9hiw5O5/MFqVOKFEhjT3ndXPRuHUi1F5BfidzlKzfU8G9LO4M+VLzRwnsWGsrgdyQwK8SG9RhcYwPBKMqxwdyUwwccX3DEovshPMxEdPGaj1zuJuAuJlcd504FZDSqszcTjbdSGUgivVWMv8HvRIoQIDAQAB-----END PUBLIC KEY-----" +} +``` + +Once the chaincode is deployed you can start using trustid-sdk against the TrustID-enabled Fabric network. More information about it use [here](./trustid-sdk/README.md) + +We provide a [examples](./trustid-sdk/examples) to get you started with the SDK. + ## License Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the [LICENSE](LICENSE) file. The files are made available under the Creative -Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/. \ No newline at end of file +Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/. diff --git a/trustid-sdk/.gitignore b/trustid-sdk/.gitignore index 86a7cbcd..24d5e390 100644 --- a/trustid-sdk/.gitignore +++ b/trustid-sdk/.gitignore @@ -1,5 +1,5 @@ dist/ - +examples/*.js node_modules/ diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md index dfa5ef83..831fb8f2 100644 --- a/trustid-sdk/README.md +++ b/trustid-sdk/README.md @@ -8,9 +8,39 @@ TRUSTID-based DLT networks. * To install this library you need access to the private repo: ``` $ npm install @hyperledger-labs/trustid-sdk@1.0.0 + +``` + +### Getting started + +To use the sdk it's necessary to read the [Getting started guide](../README.md) + +The SDK to connect with Hyperledger Fabric will need to configure the connection. On one side we need the hyperledger fabric standard [connection profile](./connection-profile.json), on the othe side we will need to complete de following configuration in a JSON object. +```js +{ + stateStore: '', + caURL: '', + caName: '', + caAdmin: '', + caPassword: '', + tlsOptions: { + trustedRoots:"", + verify: false + }, + mspId: '', + walletID: '', + asLocalhost: , + ccp: connection profile commented bellow, + chaincodeName: "name of the identity chaincode deployed", + fcn: "proxy", + channel: "" +} + ``` ### Example of use +You can find a set of examples using the SDK in the [examples](../examples) directory. + ```js // Use library var id = require('trustid-sdk') diff --git a/trustid-sdk/examples/README.md b/trustid-sdk/examples/README.md new file mode 100644 index 00000000..3aef1fc9 --- /dev/null +++ b/trustid-sdk/examples/README.md @@ -0,0 +1,25 @@ +# Examples +In this directory you will find a set of examples of how to interact with TrustID, +and the implemented networks and keystores. To run the examples be sure that +you have built the typescript source of the library (or installed it from npm), +and that you have all dependencies installed. + +* Before you start: +```sh +$ npm install +$ npm run build +``` +* To run a specific example use: +```sh +$ tsc .ts && node .js +``` + +### Available examples +* `getting-started.ts`: Shows a simple flow of operations with TrustID, +from creating a DID, to using it for off-chain signatures and invoking +an existing service. +* `mongo-keystore.ts`: [Comming soon]. +* `create-service.ts`: [Comming soon]. + +*Disclaimer: Do not hesitate to suggest any additional example you find useful in an issue and +we will add it.* \ No newline at end of file diff --git a/trustid-sdk/examples/getting-started.ts b/trustid-sdk/examples/getting-started.ts new file mode 100644 index 00000000..63a48539 --- /dev/null +++ b/trustid-sdk/examples/getting-started.ts @@ -0,0 +1,98 @@ + +// Load SDK library. +const sdk = require("../dist/index.js"); +const fs = require("fs"); + +// Create new wallet. It follows a singleton approach. +const wal = sdk.Wallet.Instance; +console.log(wal) + +// Initialize new FileKeystore with storage at ./keystore +const ks = new sdk.FileKeystore("file", "./keystore"); +wal.setKeystore(ks) + +const ccp = JSON.parse(fs.readFileSync("./ccp-cloud.json", 'utf8')); +const config = { + stateStore: '/tmp/statestore', + caURL: 'https://telefonicaca:7054', + caName: 'telefonicaca', + caAdmin: 'adminCA', + caPassword: 'adminpw', + tlsOptions: { + trustedRoots: "-----BEGIN CERTIFICATE-----MIICODCCAd2gAwIBAgIQe96XlcvMediXzNPJmbi3KzAKBggqhkjOPQQDAjBmMQswCQYDVQQGEwJFUzEPMA0GA1UECBMGTWFkcmlkMQ8wDQYDVQQHEwZNYWRyaWQxGzAZBgNVBAoTEnRlbGVmb25pY2EudGVmLmNvbTEYMBYGA1UEAxMPdGxzdGVsZWZvbmljYWNhMB4XDTIwMDUyNzEwNTIwMFoXDTMwMDUyNTEwNTIwMFowZjELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRswGQYDVQQKExJ0ZWxlZm9uaWNhLnRlZi5jb20xGDAWBgNVBAMTD3Rsc3RlbGVmb25pY2FjYTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDvxxdoWt6oJh6D1QBJ/ANKi9Dd0bMIJLb70X5hdAyeyX2tTLfFRVT+/Sn+agSW0pOl+Li4J2gLtrW/jOSC7sWejbTBrMA4GA1UdDwEB/wQEAwIBpjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgpzV1sl/p4Tkgcz6P6WBonEFQpAMTCFmKV/o30VpBdGIwCgYIKoZIzj0EAwIDSQAwRgIhAIY2hPL2ETYhWJUuYGtqipfQiKfyi8L75yG4b7TeG2soAiEAx5u6JmQBjUbeYhB8pL2b2NICGokKZ/Z0ybXBb3b86rA=-----END CERTIFICATE-----", + verify: false + }, + mspId: 'telefonicaMSP', + walletID: 'admin', + asLocalhost: false, + ccp: ccp, + chaincodeName: "trustidcc", + fcn: "proxy", + channel: "channel1" +} + +async function configureNetwork() { + console.log("[*] Configuring network driver...") + // Create HF driver + var trustID = new sdk.TrustIdHf(config); + // Add and configure the network driver in our wallet. + wal.addNetwork("hf", trustID); + await wal.networks["hf"].configureDriver() +} + +// Create you own DID key pair and register it in the TrustID platform. +async function createDID(){ + // Generate key pair locally. + const did = await wal.generateDID("RSA", "test", "test") + console.log("[*] Generated DID: \n", did) + await did.unlockAccount("test") + // Register in the platform. + await wal.networks.hf.createSelfIdentity(did) + console.log("[*] Self identity registered") + wal.setDefault(did) + // Get the registered identity. + let res = await wal.networks.hf.getIdentity(did, did.id) + console.log("[*] Get registered identity\n", res) +} + +// Interact with a service in the platform (you need to create a service before +// being able to call it). +async function serviceInteraction(){ + const did = await wal.getDID("default") + // Get service + let res = await wal.networks.hf.getService(did, "coren-trackscc-v2") + console.log("[*] Service info:\n", res) + // Create an asset in the service + const asset = {assetId: "test"+Date.now(), data:{"a":1, "b":2}, metadata: {"c": 4}} + const assetStr = JSON.stringify(asset) + res = await wal.networks.hf.invoke(did, "coren-trackscc-v2",["createAsset", assetStr], "channel1") + console.log("[*] Asset creation:\n", res) + // Get the created asset. + res = await wal.networks.hf.invoke(did, "coren-trackscc-v2",["getAsset", JSON.stringify({assetId: asset.assetId})], "channel1") + console.log("[*] Asset registered\n", res) +} + +// Use the wallet to make offchain interactions with your DID +async function walletInteraction(){ + const did = await wal.getDID("default") + const payload = {hello: "AWESOME PROJECT!!!"} + console.log("[*] Signing payload: \n", payload) + const sign = await did.sign(payload) + console.log("[*] DID signature\n", sign) + let verify = await did.verify(sign, did) + console.log("[*] Signature verification\n", verify) + const did2 = await wal.generateDID("RSA", "test", "test") + verify = await did.verify(sign, did2) + console.log("[*] Signature wrong verification\n", verify) +} + +// Main async function. +async function main() { + await configureNetwork() + await createDID() + await serviceInteraction() + await walletInteraction() +} + +main().then(console.log).catch(console.log) +// tsc getting-started.ts && node getting-started.js From bd4cf306a59679aaa8418f3c7e6dca1ebfda41bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Tue, 27 Oct 2020 08:18:25 +0100 Subject: [PATCH 08/25] Mongo driver changed (#21) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added new controller management (#14) * Migrated private repo (#13) Co-authored-by: Ry Jones * added create delegated identity Signed-off-by: Maria Teresa Nieto Co-authored-by: Ry Jones Co-authored-by: Maria Teresa Nieto Galan * Added contributing file * Updated getting started * fixed #16. Added getting started and examples Signed-off-by: Alfonso de la Rocha * Fixed bugs and changed mongo driver Co-authored-by: adlrocha Co-authored-by: Ry Jones --- trustid-sdk/main.js | 48 +++ trustid-sdk/package-lock.json | 2 +- trustid-sdk/package.json | 8 +- trustid-sdk/sonar-project.properties | 20 - trustid-sdk/src/keystore/fileKeystore.ts | 5 + trustid-sdk/src/keystore/keystore.ts | 1 + .../src/keystore/localStorageKeystore.ts | 20 +- trustid-sdk/src/keystore/mongoKeystore.ts | 129 ++++-- trustid-sdk/src/network/driver.ts | 2 + trustid-sdk/src/network/hfdriver.ts | 56 ++- trustid-sdk/src/network/trustHF.ts | 48 ++- trustid-sdk/src/network/trustInterface.ts | 4 +- trustid-sdk/src/wallet.ts | 101 +++-- trustid-sdk/test/hfdiver.spec.ts | 392 ------------------ trustid-sdk/test/integration/test.ts | 37 +- .../test/{ => unit}/fileKeystore.spec.ts | 21 +- trustid-sdk/test/unit/hfdiver.spec.ts | 347 ++++++++++++++++ trustid-sdk/test/unit/localKeystore.spec.ts | 48 +++ trustid-sdk/test/{ => unit}/trustHF.spec.ts | 61 +-- trustid-sdk/test/unit/wallet.spec.ts | 178 ++++++++ trustid-sdk/test/wallet.spec.ts | 95 ----- 21 files changed, 937 insertions(+), 686 deletions(-) create mode 100644 trustid-sdk/main.js delete mode 100644 trustid-sdk/sonar-project.properties delete mode 100644 trustid-sdk/test/hfdiver.spec.ts rename trustid-sdk/test/{ => unit}/fileKeystore.spec.ts (69%) create mode 100644 trustid-sdk/test/unit/hfdiver.spec.ts create mode 100644 trustid-sdk/test/unit/localKeystore.spec.ts rename trustid-sdk/test/{ => unit}/trustHF.spec.ts (88%) create mode 100644 trustid-sdk/test/unit/wallet.spec.ts delete mode 100644 trustid-sdk/test/wallet.spec.ts diff --git a/trustid-sdk/main.js b/trustid-sdk/main.js new file mode 100644 index 00000000..ec579420 --- /dev/null +++ b/trustid-sdk/main.js @@ -0,0 +1,48 @@ +var id = require("./dist/index.js") +var fs = require("fs") +var wal = id.Wallet.Instance; +var ks = new id.FileKeystore("file", "./keystore"); +wal.setKeystore(ks) +wal.generateDID("RSA").then(result => {}) +var ccp = JSON.parse(fs.readFileSync("./ccp-dev-dsn.json", 'utf8')); + +var config = { + stateStore: '/tmp/cloud', + caName: 'telefonicaca', + mspId: 'telefonicaMSP', + caURL: "hola", + walletID: 'adminUser', + asLocalhost: false, + ccp: ccp, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "channel1" +} + + + +var trustID = new id.TrustIdHf(config); + +wal.addNetwork("hf", trustID); +wal.networks["hf"].configureDriver().then(() => { + + // Use the wallet and the driver + wal.generateDID("RSA", "test", "test").then(did => { + let access = { policy: id.PolicyType.PublicPolicy }; + did.unlockAccount("test").then(() => { + wal.networks.hf.createSelfIdentity(did).then(res => { + // wal.networks.hf.createService(did, "did:vtn:corentrack2", config.chaincodeName, access, config.channel).then(() => { + wal.networks.hf.subscribeEventService(did, "coren-trackscc", "track-event").then(listener => { + console.log("Listening to events...") + listener.on("track-event", + (returnedEvent) => { + console.log(returnedEvent) + }) + }) + + }); + //}) + + }) + }) +}) \ No newline at end of file diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 9e339151..26eb36f8 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1,5 +1,5 @@ { - "name": "trustid-sdk", + "name": "coren-id-sdk", "version": "1.0.0", "lockfileVersion": 1, "requires": true, diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json index 760918ce..7e5889d7 100755 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -1,17 +1,17 @@ { - "name": "trustid-sdk", + "name": "coren-id-sdk", "version": "1.0.0", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "test": "mocha --timeout 50000 --require ts-node/register dist/test/integration", + "test": "mocha --timeout 50000 --require ts-node/register dist/test/unit", "build": "rm -rf dist && tsc", "build-light": "rm -rf dist-light && tsc --build tsconfig-light.json", "build-single-file": "rm -rf dist-light && tsc --build tsconfig-singleFile.json", "start": "tsc && node ./dist/test.js", "docs": "typedoc --out dist/docs --mode modules .", - "coverage": "tsc && istanbul cover node_modules/.bin/_mocha -- --recursive --timeout 200000 dist/test" + "coverage": "rm -rf dist && tsc && istanbul cover node_modules/.bin/_mocha -- --recursive --require ts-node/register --timeout 50000 dist/test/unit" }, "repository": { "type": "git", @@ -55,4 +55,4 @@ "fabric-ca-client": "2.1.0", "fabric-network": "v2.1.0" } -} +} \ No newline at end of file diff --git a/trustid-sdk/sonar-project.properties b/trustid-sdk/sonar-project.properties deleted file mode 100644 index dec65f11..00000000 --- a/trustid-sdk/sonar-project.properties +++ /dev/null @@ -1,20 +0,0 @@ -# must be unique in a given SonarQube instance -sonar.projectKey=blockchainteam:coren-trustid-sdk -# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1. -sonar.projectName=coren-trustid-sdk -sonar.projectVersion=0.0.1 -sonar.language=ts -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -# Since SonarQube 4.2, this property is optional if sonar.modules is set. -# If not set, SonarQube starts looking for source code from the directory containing -# the sonar-project.properties file. -sonar.sources=src/ -sonar.exclusions=.properties, *.md, node_modules/**, test/**, coverage/**,*.sh, *.sh, *.py, test/**, dist/src/**, dist/test/**.d.ts -sonar.tests=dist/test/ - -sonar.dynamicAnalysis=reuseReports - -sonar.javascript.lcov.reportPaths=coverage/lcov.info - -# Encoding of the source code. Default is default system encoding -sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/trustid-sdk/src/keystore/fileKeystore.ts b/trustid-sdk/src/keystore/fileKeystore.ts index ef8149ab..9aeaa25d 100644 --- a/trustid-sdk/src/keystore/fileKeystore.ts +++ b/trustid-sdk/src/keystore/fileKeystore.ts @@ -112,6 +112,11 @@ export class FileKeystore extends Keystore { return false; } } + // TO DO + public async updateDID(did: DID): Promise { + + return true + } diff --git a/trustid-sdk/src/keystore/keystore.ts b/trustid-sdk/src/keystore/keystore.ts index 26b70774..7ec2bfd4 100755 --- a/trustid-sdk/src/keystore/keystore.ts +++ b/trustid-sdk/src/keystore/keystore.ts @@ -17,6 +17,7 @@ export abstract class Keystore { abstract async getDID(id: string): Promise; abstract async storeDID(did: DID): Promise; + abstract async updateDID(did: DID): Promise; // Store DID in memory public storeInMemory(did: DID): boolean { diff --git a/trustid-sdk/src/keystore/localStorageKeystore.ts b/trustid-sdk/src/keystore/localStorageKeystore.ts index f142eaa2..b5d87f36 100644 --- a/trustid-sdk/src/keystore/localStorageKeystore.ts +++ b/trustid-sdk/src/keystore/localStorageKeystore.ts @@ -15,15 +15,18 @@ export class LocalStorageKeystore extends Keystore { "empty", "localStorage" ] - + localStorage: any; constructor() { super(); + this.localStorage = {} + } + /** getKey gets a key from the keystore of the wallet */ public async getDID(id: string = "default"): Promise { let did = new DID() - const value = localStorage.getItem(id) + const value = this.localStorage[id] if (value) { did.loadFromObject(JSON.parse(value)) } else { @@ -36,11 +39,22 @@ export class LocalStorageKeystore extends Keystore { /** Stores DID in the permanent keystore */ public async storeDID(did: DID): Promise { try { - localStorage.setItem(did.id, JSON.stringify(did)) + this.localStorage[did.id]= JSON.stringify(did); return true } catch { return false } } + /** Stores DID in the permanent keystore */ + public async updateDID(did: DID): Promise { + try { + this.localStorage[did.id]= JSON.stringify(did); + return true + } catch { + return false + } + } + + } \ No newline at end of file diff --git a/trustid-sdk/src/keystore/mongoKeystore.ts b/trustid-sdk/src/keystore/mongoKeystore.ts index 794bc8f0..484903ce 100644 --- a/trustid-sdk/src/keystore/mongoKeystore.ts +++ b/trustid-sdk/src/keystore/mongoKeystore.ts @@ -7,82 +7,119 @@ SPDX-License-Identifier: Apache-2.0 */ import { Keystore } from './keystore'; import { DID } from '../wallet' -const Mongoose = require("mongoose") +const mongodb = require("mongodb") -const DIDSchema = new Mongoose.Schema({ - id: String, - pubkey: String, - type: String, - controller: String, - access: Number, - privkey: String, -}) -const DIDModel = Mongoose.model("did", DIDSchema); + +//const DIDModel = Mongoose.model("did", DIDSchema); export class MongoKeystore extends Keystore { private database: any; private uri: string; + private databaseName: string; + private validator = { + $jsonSchema: { + bsonType: "object", + required: [ "id", "pubkey", "type", "controller", "access", "privkey"], + properties: { + id: { + bsonType: "string", + description: "must be a string and is required" + }, + pubkey: { + bsonType: "string", + description: "must be a string and is required" + }, + type: { + bsonType: "string", + description: "must be a string and is required" + }, + controller: { + bsonType: "string", + description: "must be a string and is required" + }, + access: { + bsonType: "int", + description: "must be an integer and is required" + }, + privkey: { + bsonType: "string", + description: "must be a string and is required" + }, + tempPrivKey: { + bsonType: "string", + description: "must be a string" + } + } + } + } + // Create connection to the keystore database. - constructor(mongoURI: string) { + constructor(mongoURI: string, databaseName: string) { super(); this.uri = mongoURI; this.database = null; + this.databaseName = databaseName; } public async init() { - await Mongoose.connect(this.uri, { - useNewUrlParser: true, - useFindAndModify: true, - useUnifiedTopology: true, - useCreateIndex: true, - }); - this.database = Mongoose.connection; - // this.database.once("open", async () => { - // console.log("Connected to database"); - // }); - // this.database.on("error", () => { - // console.log("Error connecting to database"); - // }); + try { + const client = await mongodb.MongoClient.connect(this.uri, { useUnifiedTopology: true }); + this.database = client.db(this.databaseName); + this.database.createCollection("dids", { + validator: this.validator + }); + } catch(err){ + throw err; + + } + } /** getKey gets a key from the keystore of the wallet */ public async getDID(id: string = "default"): Promise { - // We check if DID in memory - if (!(id in this.keystore)) { - // Retrieve from database - try { - const didObj = await DIDModel.findOne({ id: id }); - let emptyDID: DID = new DID("RSA", undefined); - emptyDID.loadFromObject(didObj); - this.keystore[id] = emptyDID; - } catch { - throw new Error("DID not found in database") - } + // We check DID in mongoDB + // Retrieve from database + try { + const didObj = await this.database.collection('dids').findOne({ id: id }); + let emptyDID: DID = new DID("RSA", undefined); + await emptyDID.loadFromObject(didObj); + return emptyDID + } catch (err) { + throw new Error("DID not found in database") } - - return this.keystore[id]; } /** Stores DID in the permanent keystore */ public async storeDID(did: DID): Promise { try { - // Store DID in Mongo. Modify if it exists, create if it doesn't - const didObj = await DIDModel.findOne({ id: did.id }); - console.log(didObj) + const didObj = await this.database.collection('dids').findOne({ id: did.id }); if(!didObj){ - await DIDModel.create(did); + await this.database.collection('dids').insertOne(did) return true; - } else { - throw new Error("The identity already exists in the storage"); - + throw new Error("The identity already exists in the database"); } - } catch (err){ - throw err; + throw err; + } + } + + /** Stores DID in the permanent keystore */ + public async updateDID(did: DID): Promise { + try { + // Update DID in Mongo. Modify if it exists, create if it doesn't + await this.database.collection('dids').replaceOne({ + id: did.id }, + did, + {upsert: false }); + this.keystore[did.id] = did // update in memory keystore + + return true + } catch (err){ + throw err; } } diff --git a/trustid-sdk/src/network/driver.ts b/trustid-sdk/src/network/driver.ts index cd6a42e8..86aa56ce 100644 --- a/trustid-sdk/src/network/driver.ts +++ b/trustid-sdk/src/network/driver.ts @@ -13,6 +13,8 @@ export abstract class Driver { abstract connect(config: object): any; abstract disconnect(config: object): void; + abstract checkConnection(channelName?:string): any; + abstract callContractTransaction(id: string, fcn: string, args: any, channel?: string): any; abstract getContractTransaction(id: string, fcn: string, args: any, channel?: string): any; diff --git a/trustid-sdk/src/network/hfdriver.ts b/trustid-sdk/src/network/hfdriver.ts index a78f656e..7e6ef795 100644 --- a/trustid-sdk/src/network/hfdriver.ts +++ b/trustid-sdk/src/network/hfdriver.ts @@ -6,28 +6,27 @@ SPDX-License-Identifier: Apache-2.0 */ import {Driver} from "./driver"; - +import * as fs from "fs"; +import {EventEmitter} from 'events' const FabricCAServices = require("fabric-ca-client"); const {Gateway, Wallets, DefaultEventHandlerStrategies} = require("fabric-network"); export interface HfConfig { stateStore: string; - caURL: string; caName: string; - caAdmin: string; - caPassword: string; - tlsOptions: any; mspId: string; walletID: string; asLocalhost: boolean; ccp: any; } +class MyEmitter extends EventEmitter {} export class HfDriver extends Driver { protected connection: any; constructor() { super(); this.connection = {}; + } public async callContractTransaction(id: string, fcn: string, args: any, channel?: string | undefined) { @@ -61,12 +60,20 @@ export class HfDriver extends Driver { public async connect(config: HfConfig): Promise { try { + //Get CA config from CCP + + const caURL = config.ccp.certificateAuthorities[config.caName].url + const tlsOptions = { + trustedRoots: fs.readFileSync(config.ccp.certificateAuthorities[config.caName].tlsCACerts.path,'utf8'), + verify: false + } this.connection = new Gateway(); + const wallet = await Wallets.newFileSystemWallet(config.stateStore); - const caService = new FabricCAServices(config.caURL, config.tlsOptions, config.caName); + const caService = new FabricCAServices(caURL, tlsOptions, config.caName); const req = { - enrollmentID: config.caAdmin, - enrollmentSecret: config.caPassword, + enrollmentID: config.ccp.certificateAuthorities[config.caName].registrar.enrollId, + enrollmentSecret: config.ccp.certificateAuthorities[config.caName].registrar.enrollSecret, }; const enrollment = await caService.enroll(req); @@ -87,16 +94,47 @@ export class HfDriver extends Driver { asLocalhost: config.asLocalhost, }, eventHandlerOptions: { + endorseTimeout: 90, + commitTimeout: 300, strategy: DefaultEventHandlerStrategies.NETWORK_SCOPE_ANYFORTX, }, }); - return this.connection; } catch (err) { throw err; } } + + public async subscribeEvent(id: string, serviceDID: string,eventName: string, channel: string){ + const network = await this.connection.getNetwork(channel); + const contract = await network.getContract(id); + const myEmmiter = new MyEmitter(); + + const listener = async(event: any) => { + + if (event.eventName === eventName) { + const details = event.payload.toString('utf8'); + const eventResult = JSON.parse(details) + if(eventResult.did === serviceDID){ + myEmmiter.emit(eventName, eventResult) + } + + } + }; + await contract.addContractListener(listener, {}) + return myEmmiter + } + public async checkConnection(channelName: string) { + try{ + const result= await this.connection.getNetwork(channelName); + return true; + } catch(err){ + return false; + } + } public async disconnect() { this.connection.disconnect(); } + + } diff --git a/trustid-sdk/src/network/trustHF.ts b/trustid-sdk/src/network/trustHF.ts index ebc4524f..21113332 100755 --- a/trustid-sdk/src/network/trustHF.ts +++ b/trustid-sdk/src/network/trustHF.ts @@ -14,11 +14,7 @@ export interface Config { channel: string; chaincodeName: string; stateStore: string; - caURL: string; caName: string; - caAdmin: string; - caPassword: string; - tlsOptions: any; mspId: string; walletID: string; asLocalhost: boolean; @@ -38,11 +34,7 @@ export class TrustIdHf extends TrustID { async configureDriver(): Promise { const cfg = { stateStore: this.config.stateStore, - caURL: this.config.caURL, caName: this.config.caName, - caAdmin: this.config.caAdmin, - caPassword: this.config.caPassword, - tlsOptions: this.config.tlsOptions, mspId: this.config.mspId, walletID: this.config.walletID, asLocalhost: this.config.asLocalhost, @@ -55,7 +47,7 @@ export class TrustIdHf extends TrustID { await this.driver.disconnect(); } /** createIdentity registers a new unverified identity */ - public async createSelfIdentity(did: DID): Promise { + public async createSelfIdentity(did: DID): Promise { const args = [ JSON.stringify({ publicKey: did.pubkey, @@ -77,7 +69,7 @@ export class TrustIdHf extends TrustID { return res; } /** createIdentity registers a new unverified identity */ - public async createIdentity(did: DID, controller: DID): Promise { + public async createIdentity(did: DID, controller: DID): Promise { const args = [ JSON.stringify({ did: controller.id, @@ -99,7 +91,7 @@ export class TrustIdHf extends TrustID { return res; } /** VerifyIdentity allow admins to verify user identityes */ - public async verifyIdentity(adminDID: DID, id: string): Promise { + public async verifyIdentity(adminDID: DID, id: string): Promise { const args = [ JSON.stringify({ did: adminDID.id, @@ -122,7 +114,7 @@ export class TrustIdHf extends TrustID { } /** Revoke allow admins to revoke user identityes */ - public async revokeIdentity(adminDID: DID, id: string): Promise { + public async revokeIdentity(adminDID: DID, id: string): Promise { const args = [ JSON.stringify({ did: adminDID.id, @@ -145,7 +137,7 @@ export class TrustIdHf extends TrustID { } /** GetIdentity gets a new identity */ - public async getIdentity(did: DID, id: string): Promise { + public async getIdentity(did: DID, id: string): Promise { const args = [ JSON.stringify({ did: did.id, @@ -167,7 +159,7 @@ export class TrustIdHf extends TrustID { } /** Registers new service in the platform */ - public async createService(did: DID, serviceDID: string, name: string, accessPolicy: AccessPolicy, channel: string): Promise { + public async createService(did: DID, serviceDID: string, name: string, accessPolicy: AccessPolicy, channel: string): Promise { const args = [ JSON.stringify({ did: did.id, @@ -196,7 +188,7 @@ export class TrustIdHf extends TrustID { did: DID, serviceDID: string, access: AccessPolicy - ): Promise { + ): Promise { const args = [ JSON.stringify({ did: did.id, @@ -219,7 +211,7 @@ export class TrustIdHf extends TrustID { } /** Gets information from a service */ - public async getService(did: DID, serviceDID: string): Promise { + public async getService(did: DID, serviceDID: string): Promise { const args = [ JSON.stringify({ did: did.id, @@ -238,11 +230,11 @@ export class TrustIdHf extends TrustID { args, this.config.channel ); - return res; + return JSON.parse(res); } /** Invokes a chaincode through the proxy */ - public async invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise { + public async invoke(did: DID, serviceDID: string, args: string[], channel: string): Promise { const argsCall = [ JSON.stringify({ did: did.id, @@ -267,7 +259,7 @@ export class TrustIdHf extends TrustID { } /** Invokes a chaincode through the proxy */ - public async query(did: DID, serviceDID: string, args: string[], channel: string): Promise { + public async query(did: DID, serviceDID: string, args: string[], channel: string): Promise { const argsCall = [ JSON.stringify({ did: did.id, @@ -290,4 +282,22 @@ export class TrustIdHf extends TrustID { ); return res; } + /** Subscribe Event Service */ + public async subscribeEventService(did: DID, serviceDID: string, eventName: string): Promise { + + const eventEmitter = await this.driver.subscribeEvent(this.config.chaincodeName, serviceDID, eventName, this.config.channel); + return eventEmitter; + + } + + public async checkConnection(): Promise { + + const connection = await this.driver.checkConnection(this.config.channel); + + return connection; + + } + } + + \ No newline at end of file diff --git a/trustid-sdk/src/network/trustInterface.ts b/trustid-sdk/src/network/trustInterface.ts index 6369e766..ae1b1d5b 100755 --- a/trustid-sdk/src/network/trustInterface.ts +++ b/trustid-sdk/src/network/trustInterface.ts @@ -20,9 +20,11 @@ export abstract class TrustID { abstract revokeIdentity(adminDID: DID, id: string): Promise; abstract createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise; abstract updateService(did: DID, serviceDID: string, access: AccessPolicy): Promise; - abstract getService(did: DID, serviceDID: string): Promise; + abstract getService(did: DID, serviceDID: string): Promise; abstract invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise; abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; + abstract subscribeEventService(did: DID, serviceDID: string, eventName: string): any; + abstract checkConnection(): Promise; } diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts index c7e42cf0..27bc6f79 100755 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -1,4 +1,3 @@ - /* Copyright 2020 Telefónica Digital España. All Rights Reserved. @@ -6,13 +5,13 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import { JWK, JWS } from "node-jose"; -import { TrustID } from "./network/trustInterface"; +import {JWK, JWS} from "node-jose"; +import {TrustID} from "./network/trustInterface"; -import crypto from 'crypto-js'; +import crypto from "crypto-js"; -import { Keystore } from "./keystore/keystore"; -import { FileKeystore } from "./keystore/fileKeystore"; +import {Keystore} from "./keystore/keystore"; +import {FileKeystore} from "./keystore/fileKeystore"; export class DID { public id: string; @@ -22,26 +21,25 @@ export class DID { public access: number; private privkey: string; private unlockedKey: any; - private unlockTimestamp : any; + public unlockTimestamp: any; + public tempPrivKey: string; // TODO: Default parameters for now: // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. readonly ALGO_TYPES = ["RSA", "EC", "oct"]; - public constructor( - type: any = "RSA", - controller: string = "default" - ) { + public constructor(type: any = "RSA", controller: string = "default") { // If type not supported throw error. if (!Object.values(this.ALGO_TYPES).includes(type)) { throw new Error("Key algorithm not supported"); } - this.id = "" + this.id = ""; this.type = type; this.controller = controller; this.access = 0; this.privkey = ""; + this.tempPrivKey = ""; this.pubkey = ""; this.unlockedKey = null; this.unlockTimestamp = 0; @@ -51,11 +49,11 @@ export class DID { private async keyGeneration(): Promise { switch (this.type) { case "RSA": - return JWK.createKey("RSA", 2048, { alg: "" }); + return JWK.createKey("RSA", 2048, {alg: ""}); case "EC": - return JWK.createKey("EC", "P-521", { alg: "" }); + return JWK.createKey("EC", "P-521", {alg: ""}); case "oct": - return JWK.createKey("oct", 256, { alg: "" }); + return JWK.createKey("oct", 256, {alg: ""}); default: throw new Error("Key algorithm not supported"); } @@ -68,23 +66,33 @@ export class DID { let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); this.id = `did:vtn:trustid:${addr}`; this.pubkey = key.toPEM(); - let pk = key.toPEM(true) + let pk = key.toPEM(true); this.privkey = crypto.AES.encrypt(pk, passphrase).toString(); } } - public async unlockAccount(passphrase: string = "", timeout: number = 30): Promise { + public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { try { - this.unlockTimestamp = Date.now() + timeout*1000 - const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8) - this.unlockedKey = await JWK.asKey( - pem, - "pem" - ); + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + if (tempPassphrase != "") { + this.tempPrivKey = crypto.AES.encrypt(pem, tempPassphrase).toString(); + } + return this } catch { - throw new Error("Private key couldn't be deciphered") + throw new Error("Private key couldn't be deciphered"); + } + } + public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + return + } catch { + throw new Error("Private key couldn't be deciphered"); } - } public lockAccount(): any { @@ -92,34 +100,33 @@ export class DID { } public loadFromObject(obj: any): void { - let { id, type, controller, access, pubkey, privkey } = obj; + let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp } = obj; this.id = id; this.type = type; this.controller = controller; this.access = access; this.pubkey = pubkey; this.privkey = privkey; + this.tempPrivKey = tempPrivKey; + this.unlockTimestamp = unlockTimestamp; } public exportDID(withPrivate: boolean) { - const privkey = withPrivate ? this.privkey : "" + const privkey = withPrivate ? this.privkey : ""; return { - id: this.id, + id: this.id, type: this.type, pubkey: this.pubkey, privkey: privkey, - controller: this.controller - } + controller: this.controller, + }; } - /** sign Generates a JWS from a payload using an id from the wallet */ public async sign(payload: object): Promise { - if (this.unlockTimestamp < Date.now()) { - this.unlockedKey = null; - } + //TODO: TRY -- CATCH if (!this.unlockedKey) { throw Error("You must unlock the account before signing the message."); } @@ -128,10 +135,11 @@ export class DID { let sign = await JWS.createSign( { - fields: { cty: 'jwk+json' }, - format: 'compact' + fields: {cty: "jwk+json"}, + format: "compact", }, - this.unlockedKey) + this.unlockedKey + ) .update(buf) .final(); @@ -140,7 +148,7 @@ export class DID { /** verify Verifies a JWS from a payload using a did */ public async verify(signature: string, did: DID): Promise { - let pk = await JWK.asKey(did.pubkey, 'pem') + let pk = await JWK.asKey(did.pubkey, "pem"); let verify = await JWS.createVerify(pk).verify(signature); return JSON.parse(verify.payload.toString()); } @@ -156,7 +164,7 @@ export class Wallet { private keystore: Keystore; /** Drivers to connected blockchains */ - public networks: { [k: string]: TrustID }; + public networks: {[k: string]: TrustID}; /** Constructor for the wallet */ private constructor() { this.keystore = new FileKeystore(); @@ -175,6 +183,9 @@ export class Wallet { public async storeDID(did: DID): Promise { return this.keystore.storeDID(did); } + public async updateDID(did: DID): Promise { + return this.keystore.updateDID(did); + } public listDID(): string[] { return this.keystore.listDID(); } @@ -200,16 +211,20 @@ export class Wallet { const value: DID = new DID(type, controller); await value.createKey(passphrase); await this.keystore.storeDID(value); - + // If it is the first key assign key as default. // if (Object.keys(await this.keystore.getDID("default")).length === 0) { // this.keystore.setDefault(value); // } - if (Object.keys(await this.keystore.getDID(value.id)).length === 0) { - this.keystore.storeInMemory(value); - } return value; } + + /** updateTempKeyDID updates the temp key for a DID */ + public async updateTempKeyDID(id: string, passphrase: string = "",tempPassphrase: string=""): Promise { + const did = await this.keystore.getDID(id); + const unlockedDID = await did.unlockAccount(passphrase, tempPassphrase) + await this.keystore.updateDID(unlockedDID) + } } diff --git a/trustid-sdk/test/hfdiver.spec.ts b/trustid-sdk/test/hfdiver.spec.ts deleted file mode 100644 index d80df04a..00000000 --- a/trustid-sdk/test/hfdiver.spec.ts +++ /dev/null @@ -1,392 +0,0 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -import { HfDriver } from "../src/network/hfdriver"; - - -/* global describe, it, before, after */ -const {expect} = require("chai"); -const sinon = require("sinon"); -const FabricCAServices = require("fabric-ca-client"); -const {Wallets, Gateway} = require("fabric-network"); - -describe("HF Driver - Test", () => { - before(() => {}); - describe("Connect ", () => { - let gatewayStub: any; - let walletStub: any; - - let fabricCAServicesStub: any; - const errolment = { - certificate: "skdjsd00", - key: { - toBytes() {}, - }, - }; - before((done) => { - let wallet = { - put(){ - - } - } - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub.onSecondCall().rejects(new Error("Error connecting")); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - - after((done) => { - gatewayStub.restore(); - walletStub.restore(); - - fabricCAServicesStub.restore(); - done(); - }); - - it("Connect Success", async() => { - try{ - const hfdriver = new HfDriver() - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - - await hfdriver.connect(config) - sinon.assert.calledOnce(gatewayStub) - sinon.assert.calledOnce(walletStub) - sinon.assert.calledOnce(fabricCAServicesStub) - - - - } catch(err){ - console.log(err) - } - - }); - it("Connect Fail", async() => { - try{ - const hfdriver = new HfDriver() - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - - await hfdriver.connect(config) - - - } catch(err){ - expect(err.message).to.equal('Error connecting'); - } - - }); - - }); - describe("Disconnect ", () => { - let gatewayStub2: any; - - - let gatewayStub: any; - let walletStub: any; - - let fabricCAServicesStub: any; - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - const errolment = { - certificate: "skdjsd00", - key: { - toBytes() {}, - }, - }; - before((done) => { - let wallet = { - put(){ - - } - } - gatewayStub2 = sinon.stub(Gateway.prototype, "disconnect").resolves(); - gatewayStub2.onSecondCall().throws(new Error("Error disconnecting")); - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - - after((done) => { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - - - it("Disconnect Success", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - await hfdriver.disconnect() - - - } catch(err){ - console.log(err) - } - - }); - it("Disconnect Fail", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - await hfdriver.disconnect() - - } catch(err){ - expect(err.message).to.equal('Error disconnecting'); - } - - }); - - }); - describe("Call contract transaction ", () => { - - let gatewayStub: any; - let walletStub: any; - let gatewayStub2: any; - - let fabricCAServicesStub: any; - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - const errolment = { - certificate: "skdjsd00", - key: { - toBytes() {}, - }, - }; - before((done) => { - let wallet = { - put(){ - - } - } - let contract = { - submitTransaction(){ - return new Promise((resolve) => { - resolve("OK"); - }) - } - } - let network= { - getContract(){ - return new Promise((resolve) => { - resolve(contract) - }) - } - - } - - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); - gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - - after((done) => { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - - - it("Call Contract Success", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); - expect(res).to.equal("OK") - } catch(err){ - } - - }); - it("Disconnect Fail", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - await hfdriver.callContractTransaction("name", "invoke", ["a"]); - - } catch(err){ - expect(err.message).to.equal('Network not exists'); - } - - }); - - }); - describe("Get contract transaction ", () => { - - let gatewayStub: any; - let walletStub: any; - let gatewayStub2: any; - - let fabricCAServicesStub: any; - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, - ccp: "", - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel", - }; - const errolment = { - certificate: "skdjsd00", - key: { - toBytes() {}, - }, - }; - before((done) => { - let wallet = { - put(){ - - } - } - let contract = { - evaluateTransaction(){ - return new Promise((resolve) => { - resolve("OK"); - }) - } - } - let network= { - getContract(){ - return new Promise((resolve) => { - resolve(contract) - }) - } - - } - - gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); - gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); - gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) - walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); - - fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); - done(); - }); - - after((done) => { - gatewayStub.restore(); - walletStub.restore(); - gatewayStub2.restore(); - fabricCAServicesStub.restore(); - done(); - }); - - - it("get Contract Success", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); - expect(res).to.equal("OK") - } catch(err){ - } - - }); - it("Get contract Fail", async() => { - try{ - const hfdriver = new HfDriver() - await hfdriver.connect(config) - await hfdriver.getContractTransaction("name", "invoke", ["a"]); - - } catch(err){ - expect(err.message).to.equal('Network not exists'); - } - - }); - - }); -}); diff --git a/trustid-sdk/test/integration/test.ts b/trustid-sdk/test/integration/test.ts index cd74e967..47e03162 100755 --- a/trustid-sdk/test/integration/test.ts +++ b/trustid-sdk/test/integration/test.ts @@ -12,7 +12,7 @@ import {expect} from "chai"; import {TrustIdHf} from "../../src/network/trustHF"; const path = require("path"); const fs = require("fs"); -const ccpPath = path.resolve(__dirname, "..", "..", "..", "connection-profile.json"); +const ccpPath = path.resolve(__dirname, "..", "..", "..", "ccp-dev-dsn.json"); const adminPriv = `-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7Th71Us2fUkeB @@ -60,26 +60,20 @@ describe("Integration test", async() => { const wal = Wallet.Instance; try { - let ccp = JSON.parse(fs.readFileSync(ccpPath, "utf8")); - let config = { - stateStore: "/tmp/statestore", - caURL: "https://ca.org1.telefonica.com:7054", - caName: "ca.org1.telefonica.com", - caAdmin: "adminCA", - caPassword: "adminpw", - tlsOptions: { - trustedRoots: - "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false, - }, - mspId: "org1MSP", - walletID: "admin", - asLocalhost: true, + var ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); + + var config = { + stateStore: '/tmp/cloud', + caName: 'telefonicaca', + mspId: 'telefonicaMSP', + walletID: 'adminUser', + asLocalhost: false, ccp: ccp, chaincodeName: "identitycc", fcn: "proxy", - channel: "telefonicachannel", - }; + channel: "channel1" + } + let identity = await wal.generateDID("RSA", "default", "secret"); await wal.setDefault(identity); @@ -97,19 +91,20 @@ describe("Integration test", async() => { console.log("Getting created key..."); await trustID.getIdentity(await wal.getDID("default"), await didUnlock.id); const id = Date.now(); - const res = await trustID.createService(await wal.getDID("default"), `vtn:trustos:service:${id}`, "chaincode", access,"telefonicachannel"); + const res = await trustID.createService(await wal.getDID("default"), `vtn:trustos:service:${id}`, "sacc", access,config.channel); await trustID.updateService(await wal.getDID("default"), `vtn:trustos:service:${id}`, access); const result = await trustID.invoke( await wal.getDID("default"), `vtn:trustos:service:${id}`, ["set", "5", "100"], - "telefonicachannel" + config.channel + ); await wal.networks["hf"].disconnectDriver(); expect(result).to.equal("100"); } catch (err) { - await wal.networks["hf"].disconnectDriver(); + //await wal.networks["hf"].disconnectDriver(); console.log(err); } diff --git a/trustid-sdk/test/fileKeystore.spec.ts b/trustid-sdk/test/unit/fileKeystore.spec.ts similarity index 69% rename from trustid-sdk/test/fileKeystore.spec.ts rename to trustid-sdk/test/unit/fileKeystore.spec.ts index 75bab59c..f74de510 100644 --- a/trustid-sdk/test/fileKeystore.spec.ts +++ b/trustid-sdk/test/unit/fileKeystore.spec.ts @@ -6,8 +6,8 @@ SPDX-License-Identifier: Apache-2.0 */ import {expect} from "chai"; -import {Wallet} from "../src/wallet"; -import {FileKeystore} from "../src/keystore/fileKeystore"; +import {Wallet} from "../../src/wallet"; +import {FileKeystore} from "../../src/keystore/fileKeystore"; import "mocha"; @@ -20,8 +20,6 @@ wal.setKeystore(ks); describe("Keystore tests", async () => { const did = await wal.generateDID("RSA", "default", "secret"); - let hfChaincodeServiceStub, jwtHelperStubC; - it("Creates FileKeystore", () => { expect(ks).to.not.equal({}); }); @@ -32,11 +30,24 @@ describe("Keystore tests", async () => { // }); it("Store and load keystore", () => { - let ksfile2 = "./keystore"; const did2 = wal.generateDID("RSA"); ks.saveKeystore(); const ks2 = new FileKeystore("file", ksfile); ks2.loadKeystore("file", ksfile); // expect(ks.getDID(did2.id)).to.eql(did2) }); + + it("Store and update keystore", async () => { + let ksfile2 = "./keystore"; + const ks2 = new FileKeystore("file", ksfile2); + + const did2 = await wal.generateDID("RSA"); + let res = await ks2.getDID(did2.id) + + did2.tempPrivKey ="h23l" + + ks2.updateDID(did2) + res = await ks2.getDID(did2.id) + +}); }); diff --git a/trustid-sdk/test/unit/hfdiver.spec.ts b/trustid-sdk/test/unit/hfdiver.spec.ts new file mode 100644 index 00000000..47ea1884 --- /dev/null +++ b/trustid-sdk/test/unit/hfdiver.spec.ts @@ -0,0 +1,347 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { HfDriver } from "../../src/network/hfdriver"; + + +/* global describe, it, before, after */ +const {expect} = require("chai"); +const sinon = require("sinon"); +const fs = require("fs") +const FabricCAServices = require("fabric-ca-client"); +const {Wallets, Gateway} = require("fabric-network"); + +let config = { + stateStore: "/tmp/statestore", + caName: "ca.org1.telefonica.com", + + tlsOptions: { + trustedRoots: + "-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false, + }, + mspId: "org1MSP", + walletID: "admin", + asLocalhost: true, + ccp: { + certificateAuthorities: { + "ca.org1.telefonica.com": { + url: "https://ca.org1.telefonica.com:7054", + tlsCACerts: { + path: "/tmp", + + }, + registrar: { + enrollId: "admin", + enrollSecret: "pas" + }, + "caName": "telefonicaca", + } + }, + }, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel", +}; +describe("HF Driver - Test", () => { + before(() => {}); + describe("Connect ", () => { + let gatewayStub: any; + let walletStub: any; + let readFileStub: any; + let fabricCAServicesStub: any; + + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub.onSecondCall().throws(new Error("Error connecting")); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + walletStub.onSecondCall().throws(new Error("Error connecting")) + readFileStub = sinon.stub(fs, "readFileSync").returns({}) + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + readFileStub.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + it("Connect Success", async() => { + try{ + const hfdriver = new HfDriver() + + + await hfdriver.connect(config) + sinon.assert.calledOnce(gatewayStub) + sinon.assert.calledOnce(walletStub) + sinon.assert.calledOnce(readFileStub) + sinon.assert.calledOnce(fabricCAServicesStub) + + + + } catch(err){ + } + + }); + it("Connect Fail", async() => { + try{ + const hfdriver = new HfDriver() + // config.ccp.certificateAuthorities["ca.org1.telefonica.com"].url = "https://host:8282" + + await hfdriver.connect(config) + + + } catch(err){ + expect(err.message).to.equal('Error connecting'); + } + + }); + + }); + describe("Disconnect ", () => { + let gatewayStub2: any; + + let readFileStub: any; + + let gatewayStub: any; + let walletStub: any; + + let fabricCAServicesStub: any; + + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + readFileStub = sinon.stub(fs, "readFileSync").returns("") + + gatewayStub2 = sinon.stub(Gateway.prototype, "disconnect").resolves(); + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + walletStub.onSecondCall().throws(new Error("Error disconnecting")) + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + readFileStub.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("Disconnect Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.disconnect() + + + } catch(err){ + } + + }); + it("Disconnect Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.disconnect() + + } catch(err){ + expect(err.message).to.equal('Error disconnecting'); + } + + }); + + }); + describe("Call contract transaction ", () => { + + let gatewayStub: any; + let walletStub: any; + let gatewayStub2: any; +let readFileStub: any; + let fabricCAServicesStub: any; + + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + let contract = { + submitTransaction(){ + return new Promise((resolve) => { + resolve("OK"); + }) + } + } + let network= { + getContract(){ + return new Promise((resolve) => { + resolve(contract) + }) + } + + } + + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + walletStub.onSecondCall().rejects(new Error("Network not exists")) + + readFileStub = sinon.stub(fs, "readFileSync").returns({}) + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + gatewayStub2.restore(); + readFileStub.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("Call Contract Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); + expect(res).to.equal("OK") + } catch(err){ + } + + }); + it("Disconnect Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.callContractTransaction("name", "invoke", ["a"]); + + } catch(err){ + expect(err.message).to.equal('Network not exists'); + } + + }); + + }); + describe("Get contract transaction ", () => { + + let gatewayStub: any; + let walletStub: any; + let gatewayStub2: any; + let readFileStub: any; + + let fabricCAServicesStub: any; + + const errolment = { + certificate: "skdjsd00", + key: { + toBytes() {}, + }, + }; + before((done) => { + let wallet = { + put(){ + + } + } + let contract = { + evaluateTransaction(){ + return new Promise((resolve) => { + resolve("OK"); + }) + } + } + let network= { + getContract(){ + return new Promise((resolve) => { + resolve(contract) + }) + } + + } + readFileStub = sinon.stub(fs, "readFileSync").returns() + gatewayStub = sinon.stub(Gateway.prototype, "connect").resolves(); + gatewayStub2 = sinon.stub(Gateway.prototype, "getNetwork").resolves(network); + gatewayStub2.onSecondCall().rejects(new Error("Network not exists")) + walletStub = sinon.stub(Wallets, "newFileSystemWallet").resolves(wallet); + walletStub.onSecondCall().rejects(new Error("Network not exists")) + + fabricCAServicesStub = sinon.stub(FabricCAServices.prototype, "enroll").resolves(errolment); + done(); + }); + + after((done) => { + gatewayStub.restore(); + walletStub.restore(); + readFileStub.restore(); + + gatewayStub2.restore(); + fabricCAServicesStub.restore(); + done(); + }); + + + it("get Contract Success", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + const res = await hfdriver.callContractTransaction("name", "invoke", ["a"]); + expect(res).to.equal("OK") + } catch(err){ + } + + }); + it("Get contract Fail", async() => { + try{ + const hfdriver = new HfDriver() + await hfdriver.connect(config) + await hfdriver.getContractTransaction("name", "invoke", ["a"]); + + } catch(err){ + expect(err.message).to.equal('Network not exists'); + } + + }); + + }); +}); diff --git a/trustid-sdk/test/unit/localKeystore.spec.ts b/trustid-sdk/test/unit/localKeystore.spec.ts new file mode 100644 index 00000000..a0e179d5 --- /dev/null +++ b/trustid-sdk/test/unit/localKeystore.spec.ts @@ -0,0 +1,48 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {expect} from "chai"; +import {Wallet} from "../../src/wallet"; +import {LocalStorageKeystore} from "../../src/keystore/localStorageKeystore"; + +import "mocha"; + +const wal = Wallet.Instance; + +const ks = new LocalStorageKeystore(); +wal.setKeystore(ks); + +describe("LocalKeystore tests", async () => { + const did = await wal.generateDID("RSA", "default", "secret"); + + it("Creates LocalKeystore", () => { + expect(ks).to.not.equal({}); + }); + + + it("Store and get localkeystore", async() => { + const did2 = await wal.generateDID("RSA"); + await ks.storeDID(did2) + const result = await ks.getDID(did2.id) + console.log(result.id) + console.log(did2.id) + expect(did2.id).to.eql(result.id) + }); + + it("Store and update localkeystore", async () => { + + const did2 = await wal.generateDID("RSA"); + await ks.storeDID(did2); + let res = await ks.getDID(did2.id); + res.tempPrivKey ="h23l"; + await ks.updateDID(res); + const expectedRes = await ks.getDID(did2.id); + expect(expectedRes.tempPrivKey).to.eql(res.tempPrivKey); + + +}); +}); diff --git a/trustid-sdk/test/trustHF.spec.ts b/trustid-sdk/test/unit/trustHF.spec.ts similarity index 88% rename from trustid-sdk/test/trustHF.spec.ts rename to trustid-sdk/test/unit/trustHF.spec.ts index bc19c1ff..63bd3b3c 100644 --- a/trustid-sdk/test/trustHF.spec.ts +++ b/trustid-sdk/test/unit/trustHF.spec.ts @@ -5,11 +5,11 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {HfDriver} from "../src/network/hfdriver"; -import {TrustIdHf} from "../src/network/trustHF"; -import {DID} from "../src/wallet"; -import {Wallet} from "../src/wallet"; -import { AccessPolicy, PolicyType} from "../src/network/trustInterface"; +import {HfDriver} from "../../src/network/hfdriver"; +import {TrustIdHf} from "../../src/network/trustHF"; +import {DID} from "../../src/wallet"; +import {Wallet} from "../../src/wallet"; +import { AccessPolicy, PolicyType} from "../../src/network/trustInterface"; /* global describe, it, before, after */ const {expect} = require("chai"); @@ -108,7 +108,7 @@ describe("TrustHF - Test", async() => { }); }); - describe("Create identity ", () => { + describe("Create self identity ", () => { let driverStub: any; before((done) => { driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); @@ -121,7 +121,7 @@ describe("TrustHF - Test", async() => { done(); }); - it("Create Identity", async () => { + it("Create self Identity", async () => { try { const trustID = new TrustIdHf(config); const result = await trustID.createSelfIdentity(identity); @@ -130,30 +130,36 @@ describe("TrustHF - Test", async() => { console.log(err); } }); - it("Connect Fail", async () => { + it("Crete self Fail", async () => { try { + const trustID = new TrustIdHf(config); + await trustID.createSelfIdentity(identity); + } catch (err) { expect(err.message).to.equal("Error calling contract"); } }); }); - describe("Create identity ", () => { - let driverStub: any; + describe("Create identity ", async () => { + const didController = await wal.generateDID('RSA', 'default', 'pass') + + let driverStubw: any; + before((done) => { - driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); + driverStubw = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStubw.onSecondCall().rejects(new Error("Error calling contract")); done(); }); after((done) => { - driverStub.restore(); + //driverStubw.restore(); done(); }); it("Create Identity", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createSelfIdentity(identity); + const result = await trustID.createIdentity(identity, didController); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -162,7 +168,7 @@ describe("TrustHF - Test", async() => { it("Create Fail", async () => { try { const trustID = new TrustIdHf(config); - await trustID.createSelfIdentity(identity); + await trustID.createIdentity(identity, didController); } catch (err) { expect(err.message).to.equal("Error calling contract"); } @@ -263,7 +269,7 @@ describe("TrustHF - Test", async() => { }); describe("Create Service ", () => { let driverStub: any; - let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, registry: {}}; before((done) => { driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); @@ -279,7 +285,7 @@ describe("TrustHF - Test", async() => { it("Create Service Success", async () => { try { const trustID = new TrustIdHf(config); - const result = await trustID.createService(identity, "id", "name", access, true, "channel"); + const result = await trustID.createService(identity, "id", "name", access, "channel"); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -287,27 +293,27 @@ describe("TrustHF - Test", async() => { }); it("Create Service Fail", async () => { try { - const trustID = new TrustIdHf(config); - const result = await trustID.createService(identity, "id", "name", access, true, "channel"); + const trustID = new TrustIdHf(config); + const result = await trustID.createService(identity, "id", "name", access, "channel"); } catch (err) { expect(err.message).to.equal("Error calling contract"); } }); }); describe("Update Service ", () => { - let driverStub: any; + let driverStub2: any; before((done) => { - driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); - driverStub.onSecondCall().rejects(new Error("Error calling contract")); + driverStub2 = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("OK"); + driverStub2.onSecondCall().rejects(new Error("Error calling contract")); done(); }); after((done) => { - driverStub.restore(); + driverStub2.restore(); done(); }); - let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, registry: {}}; it("Update Service Success", async () => { @@ -332,7 +338,8 @@ describe("TrustHF - Test", async() => { describe("Get Service ", () => { let driverStub: any; before((done) => { - driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("Service1"); + const service = {service: "service"} + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves(JSON.stringify(service)); driverStub.onSecondCall().rejects(new Error("Error calling contract")); done(); }); @@ -341,7 +348,7 @@ describe("TrustHF - Test", async() => { driverStub.restore(); done(); }); - let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, Registry: {}}; + let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, registry: {}}; it("Get Service Success", async () => { @@ -349,7 +356,7 @@ describe("TrustHF - Test", async() => { const trustID = new TrustIdHf(config); const result = await trustID.getService(identity, "id"); - expect(result).to.equal("Service1"); + expect(result.service).to.equal("service"); } catch (err) { console.log(err); } diff --git a/trustid-sdk/test/unit/wallet.spec.ts b/trustid-sdk/test/unit/wallet.spec.ts new file mode 100644 index 00000000..4347af1d --- /dev/null +++ b/trustid-sdk/test/unit/wallet.spec.ts @@ -0,0 +1,178 @@ + +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { expect } from 'chai'; +import { Wallet } from '../../src/wallet'; +import { FileKeystore } from '../../src/keystore/fileKeystore'; +import 'mocha'; + +const wal = Wallet.Instance; +//const hfdriver = wal.drivers.hf +const ks = new FileKeystore('file'); +wal.setKeystore(ks) + +describe('Wallet tests', () => { + + it('creates new wallet', () => { + expect(wal).to.not.equal({}); + }); + + it('Creates FileKeystore for integration in wallet', () => { + + expect(ks).to.not.equal({}); + }); + + it('List DIDs', async () => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + await wal.storeInMemory(did); + const res = await wal.listDID() + expect(res).to.not.equal({}); + + }); + + it('Store default DIDs', async () => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + await wal.storeDID(did); + + wal.setDefault(did) + const res = await wal.getDID('default') + expect(res.id).to.equal(did.id); + + }); + + + it('wallet not initialized twice', () => { + const wal2 = Wallet.Instance; + expect(wal).to.equal(wal2); + }); + + it('generate RSA DID', async () => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + const did2 = await wal.generateDID('RSA', 'default', 'secret'); + expect([did.type, did.controller]).to.eql(['RSA', 'default']); + expect(await wal.getDID(did.id)).to.eql(did); + expect(await wal.getDID(did.id)).to.not.eql(did2); + }); + + it('generate EC DID', async () => { + const did = await wal.generateDID('EC', 'default', 'secret'); + const did2 = await wal.generateDID('EC', 'default', 'secret'); + expect([did.type, did.controller]).to.eql(['EC', 'default']); + expect(await wal.getDID(did.id)).to.eql(did); + expect(await wal.getDID(did.id)).to.not.eql(did2); + }); + + it('bad algorithm ', async () => { + try { + const did = await wal.generateDID('EasaC', 'default', 'secret'); + + } catch (err){ + expect(err.message).to.eql("Key algorithm not supported") + } + + }); + + it('Update did', async() => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + did.tempPrivKey = "lalsal" + await wal.updateDID(did); + + const getDID = await wal.getDID(did.id) + expect(getDID.tempPrivKey).to.eql(did.tempPrivKey) + }); + + it('Unlock account bad', async() => { + try { + const did = await wal.generateDID('RSA', 'default', 'secret'); + await did.unlockAccount('') + } catch(err){ + expect(err.message).to.eql("Private key couldn't be deciphered") + } + }); + + it('Export did', async() => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + const didExp = await did.exportDID(false) + expect(did.id).to.eql(didExp.id) + }); + it('Export did with privKey', async() => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + const didExp = await did.exportDID(true) + expect("").to.not.eql(didExp.privkey) + }); + it('Create temp key', async() => { + const did = await wal.generateDID('RSA', 'default', 'secret'); + await did.unlockAccount('secret', 'tempPass' ) + await did.unlockAccountTemp('tempPass') + expect(did.tempPrivKey).to.not.eql("") + }); + + + it('Not create temp key', async() => { + try { + const did = await wal.generateDID('RSA', 'default', 'secret'); + await did.unlockAccount('secret' ) + await did.unlockAccountTemp('tempPass') + } catch(err){ + expect(err.message).to.eql("Private key couldn't be deciphered") + } + }); + + + it('DID operations', async () => { + const did = await wal.generateDID('EC', 'default', 'secret'); + const did2 = await wal.generateDID('EC', 'default', 'secret'); + + const payload = {my: "payload"} + try { + await wal.generateDID('ed213', 'default', 'secret') + } catch(err) { + expect(err).to.be.an('error'); + } + + try { + await did.unlockAccount('wrong') + } catch(err) { + expect(err).to.be.an('error'); + } + + try { + await did.sign(payload) + } catch(err) { + expect(err).to.be.an('error'); + } + + await did2.unlockAccount('secret'); + await did.unlockAccount('secret'); + + + const signed = await did2.sign(payload); + const verified = await did.verify(signed, did2); + + expect(verified).to.eql(payload); + + // Wrong verification + try { + await did.verify(signed, did); + } catch(err) { + expect(err).to.be.an('error'); + } + + did.lockAccount() + + try { + await did.sign(payload) + } catch(err) { + expect(err).to.be.an('error'); + } + + }); + + +}); + diff --git a/trustid-sdk/test/wallet.spec.ts b/trustid-sdk/test/wallet.spec.ts deleted file mode 100644 index eb3a3538..00000000 --- a/trustid-sdk/test/wallet.spec.ts +++ /dev/null @@ -1,95 +0,0 @@ - -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -import { expect } from 'chai'; -import { Wallet } from '../src/wallet'; -import { FileKeystore } from '../src/keystore/fileKeystore'; - -import 'mocha'; - -const wal = Wallet.Instance; -//const hfdriver = wal.drivers.hf -const ks = new FileKeystore('file'); -wal.setKeystore(ks) - -describe('Wallet tests', () => { - - it('creates new wallet', () => { - expect(wal).to.not.equal({}); - }); - - it('Creates FileKeystore for integration in wallet', () => { - expect(ks).to.not.equal({}); - }); - - - it('wallet not initialized twice', () => { - const wal2 = Wallet.Instance; - expect(wal).to.equal(wal2); - }); - - it('generate RSA DID', async () => { - const did = await wal.generateDID('RSA', 'default', 'secret'); - const did2 = await wal.generateDID('RSA', 'default', 'secret'); - expect([did.type, did.controller]).to.eql(['RSA', 'default']); - expect(await wal.getDID(did.id)).to.eql(did); - expect(await wal.getDID(did.id)).to.not.eql(did2); - }); - - it('DID operations', async () => { - const did = await wal.generateDID('EC', 'default', 'secret'); - const did2 = await wal.generateDID('EC', 'default', 'secret'); - - const payload = {my: "payload"} - try { - await wal.generateDID('ed213', 'default', 'secret') - } catch(err) { - expect(err).to.be.an('error'); - } - - try { - await did.unlockAccount('wrong') - } catch(err) { - expect(err).to.be.an('error'); - } - - try { - await did.sign(payload) - } catch(err) { - expect(err).to.be.an('error'); - } - - await did2.unlockAccount('secret'); - await did.unlockAccount('secret'); - - - const signed = await did2.sign(payload); - const verified = await did.verify(signed, did2); - - expect(verified).to.eql(payload); - - // Wrong verification - try { - await did.verify(signed, did); - } catch(err) { - expect(err).to.be.an('error'); - } - - did.lockAccount() - - try { - await did.sign(payload) - } catch(err) { - expect(err).to.be.an('error'); - } - - }); - - -}); - From eeb9b9a2315c95d25af5760dcc95d79d341e0fd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 08:18:52 +0100 Subject: [PATCH 09/25] Bump lodash from 4.17.15 to 4.17.20 in /trustid-sdk (#20) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 26eb36f8..5fd01bec 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1499,9 +1499,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "lodash.camelcase": { "version": "4.3.0", From 3327a5d3190f95ac0a3676f0f1260da69f149a3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 08:19:04 +0100 Subject: [PATCH 10/25] Bump bl from 2.2.0 to 2.2.1 in /trustid-sdk (#19) Bumps [bl](https://github.com/rvagg/bl) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v2.2.0...v2.2.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 5fd01bec..df046e07 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -443,9 +443,9 @@ "dev": true }, "bl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.0.tgz", - "integrity": "sha512-wbgvOpqopSr7uq6fJrLH8EsvYMJf9gzfo2jCsL2eTy75qXPukA4pCgHamOQkZtY5vmfVtjB+P3LNlMHW5CEZXA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" From 337070ae41a7c8992838c16504d1410e22c7e2e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Fri, 15 Jan 2021 04:26:36 -0800 Subject: [PATCH 11/25] added update service functionalities, upadate docs, logging and error managing (#27) Signed-off-by: Maria Teresa Nieto --- fabric-chaincode/Dockerfile | 19 -- fabric-chaincode/README.md | 95 +++----- fabric-chaincode/chaincode.gateway.go | 60 +++-- fabric-chaincode/chaincode_test.go | 4 +- fabric-chaincode/go.mod | 8 +- fabric-chaincode/id.gateway.go | 75 ++++--- fabric-chaincode/id.registry.go | 70 +++--- fabric-chaincode/jose.utils.go | 27 ++- fabric-chaincode/main.go | 22 +- fabric-chaincode/model.go | 51 ++++- fabric-chaincode/proxy.gateway.go | 22 +- fabric-chaincode/service.gateway.go | 88 ++++++-- fabric-chaincode/service.registry.go | 86 +++++--- trustid-sdk/README.md | 3 +- trustid-sdk/connection-profile.json | 205 ------------------ trustid-sdk/examples/getting-started.ts | 24 +- trustid-sdk/index-light.ts | 11 - trustid-sdk/index.ts | 13 +- trustid-sdk/keystore | 1 - trustid-sdk/main.js | 48 ---- trustid-sdk/package-lock.json | 67 +++--- trustid-sdk/package.json | 2 +- trustid-sdk/src/core/did.ts | 172 +++++++++++++++ .../trustInterface.ts => core/trustid.ts} | 10 +- .../{network/trustHF.ts => core/trustidHF.ts} | 102 ++++++++- .../src/{network => drivers}/driver.ts | 0 .../src/{network => drivers}/hfdriver.ts | 0 trustid-sdk/src/keystore/mongoKeystore.ts | 126 ----------- .../{keystore => keystores}/fileKeystore.ts | 11 +- .../src/{keystore => keystores}/keystore.ts | 10 +- .../localStorageKeystore.ts | 2 +- trustid-sdk/src/keystores/mongoKeystore.ts | 112 ++++++++++ trustid-sdk/src/wallet.ts | 182 ++-------------- trustid-sdk/test/integration/test.ts | 8 +- trustid-sdk/test/unit/fileKeystore.spec.ts | 2 +- trustid-sdk/test/unit/hfdiver.spec.ts | 2 +- trustid-sdk/test/unit/localKeystore.spec.ts | 2 +- trustid-sdk/test/unit/trustHF.spec.ts | 145 ++++++++++++- trustid-sdk/test/unit/wallet.spec.ts | 18 +- trustid-sdk/tsconfig-light.json | 76 ------- trustid-sdk/tsconfig-singleFile.json | 76 ------- 41 files changed, 1006 insertions(+), 1051 deletions(-) delete mode 100644 fabric-chaincode/Dockerfile delete mode 100644 trustid-sdk/connection-profile.json delete mode 100755 trustid-sdk/index-light.ts delete mode 100644 trustid-sdk/keystore delete mode 100644 trustid-sdk/main.js create mode 100644 trustid-sdk/src/core/did.ts rename trustid-sdk/src/{network/trustInterface.ts => core/trustid.ts} (81%) rename trustid-sdk/src/{network/trustHF.ts => core/trustidHF.ts} (74%) rename trustid-sdk/src/{network => drivers}/driver.ts (100%) rename trustid-sdk/src/{network => drivers}/hfdriver.ts (100%) delete mode 100644 trustid-sdk/src/keystore/mongoKeystore.ts rename trustid-sdk/src/{keystore => keystores}/fileKeystore.ts (95%) rename trustid-sdk/src/{keystore => keystores}/keystore.ts (83%) rename trustid-sdk/src/{keystore => keystores}/localStorageKeystore.ts (97%) create mode 100644 trustid-sdk/src/keystores/mongoKeystore.ts mode change 100755 => 100644 trustid-sdk/src/wallet.ts delete mode 100755 trustid-sdk/tsconfig-light.json delete mode 100755 trustid-sdk/tsconfig-singleFile.json diff --git a/fabric-chaincode/Dockerfile b/fabric-chaincode/Dockerfile deleted file mode 100644 index 884a1ac6..00000000 --- a/fabric-chaincode/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# This image is a microservice in golang for the Degree chaincode -FROM golang:1.13.8-alpine AS build - -COPY ./ /go/src/github.com/coren-identitycc -WORKDIR /go/src/github.com/coren-identitycc - -# Build application -RUN go build -o chaincode -v . - -# Production ready image -# Pass the binary to the prod image -FROM alpine:3.11 as prod - -COPY --from=build /go/src/github.com/coren-identitycc/chaincode /app/chaincode - -USER 1000 - -WORKDIR /app -CMD ./chaincode diff --git a/fabric-chaincode/README.md b/fabric-chaincode/README.md index 6ea6b4ca..f424d9c3 100644 --- a/fabric-chaincode/README.md +++ b/fabric-chaincode/README.md @@ -1,4 +1,4 @@ -# IDENTITY CHAINCODE (coren-identitycc) +# TRUSTID CHAINCODE A chaincode or smart contract, with all the functionalities allowing developers to create, manage, and export digital assets on the Hyperledger Fabric network @@ -24,7 +24,6 @@ Identity for services is represented with the following structure: - ## Chaincode internal functionalities ### Init @@ -32,8 +31,8 @@ Initializes the chaincode with the first controller identity that will be the is ```js { - did: "did:vtn:trustos:telefonica:0", - controller: "did:vtn:trustos:telefonica:0", + did: "did:vtn:trustos:company:0", + controller: "did:vtn:trustos:company:0", publicKey: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7NBDzVMESXU/yuARe7YU\nGrkgNMZh5eA5w3PgxgYZf/isDLPHvmSM2Q9cTauDroriGInikQxtZ/CI4+9Qi4Rd\nJCHjeWhzw0hTIXhHoohyo9QTbUVetb4RBDJEcNqFrpztAojn8Ib5EF2soBFtBLyT\nguxlizcWwTZvv+KxHGBg/tUE7JIqw3YzmEK31faR2HhkPPqxTQ9F+h4SOnY9e6Cf\nh75PpjouzarpntSVkAqv/Ot5kV3O4TcWhB0vUr/HZwx2iX+LEyYock8Sx4Op20/g\n7k3J3rYhMGTHfkKMhZjX9QoZ8uBRiSxieAaia0yZSIcycgE6Aqu6KT+WaQn4bCnh\nwQIDAQAB\n-----END PUBLIC KEY-----" } @@ -50,7 +49,7 @@ All invokes are called via the proxy function. The proxy function args are: ```js { - did: "did:vtn:trustos:telefonica:0", + did: "did:vtn:trustos:company:0", payload: "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlbGZJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJkaWQ6dnRuOnRydXN0b3M6dGVsZWZvbmljYToyIiwicHVibGljS2V5IjoiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdTA0ZTlWTE5uMUpIZ1lOSU1SclVcblE0SkhoSG4wd1p4UENEOWtjUHo2M1NNQmlZbkN0Uk0yNHBLODZnQWFUdU00RDhWMkxqckE2ZHZCV3dCT2YydUZcbi80aXJJUlhNT2FJNTh1dFhFQ3NBMHI2Q3cyU3BDWVNWOEJLMXk4aHBuc3cwMi9UMHhZUkRiRnFmaHZxYQ", } @@ -66,7 +65,7 @@ The payload is signed in jws format. The content of the payload has the followin { function: "createSelfIdentity", params: { - did: "did:vtn:trustos:telefonica:2", + did: "did:vtn:trustos:company:2", publicKey: publick.toString() } @@ -90,7 +89,7 @@ The params in the payload has the following form: ```js { - did: "did:vtn:trustos:telefonica:2", + did: "did:vtn:trustos:company:2", publicKey: publick.toString() } @@ -101,7 +100,7 @@ The params in the payload has the following form: Gets an identity using the DID.The params to sign in the payload are: ```js { - did: "did:vtn:trustos:telefonica:2", + did: "did:vtn:trustos:company:2", } ``` @@ -110,7 +109,7 @@ Gets an identity using the DID.The params to sign in the payload are: The controller verifies the identity. The params in the signed payload are ```js { - did: "did:vtn:trustos:telefonica:2", + did: "did:vtn:trustos:company:2", } ``` @@ -119,7 +118,7 @@ The controller verifies the identity. The params in the signed payload are Revokes an identity. THhe params in the signed payload are: ```js { - did: "did:vtn:trustos:telefonica:2", + did: "did:vtn:trustos:company:2", } ``` @@ -127,24 +126,38 @@ Revokes an identity. THhe params in the signed payload are: - **`createServiceIdentity()`**
Creates a service identity. ```js -{ - did: "vtn:trustos:service:1", - name: "chaincode_example02", - isPublic: true +{ + "serviceID": "coren-trackscc", + "name": "coren-trackscc", + "access": { + "policy": "SAME_CONTROLLER" + }, + "channel": "channel1" } ``` - **`updateServiceAccess()`**
-Update the access for a users DID. +Update the service access. ```js { did: "vtn:trustos:service:1", access: { - did: "did:vtn:trustos:telefonica:1", - type: 2 - - }, - isPublic: true + policy: "FINE_GRAINED", + threshold: 0, + access: { + "did:vtn:trustid:c0fd6b4749329c4acec7f4ac273d46c2b755736e9f5cae6fc62acec8d04549c6": 2 + } + } + +} +``` +- **`updateService()`**
+Update the information from a Service. +```js +{ + did: "vtn:trustos:service:1", + name: "chaincodeName", + channel: "channelName" } ``` @@ -162,7 +175,7 @@ Invokes a chaincode deployed as a service in the vtn platform. Args are the func { did: "vtn:trustos:service:1", args: ["invoke", "a", "b", "1"], - channel: "telefonicachannel" + channel: "companychannel" } ``` @@ -183,17 +196,8 @@ Invokes a chaincode deployed as a service in the vtn platform. Args are the func -## Architecture of the chaincode -``` -coren-trackscc -├── src - └── chaincode - ├── go files with the logic and tests -├── postman - ├── collection.json // postman collection - └── environment.json // postman environment -└── README.md - ``` + + ## Project configuration This project has to be stored in the following route @@ -231,30 +235,3 @@ go test ```` - - - diff --git a/fabric-chaincode/chaincode.gateway.go b/fabric-chaincode/chaincode.gateway.go index 78fadb82..e357f843 100644 --- a/fabric-chaincode/chaincode.gateway.go +++ b/fabric-chaincode/chaincode.gateway.go @@ -8,7 +8,8 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" + "encoding/json" "errors" "fmt" @@ -26,34 +27,34 @@ func toChaincodeArgs(args ...string) [][]byte { } func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, userDID string, args interface{}) (string, error) { - log.Infof("[%s][invoke] Invoke chaincode", proxyGateway) + log.Infof("[%s][%s][invoke] Invoke chaincode", CHANNEL_ENV, proxyGateway) interact := make(map[string]interface{}) interact = args.(map[string]interface{}) if interact["did"] == nil { - log.Errorf("[%s][invoke]*** Error calling service, no service DID Specified", proxyGateway) - return "", errors.New("Error calling service, no service DID Specified") + log.Errorf("[%s][%s][invoke] %s", CHANNEL_ENV, ERRORDidMissing, proxyGateway) + return "", errors.New(ERRORDidMissing) } - log.Debugf("[%s][invoke] Check access to interact for did: %s and service: %s", proxyGateway, userDID, interact["did"].(string)) + log.Debugf("[%s][%s][invoke] Check access to interact for did: %s and service: %s", CHANNEL_ENV, proxyGateway, userDID, interact["did"].(string)) service, err := cc.getServiceRegistry(stub, interact["did"].(string)) if err != nil { - log.Errorf("[%s][invoke]*** Error calling service: ", err.Error()) + log.Errorf("[%s][%s][invoke] Error calling service: ", CHANNEL_ENV, err.Error()) return "", err } ccName := service.Name channel := service.Channel - log.Debugf("[%s][invoke] Access for did: %s and service: %s", proxyGateway, userDID, interact["did"].(string)) + log.Debugf("[%s][%s][invoke] Access for did: %s and service: %s", CHANNEL_ENV, proxyGateway, userDID, interact["did"].(string)) if err != nil { - log.Errorf("[%s][invoke]*** Error calling service, problem getting service", err.Error()) + log.Errorf("[%s][%s][invoke] Error calling service, problem getting service %v", CHANNEL_ENV, proxyGateway, err.Error()) return "", err } if cc.hasAccess(stub, service, userDID) { - log.Debugf("[%s][invoke] Did: %s has access to service %s, invoking cc", proxyGateway, userDID, interact["did"].(string)) - log.Debugf("[%s][invoke] Interact for chaincode %s args are %v", proxyGateway, ccName, interact["args"]) + log.Debugf("[%s][%s][invoke] Did: %s has access to service %s, invoking cc", CHANNEL_ENV, proxyGateway, userDID, interact["did"].(string)) + log.Debugf("[%s][%s][invoke] Interact for chaincode %s args are %v", CHANNEL_ENV, proxyGateway, ccName, interact["args"]) s := make([]string, len(interact["args"].([]interface{}))) for i, v := range interact["args"].([]interface{}) { s[i] = fmt.Sprint(v) @@ -62,17 +63,40 @@ func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, userDID string, ar argBytes := toChaincodeArgs(s...) response := stub.InvokeChaincode(ccName, argBytes, channel) if response.Status != shim.OK { - log.Debugf("[%s][invoke] Error invoking chaincode %s", proxyGateway, response.Message) + log.Debugf("[%s][%s][invoke] Error invoking chaincode %s", CHANNEL_ENV, proxyGateway, response.Message) return "", errors.New(response.Message) } - log.Debugf("[%s][invoke] Invoke OK, returning result", proxyGateway) - log.Infof("%v", response.Payload) - - return string(response.Payload), nil + log.Debugf("[%s][%s][invoke] Invoke OK, returning result", CHANNEL_ENV, proxyGateway) + log.Infof("[%s][%s][invoke] Invoke received result: %v", CHANNEL_ENV, proxyGateway, string(response.Payload)) + event := Event{} + payload := map[string]interface{}{} + _ = json.Unmarshal(response.Payload, &payload) + if payload["event"] != nil { + eventBytes, _ := json.Marshal(payload["event"]) + err := json.Unmarshal(eventBytes, &event) + log.Debugf("event: %v \n", event) + + // Here we insert the payload along with the serviceDID & transaction ID + eventPayload := map[string]interface{}{} + err = json.Unmarshal(event.Payload, &eventPayload) + eventBis := map[string]interface{}{"message": eventPayload, "did": interact["did"], "txId": stub.GetTxID()} + eventBytesBis, _ := json.Marshal(eventBis) + + // Emit the event + err = stub.SetEvent(event.EventName, []byte(eventBytesBis)) + if err != nil { + log.Errorf(" ERROR Fail to set event" + err.Error()) + } + + responseBytes, _ := json.Marshal(payload["response"]) + return string(responseBytes), nil + } else { + return string(response.Payload), nil + } } - log.Errorf("[%s][invoke] User %s has not access to this resources", proxyGateway, userDID) - err = errors.New("User has not access") + log.Errorf("[%s][%s][invoke] User %s has not access to this resources", CHANNEL_ENV, proxyGateway, userDID) + err = errors.New(ERRORUserAccess) return "", err } @@ -82,7 +106,7 @@ func (cc *Chaincode) invoke(stub shim.ChaincodeStubInterface, userDID string, ar func (cc *Chaincode) hasAccess(stub shim.ChaincodeStubInterface, service *Service, userDid string) bool { idReturn, err := cc.getIDRegistry(stub, userDid) if err != nil { - log.Errorf("[%s][checkAccess] Error getting access policy %s ", proxyGateway, userDid) + log.Errorf("[%s][%s][checkAccess] Error getting access policy %s ", CHANNEL_ENV, proxyGateway, userDid) return false } switch service.Access.Policy { diff --git a/fabric-chaincode/chaincode_test.go b/fabric-chaincode/chaincode_test.go index 3a7f45b5..999f91dd 100644 --- a/fabric-chaincode/chaincode_test.go +++ b/fabric-chaincode/chaincode_test.go @@ -66,7 +66,7 @@ func TestServices(t *testing.T) { }) t.Run("Create Service", func(t *testing.T) { - servicePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlcnZpY2VJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJ2dG46dHJ1c3RvczpzZXJ2aWNlOjEiLCJuYW1lIjoiY2hhaW5jb2RlX2V4YW1wbGUwMiIsImlzUHVibGljIjp0cnVlfX0.ZD09jbF7YbNbCAlvZhQAS3e76ziwqD-2v3Z-A9abVRPGpuqF4KR4YOkb3lyzLeiiZJo240tDPzfFessG93yCxY3KOcREXZ5hAFqhxk25Eyw9Cx_vngj8_ON7bfh7DBc5J05c4K2-QET9PV1MMWBqeS3TjiCq2zBfHxsWBRsTeOA5e32X6xyqAZq6Cj2NXA4kLXSd4zhRu_B5xtG4HobwhOFqLnliSP74tvBM_disK3Yk08qfrsr9o5u5xOofdbcigEUpaZVpFVdT79VFkFHvrX-ACoadeMMCq87sraE3riEAGaqnXPuIZurE50APyUJAWTYbTHOSYlW9bRB21C8smA" + servicePayload := "eyJhbGdvcml0aG0iOiJQUzI1NiIsImFsZyI6IlBTMjU2In0.eyJmdW5jdGlvbiI6ImNyZWF0ZVNlcnZpY2VJZGVudGl0eSIsInBhcmFtcyI6eyJkaWQiOiJ2dG46dHJ1c3RvczpzZXJ2aWNlOjEiLCJuYW1lIjoiY2hhaW5jb2RlX2V4YW1wbGUwMiIsImlzUHVibGljIjp0cnVlLCJjaGFubmVsIjoidGVsZWZvbmljYWNoYW5uZWwifX0.Zr-Vqp2hGRTmwzXdKAyzBe8MdiqUjpshwR_gtP931TEgwNYwX8jQdZlP_yEIbthepWUwgcP0wZSoMgsssamVJ-U9yf2Ts2TjMJkUOiehXz2gzkzJ-nKWYuDKhF-IAM1nadkejb3442R5iPetlb8IzpwiJkVuc1TorpcciE38fEO81hhI_iUsdWCWrcNSNMYEecFsEui12VbBJKy3Ab9u6h1q0jhMMxg3qutwNaJzoOD2kE2afQidzQ1vyze5xXlsciqd35xtL3bzVPNIxcjkVNx1L2ST0ugY1N1NQcET3tyfTpO8AtyHRrscPjC0IDyjFthkmcRsdPwun3v5scRtEw" service := Request{Did: "did:vtn:trustos:telefonica:2", Payload: servicePayload} CreateService(t, stub, service) }) @@ -110,7 +110,7 @@ func CreateUnverifiedIdentity(t *testing.T, stub *testcc.MockStub, invokeReq Ide if res.Status != shim.OK { t.Error("Invoke failed", res.Status, res.Message) } - expectedRes := "" + expectedRes := "The identity has been stored in DLT successfully" assert.Equal(t, expectedRes, string(res.Payload), "Should be the same") } diff --git a/fabric-chaincode/go.mod b/fabric-chaincode/go.mod index 40d5cefd..b73c7174 100644 --- a/fabric-chaincode/go.mod +++ b/fabric-chaincode/go.mod @@ -1,20 +1,14 @@ -module coren-identitycc/src/chaincode +module TrustID/fabric-chaincode/ go 1.12 require ( github.com/fsouza/go-dockerclient v1.6.5 // indirect - github.com/go-logfmt/logfmt v0.4.0 // indirect github.com/hyperledger/fabric-amcl v0.0.0-20200424173818-327c9e2cf77a // indirect github.com/hyperledger/fabric-chaincode-go v0.0.0-20200511190512-bcfeb58dd83a - github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/hyperledger/fabric-protos-go v0.0.0-20200506201313-25f6564b9ac4 - github.com/pierrec/lz4 v2.0.5+incompatible // indirect github.com/s7techlab/cckit v0.6.14 // indirect github.com/sirupsen/logrus v1.6.0 - github.com/spf13/viper v1.4.0 // indirect github.com/stretchr/testify v1.5.1 - github.com/sykesm/zap-logfmt v0.0.3 // indirect - github.com/syndtr/goleveldb v1.0.0 // indirect gopkg.in/square/go-jose.v2 v2.5.1 ) diff --git a/fabric-chaincode/id.gateway.go b/fabric-chaincode/id.gateway.go index 02d09ac0..b0779932 100644 --- a/fabric-chaincode/id.gateway.go +++ b/fabric-chaincode/id.gateway.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" "errors" @@ -22,11 +22,16 @@ func (cc *Chaincode) getIdentity(stub shim.ChaincodeStubInterface, did string, i idReq := make(map[string]interface{}) idReq = args.(map[string]interface{}) - log.Infof("[%s][verifyIdentity] Get Identity %v", IDGATEWAY, idReq["did"].(string)) + if idReq["did"] == nil { + log.Errorf("[%s][%s][getIdentity] Problem getting identity: %v", CHANNEL_ENV, IDGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } + + log.Infof("[%s][%s][getIdentity] Get Identity %v", CHANNEL_ENV, IDGATEWAY, idReq["did"].(string)) if idReq["did"].(string) != did { idReturn, err = cc.getIDRegistry(stub, idReq["did"].(string)) if err != nil { - log.Errorf("[%s][getIdentity] Problem getting identity: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][%s][getIdentity] Problem getting identity: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) return "nil", err } @@ -38,7 +43,7 @@ func (cc *Chaincode) getIdentity(stub shim.ChaincodeStubInterface, did string, i identityReponse["did"] = idReq["did"].(string) identityReponse["publicKey"] = idReturn.PublicKey - log.Infof("[%s][getIdentity] Get Identity", IDGATEWAY) + log.Infof("[%s][%s][getIdentity] Get Identity", CHANNEL_ENV, IDGATEWAY) idBytes, err := json.Marshal(identityReponse) @@ -49,12 +54,17 @@ func (cc *Chaincode) createIdentity(stub shim.ChaincodeStubInterface, controller idReq := make(map[string]interface{}) idReq = args.(map[string]interface{}) - log.Debugf("[%s][createIdentity] Calling to registry", IDGATEWAY) + log.Debugf("[%s][%s][createIdentity] Calling to registry", CHANNEL_ENV, IDGATEWAY) + + if idReq["did"] == nil { + log.Errorf("[%s][%s][createIdentity] rror creating Identity: %v", CHANNEL_ENV, IDGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } identityStore := Identity{PublicKey: idReq["publicKey"].(string), Controller: controller} _, err := cc.createIDRegistry(stub, idReq["did"].(string), identityStore) if err != nil { - log.Errorf("[%s][createIdentity] Error creating Identity: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][%s][createIdentity] Error creating Identity: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) return "", err } @@ -65,57 +75,72 @@ func (cc *Chaincode) createIdentity(stub shim.ChaincodeStubInterface, controller func (cc *Chaincode) createSelfIdentity(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { idReq := make(map[string]interface{}) idReq = args.(map[string]interface{}) - log.Debugf("[%s][createSelfIdentity] Calling to registry", IDGATEWAY) + log.Debugf("[%s][%s][createSelfIdentity] Calling to registry", CHANNEL_ENV, IDGATEWAY) identityStore := Identity{PublicKey: idReq["publicKey"].(string)} + if idReq["did"] == nil { + log.Errorf("[%s][%s][createSelfIdentity] Error creating Identity: %v", CHANNEL_ENV, IDGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } + _, err := cc.createIDRegistry(stub, idReq["did"].(string), identityStore) if err != nil { - log.Errorf("[%s][createSelfIdentity] Error creating Identity: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][%s][createSelfIdentity] Error creating Identity: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) return "", err } - return "", nil + return "The identity has been stored in DLT successfully", nil } func (cc *Chaincode) verifyIdentity(stub shim.ChaincodeStubInterface, did string, identity *Identity, args interface{}) (string, error) { - log.Infof("[%s][verifyIdentity]Verifying identity", IDGATEWAY) - idVerReq := make(map[string]interface{}) - idVerReq = args.(map[string]interface{}) + log.Infof("[%s][%s][verifyIdentity]Verifying identity", CHANNEL_ENV, IDGATEWAY) + idReq := make(map[string]interface{}) + idReq = args.(map[string]interface{}) - log.Infof("[%s][verifyIdentity] Idenitity has access %v", IDGATEWAY, identity.Access) + log.Infof("[%s][%s][verifyIdentity] Idenitity has access %v", CHANNEL_ENV, IDGATEWAY, identity.Access) if identity.Access != 4 { - log.Errorf("[%s][verifyIdentity] Identity has not access to verify", IDGATEWAY) - return "", errors.New("Verification unauthorized, the did provided has not access") + log.Errorf("[%s][%s][verifyIdentity] Error verification unauthorized, the did provided has not access", CHANNEL_ENV, IDGATEWAY) + return "", errors.New(ERRORVerID) + } + + if idReq["did"] == nil { + log.Errorf("[%s][%s][verifyIdentity] Error verifying signature: %v", CHANNEL_ENV, IDGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") } - _, err := cc.updateIDRegistry(stub, idVerReq["did"].(string), did, 1) + _, err := cc.updateIDRegistry(stub, idReq["did"].(string), did, 1) if err != nil { - log.Errorf("[%s][verifyIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) - return "", err + log.Errorf("[%s][%s][verifyIdentity] Error verifying signature: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) + return "", errors.New(ERRORVerSign) } - log.Infof("[%s][verifyIdentity]Idenitity updated", IDGATEWAY) + log.Infof("[%s][%s][verifyIdentity]Idenitity updated", CHANNEL_ENV, IDGATEWAY) return "The Identity has been verified", nil } func (cc *Chaincode) revokeIdentity(stub shim.ChaincodeStubInterface, did string, identity *Identity, args interface{}) (string, error) { - log.Infof("[%s][revokeIdentity]Verifying identity", IDGATEWAY) + log.Infof("[%s][%s][revokeIdentity]Verifying identity", CHANNEL_ENV, IDGATEWAY) var err error idReq := make(map[string]interface{}) idReq = args.(map[string]interface{}) if identity.Access != 4 { - log.Errorf("[%s][revokeIdentity] Identity has not access to revoke", IDGATEWAY) - return "", errors.New("Identity has not access to revoke") + log.Errorf("[%s][%s][revokeIdentity]Error revocation unauthorized, the did provided has not access", CHANNEL_ENV, IDGATEWAY) + return "", errors.New(ERRORRevID) + } + + if idReq["did"] == nil { + log.Errorf("[%s][%s][revokeIdentity] Error revoking signature: %v", CHANNEL_ENV, IDGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") } _, err = cc.revokeIDRegistry(stub, idReq["did"].(string), did) if err != nil { - log.Errorf("[%s][revokeIdentity] Error revoking signature: %v", IDGATEWAY, err.Error()) - return "", err + log.Errorf("[%s][%s][revokeIdentity] Error revoking signature: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) + return "", errors.New(ERRORRevSign) } - log.Infof("[%s][revokeIdentity]Idenitity revoked", IDGATEWAY) + log.Infof("[%s][%s][revokeIdentity]Idenitity revoked", CHANNEL_ENV, IDGATEWAY) return "Identity revoked successfully", nil diff --git a/fabric-chaincode/id.registry.go b/fabric-chaincode/id.registry.go index 46ff9b25..9443f94b 100644 --- a/fabric-chaincode/id.registry.go +++ b/fabric-chaincode/id.registry.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" "errors" "fmt" @@ -19,50 +19,50 @@ import ( var ccErrorCode = "CC-01" func (cc *Chaincode) createIDRegistry(stub shim.ChaincodeStubInterface, did string, identity Identity) (string, error) { - log.Infof("[%s][createIDRegistry] Create Identity for did %s", IDREGISTRY, did) + log.Infof("[%s][%s][createIDRegistry] Create Identity for did %s", CHANNEL_ENV, IDREGISTRY, did) bytes, err := stub.GetState(did) if bytes != nil { - log.Errorf("[%s][createIDRegistry] The identity already exists", IDREGISTRY) - log.Errorf("[%s][createIDRegistry] Return error", IDREGISTRY) - return "", errors.New("Error creating ID in registry. The identity already exists") + log.Errorf("[%s][%s][createIDRegistry] The identity already exists", CHANNEL_ENV, IDREGISTRY) + log.Errorf("[%s][%s][createIDRegistry] Return error", CHANNEL_ENV, IDREGISTRY) + return "", errors.New(ERRORIDExists) } idBytes, err := json.Marshal(identity) if err != nil { - log.Errorf("[%s][createIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error parsing identity:" + err.Error()) + log.Errorf("[%s][%s][createIDRegistry] Error parsing: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORParsingID + err.Error()) } err = stub.PutState(did, idBytes) if err != nil { - log.Errorf("[%s][createIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error storing identity:" + err.Error()) + log.Errorf("[%s][%s][createIDRegistry] Error storing: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORStoringIdentity + err.Error()) } - log.Infof("[%s][createIDRegistry] Indentity stored for did %s", IDREGISTRY, did) + log.Infof("[%s][%s][createIDRegistry] Indentity stored for did %s", CHANNEL_ENV, IDREGISTRY, did) return "", nil } func (cc *Chaincode) getIDRegistry(stub shim.ChaincodeStubInterface, did string) (*Identity, error) { - log.Infof("[%s][getIDRegistry] Get Identity for did %s", IDREGISTRY, did) + log.Infof("[%s][%s][getIDRegistry] Get Identity for did %s", CHANNEL_ENV, IDREGISTRY, did) idStored := Identity{} idBytes, err := stub.GetState(did) if err != nil { - log.Errorf("[%s][getIDRegistry] Error getting identity: %v", IDREGISTRY, err.Error()) - return nil, errors.New("Error getting identity:" + err.Error()) + log.Errorf("[%s][%s][getIDRegistry] Error getting identity: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return nil, errors.New(ERRORGetID + err.Error()) } if idBytes == nil { - log.Errorf("[%s][getIDRegistry] The identity doesn't exist", IDREGISTRY) - log.Errorf("[%s][getIDRegistry] Return error", IDREGISTRY) - return nil, errors.New("The identity doesn't exist") + log.Errorf("[%s][%s][getIDRegistry] Error the identity does not exist", CHANNEL_ENV, IDREGISTRY) + log.Errorf("[%s][%s][getIDRegistry] Return error", CHANNEL_ENV, IDREGISTRY) + return nil, errors.New(ERRORnotID) } err = json.Unmarshal(idBytes, &idStored) if err != nil { - log.Errorf("[%s][getIDRegistry] Error parsing identity: %v", IDREGISTRY, err.Error()) - return nil, errors.New("Error parsing" + err.Error()) + log.Errorf("[%s][%s][getIDRegistry] Error parsing identity: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return nil, errors.New(ERRORParsingID + err.Error()) } - log.Infof("[%s][getIDRegistry] Get PublicKey for did %s", IDREGISTRY, did) + log.Infof("[%s][%s][getIDRegistry] Get PublicKey for did %s", CHANNEL_ENV, IDREGISTRY, did) return &idStored, nil } @@ -71,47 +71,43 @@ func (cc *Chaincode) updateIDRegistry(stub shim.ChaincodeStubInterface, did stri var identity *Identity identity, err := cc.getIDRegistry(stub, did) if err != nil { - log.Errorf("[%s][updateIDRegistry] Problem getting identity: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error getting identity: " + err.Error()) + log.Errorf("[%s][%s][updateIDRegistry] Problem getting identity: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORGetID + err.Error()) } identity.Controller = didController identity.Access = access idBytes, err := json.Marshal(*identity) if err != nil { - log.Errorf("[%s][updateIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error parsing when update" + err.Error()) + log.Errorf("[%s][%s][updateIDRegistry] Error parsing: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORParsingID + err.Error()) } err = stub.PutState(did, idBytes) if err != nil { - log.Errorf("[%s][updateIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error updating in the ledger" + err.Error()) + log.Errorf("[%s][%s][updateIDRegistry] Error updating identity in ledger: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORUpdatingID + err.Error()) } - log.Infof("[%s][updateIDRegistry] Identity updated", IDREGISTRY) - + log.Infof("[%s][%s][updateIDRegistry] Identity updated", CHANNEL_ENV, IDREGISTRY) return "", nil } func (cc *Chaincode) revokeIDRegistry(stub shim.ChaincodeStubInterface, did string, didController string) (string, error) { identity, err := cc.getIDRegistry(stub, did) if err != nil { - log.Errorf("[%s][revokeIDRegistry] Problem checking identity: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error in revoke: " + err.Error()) + log.Errorf("[%s][%s][revokeIDRegistry] %s: %v", CHANNEL_ENV, IDREGISTRY, ERRORGetID, err.Error()) + return "", errors.New(ERRORGetID + err.Error()) } fmt.Printf(didController) if identity.Controller != didController { - err := errors.New("Unauthorized: The did provided has not access to revoke the identity") - log.Errorf("[%s][revokeIDRegistry] This is not the identity controller: %v", IDREGISTRY, err.Error()) - - return "", errors.New("Error revoking the did provided cannot revoke the identity") + log.Errorf("[%s][%s][revokeIDRegistry] Error revoking Unauthorized, the did provided cannot revoke the identity", CHANNEL_ENV, IDREGISTRY) + return "", errors.New(ERRORRevoke) } err = stub.DelState(did) if err != nil { - log.Errorf("[%s][revokeIDRegistry] Error parsing: %v", IDREGISTRY, err.Error()) - return "", errors.New("Error deleting from ledger" + err.Error()) + log.Errorf("[%s][%s][revokeIDRegistry] Error deleting from ledger: %v", CHANNEL_ENV, IDREGISTRY, err.Error()) + return "", errors.New(ERRORRevokeLedger + err.Error()) } - log.Infof("[%s][revokeIDRegistry] Identity revoked successfully", IDREGISTRY) - + log.Infof("[%s][%s][revokeIDRegistry] Identity revoked successfully", CHANNEL_ENV, IDREGISTRY) return "Identity revoked successfully", nil } diff --git a/fabric-chaincode/jose.utils.go b/fabric-chaincode/jose.utils.go index cdd7589c..305b2840 100644 --- a/fabric-chaincode/jose.utils.go +++ b/fabric-chaincode/jose.utils.go @@ -8,9 +8,11 @@ SPDX-License-Identifier: Apache-2.0 package main import ( + log "TrustID/fabric-chaincode/log" "crypto/x509" "encoding/base64" - "fmt" + "errors" + "strings" jose "gopkg.in/square/go-jose.v2" @@ -19,8 +21,8 @@ import ( func parseMessage(message string) (*jose.JSONWebSignature, error) { jwsSignature, err := jose.ParseSigned(message) if err != nil { - fmt.Println(err) - return nil, err + log.Infof("[%s][%s][parseMessage] Error parsing into JWS %s", CHANNEL_ENV, JoseUTIL, err.Error()) + return nil, errors.New(ERRORParseJWS) } return jwsSignature, nil } @@ -31,14 +33,15 @@ func parsePublicKeyX509(publicKey string) (interface{}, error) { d := make([]byte, base64.StdEncoding.DecodedLen(len(base64Data))) n, err := base64.StdEncoding.Decode(d, base64Data) if err != nil { - // Handle error + log.Infof("[%s][%s][parsePublicKeyX509] Error decoding into base64 %s", CHANNEL_ENV, JoseUTIL, err.Error()) + return nil, errors.New(ERRORBase64) } d = d[:n] publicKeyImported, err := x509.ParsePKIXPublicKey(d) if err != nil { - fmt.Println(err) - return nil, err + log.Infof("[%s][%s][parsePublicKeyX509] Error parsing into X509 %s", CHANNEL_ENV, JoseUTIL, err.Error()) + return nil, errors.New(ERRORParseX509) } return publicKeyImported, nil } @@ -46,14 +49,10 @@ func parsePublicKeyX509(publicKey string) (interface{}, error) { func parseKey(publicKey string) string { begin := "-----BEGIN PUBLIC KEY-----" - end := "-----END PRIVATE KEY-----" - //pk := strings.ReplaceAll(publicKey, "\n", "") - - r := strings.NewReplacer("\n", "") + end := "-----END PUBLIC KEY-----" // Replace all pairs. - pk := r.Replace(publicKey) - noBegin := strings.Split(pk, begin) + noBegin := strings.Split(publicKey, begin) parsed := strings.Split(noBegin[1], end) return parsed[0] } @@ -63,8 +62,8 @@ func verifySignature(message string, key string) ([]byte, error) { pbkey, err := parsePublicKeyX509(key) result, err := jose.JSONWebSignature.Verify(*msg, pbkey) if err != nil { - fmt.Printf("%v", err) - return nil, err + log.Infof("[%s][%s][verifySignature] Error verifying signature %s", CHANNEL_ENV, JoseUTIL, err.Error()) + return nil, errors.New(ERRORVerifying) } return result, nil diff --git a/fabric-chaincode/main.go b/fabric-chaincode/main.go index 0e5a5230..d6b72df2 100644 --- a/fabric-chaincode/main.go +++ b/fabric-chaincode/main.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" "github.com/hyperledger/fabric-chaincode-go/shim" @@ -21,21 +21,29 @@ type Chaincode struct { const logLevel string = "DEBUG" +// CHANNEL_ENV +var CHANNEL_ENV string + // Init is called when the chaincode is instantiated by the blockchain network. func (cc *Chaincode) Init(stub shim.ChaincodeStubInterface) sc.Response { log.Init("DEBUG") - log.Infof("[IdentityCC][Init] Initializing identity root") + CHANNEL_ENV = stub.GetChannelID() + + log.Infof("[%s][IdentityCC][Init] Initializing identity root", CHANNEL_ENV) idReq := IdentityRequest{} _, args := stub.GetFunctionAndParameters() err := json.Unmarshal([]byte(args[0]), &idReq) - if err != nil { - log.Errorf("[IdentityGateway][CreateIdentity] Error parsing: %v", err.Error()) + log.Errorf("[%s][IdentityGateway][CreateIdentity] Error parsing: %v", CHANNEL_ENV, err.Error()) } identityStore := Identity{PublicKey: idReq.PublicKey, Controller: idReq.Controller, Access: 4} _, err = cc.createIDRegistry(stub, idReq.Did, identityStore) - log.Infof("[IdentityCC][Init] Chaincode initialized") + if err != nil { + log.Errorf("[%s][IdentityGateway][CreateIdentity] Error parsing: %v", CHANNEL_ENV, err.Error()) + return shim.Error(err.Error()) + } + log.Infof("[%s][IdentityCC][Init] Chaincode initialized", CHANNEL_ENV) return shim.Success(nil) } @@ -46,13 +54,13 @@ func (cc *Chaincode) Invoke(stub shim.ChaincodeStubInterface) sc.Response { fcn, params := stub.GetFunctionAndParameters() var err error var result string - + CHANNEL_ENV = stub.GetChannelID() if fcn == "proxy" { result, err = cc.checkArgs(stub, params) } if err != nil { - log.Errorf("[IdentityCC][Init] Errror %v", err) + log.Errorf("[%s][IdentityCC][Init] Errror %v", CHANNEL_ENV, err) return shim.Error(err.Error()) } return shim.Success([]byte(result)) diff --git a/fabric-chaincode/model.go b/fabric-chaincode/model.go index 93c58243..fadd038d 100644 --- a/fabric-chaincode/model.go +++ b/fabric-chaincode/model.go @@ -84,17 +84,48 @@ type CcRequest struct { Did string `json:"did"` } +// Event to handle events in HF +type Event struct { + EventName string `json:"eventName"` // name for the event + Payload []byte `json:"payload"` // payload for the +} + // Error responses // ERROR_XXX occurs when XXX const ( - ERRORWrongNumberArgs = `Wrong number of arguments. Expecting a JSON with token information.` - ERRORParsingData = `Error parsing data ` - ERRORPutState = `Failed to store data in the ledger. ` - ERRORGetState = `Failed to get data from the ledger. ` - ERRORDelState = `Failed to delete data from the ledger. ` - ERRORChaincodeCall = `Error calling chaincode` - IDGATEWAY = `ID Gateway` - IDREGISTRY = `ID Registry` - ServiceGATEWAY = `ID Service Gateway` - ServiceREGISTRY = `ID Service Registry` + ERRORWrongNumberArgs = `Wrong number of arguments. Expecting a JSON with token information.` + ERRORParsingData = `Error parsing data ` + ERRORPutState = `Failed to store data in the ledger. ` + ERRORGetState = `Failed to get data from the ledger. ` + ERRORDelState = `Failed to delete data from the ledger. ` + ERRORChaincodeCall = `Error calling chaincode` + ERRORGetService = `Error getting service` + ERRORUpdService = `Error updating service` + ERRORServiceNotExists = `Error The service doesn't exist` + ERRORCreatingService = "Error storing service" + ERRORParsingService = `Error parsing service` + ERRORServiceExists = `The service already exists in registry` + ERRORDidMissing = `Error calling service, no service DID Specified` + ERRORStoringIdentity = `Error storing identity` + ERRORUpdatingID = `Error updating identity in ledger` + ERRORGetID = `Error getting identity` + ERRORVerID = `Error verification unauthorized, the did provided has not access` + ERRORRevID = `Error revocation unauthorized, the did provided has not access` + ERRORVerSign = `Error verifying signature` + ERRORRevSign = `Error revoking signature` + ERRORRevoke = `Error revoking Unauthorized, the did provided cannot revoke the identity` + ERRORnotID = `Error the identity does not exist` + ERRORParsingID = `Error parsing identity` + ERRORRevokeLedger = `Error deleting from ledger` + ERRORIDExists = `Error the identity already exists` + ERRORUserAccess = `Error user has not access` + ERRORParseJWS = `Error parsing into JWS` + ERRORParseX509 = `Error parsing into X509` + ERRORBase64 = `Error decoding into base64` + ERRORVerifying = `Error verifying signature ` + IDGATEWAY = `ID Gateway` + IDREGISTRY = `ID Registry` + ServiceGATEWAY = `ID Service Gateway` + ServiceREGISTRY = `ID Service Registry` + JoseUTIL = `JOSE Util` ) diff --git a/fabric-chaincode/proxy.gateway.go b/fabric-chaincode/proxy.gateway.go index 2d69e3ab..b53ff08c 100644 --- a/fabric-chaincode/proxy.gateway.go +++ b/fabric-chaincode/proxy.gateway.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" "errors" @@ -16,7 +16,7 @@ import ( ) func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) (string, error) { - log.Infof("[%s][checkArgs] Get Identity", IDGATEWAY) + log.Infof("[%s][%s][checkArgs] Get Identity", CHANNEL_ENV, IDGATEWAY) var result string idReq := Request{} @@ -24,9 +24,11 @@ func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) var identity *Identity var publicKey string + if idReq.PublicKey != "" { publicKey = parseKey(idReq.PublicKey) params, err := checkSignature(idReq.Payload, publicKey) + if params["function"].(string) == "createSelfIdentity" { result, err = cc.createSelfIdentity(stub, params["params"]) @@ -36,7 +38,7 @@ func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) } identity, err = cc.getIDRegistry(stub, idReq.Did) if err != nil { - log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) + log.Errorf("[%s][%s][checkArgs] Error verifying signature: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) return "", err } @@ -70,6 +72,10 @@ func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) if params["function"].(string) == "updateServiceAccess" { result, err = cc.updateServiceAccess(stub, idReq.Did, params["params"]) + } + if params["function"].(string) == "updateService" { + result, err = cc.updateService(stub, idReq.Did, params["params"]) + } if params["function"].(string) == "invoke" { result, err = cc.invoke(stub, idReq.Did, params["params"]) @@ -80,17 +86,19 @@ func (cc *Chaincode) checkArgs(stub shim.ChaincodeStubInterface, args []string) } func checkSignature(payload string, key string) (map[string]interface{}, error) { + log.Errorf("[%s][%s][checkSignature] Verifying signature", CHANNEL_ENV, IDGATEWAY) + message, err := verifySignature(payload, key) if err != nil { - log.Errorf("[%s][revokeIdentity] Error verifying signature: %v", IDGATEWAY, err.Error()) - return nil, errors.New("Error verifying signature" + err.Error()) + log.Errorf("[%s][%s][checkSignature] Error verifying signature: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) + return nil, errors.New(ERRORVerSign) } params := make(map[string]interface{}) err = json.Unmarshal(message, ¶ms) if err != nil { - log.Errorf("[%s][checkArgs] Error parsing: %v", IDGATEWAY, err.Error()) - return nil, errors.New("Error parsing signature") + log.Errorf("[%s][%s][checkSignature] Error parsing: %v", CHANNEL_ENV, IDGATEWAY, err.Error()) + return nil, errors.New(ERRORParsingData) } return params, nil } diff --git a/fabric-chaincode/service.gateway.go b/fabric-chaincode/service.gateway.go index f76a9d7b..d071f907 100644 --- a/fabric-chaincode/service.gateway.go +++ b/fabric-chaincode/service.gateway.go @@ -8,8 +8,9 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" + "errors" "github.com/hyperledger/fabric-chaincode-go/shim" ) @@ -19,31 +20,49 @@ func (cc *Chaincode) createServiceIdentity(stub shim.ChaincodeStubInterface, did service := make(map[string]interface{}) service = args.(map[string]interface{}) - log.Debugf("[%s][createServiceIdentity] Calling to registry", ServiceGATEWAY) - log.Debugf("[%s][createServiceIdentity] ****The service store is %v", ServiceGATEWAY, args) + log.Debugf("[%s][%s][createServiceIdentity] Calling to registry", CHANNEL_ENV, ServiceGATEWAY) + log.Debugf("[%s][%s][createServiceIdentity] ****The service store is %v", CHANNEL_ENV, ServiceGATEWAY, args) + + if service["name"] == nil { + log.Errorf("[%s][%s][getIdencreateServiceIdentitytity] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, "Name input param is undefined") + return "", errors.New("Name input param is undefined") + } + if service["channel"] == nil { + log.Errorf("[%s][%s][createServiceIdentity] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, "Channel input param is undefined") + return "", errors.New("Channel input param is undefined") + } + if service["did"] == nil { + log.Errorf("[%s][%s][createServiceIdentity] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } serviceStore := Service{Name: service["name"].(string), Controller: did, Channel: service["channel"].(string)} access := AccessPolicy{} - accessBt, _ := json.Marshal(service["access"]) + accessBt, _ := json.Marshal(service["accessPolicy"]) json.Unmarshal(accessBt, &access) serviceStore.updateAccess(access) res, err := cc.createServiceRegistry(stub, service["did"].(string), serviceStore) if err != nil { - log.Errorf("[%s][createServiceIdentity] Error creating service in registry: %v", ServiceGATEWAY, err.Error()) + log.Errorf("[%s][%s][createServiceIdentity] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, err.Error()) return "", err } - log.Infof("[%s][createServiceIdentity] Everything went ok", ServiceGATEWAY) + log.Infof("[%s][%s][createServiceIdentity] Everything went ok", CHANNEL_ENV, ServiceGATEWAY) return res, nil } func (cc *Chaincode) updateServiceAccess(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { - log.Infof("[%s][updateServiceAccess] Entry in updateServiceAccess", ServiceGATEWAY) + log.Infof("[%s][%s][updateServiceAccess] Entry in updateServiceAccess", CHANNEL_ENV, ServiceGATEWAY) service := make(map[string]interface{}) service = args.(map[string]interface{}) + if service["did"] == nil { + log.Errorf("[%s][%s][updateServiceAccess] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } + // m := make(map[string]interface{}) // parse access to interact access := AccessPolicy{} accessBt, _ := json.Marshal(service["access"]) @@ -52,32 +71,69 @@ func (cc *Chaincode) updateServiceAccess(stub shim.ChaincodeStubInterface, did s result, err := cc.updateRegistryAccess(stub, did, service["did"].(string), access) if err != nil { - log.Errorf("[%s][updateServiceAccess] Error updating registry access: %v", ServiceGATEWAY, err.Error()) - log.Errorf("[%s][updateServiceAccess] Return error", ServiceGATEWAY) + log.Errorf("[%s][%s][updateServiceAccess] Error updating registry access: %v", CHANNEL_ENV, ServiceGATEWAY, err.Error()) + log.Errorf("[%s][%s][updateServiceAccess] Return error", CHANNEL_ENV, ServiceGATEWAY) return "", err } - log.Infof("[%s][updateServiceAccess] Update registry Ok", ServiceGATEWAY) + log.Infof("[%s][%s][updateServiceAccess] Update registry Ok", CHANNEL_ENV, ServiceGATEWAY) + return result, nil + +} + +func (cc *Chaincode) updateService(stub shim.ChaincodeStubInterface, did string, args interface{}) (string, error) { + log.Infof("[%s][%s][updateService] Entry in updateService", CHANNEL_ENV, ServiceGATEWAY) + + service := make(map[string]interface{}) + service = args.(map[string]interface{}) + + if service["did"] == nil { + log.Errorf("[%s][%s][updateService] Error updating service : %v", CHANNEL_ENV, ServiceGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } + + // m := make(map[string]interface{}) // parse access to interact + channel := "" + name := "" + if service["channel"] != nil { + channel = service["channel"].(string) + } + if service["name"] != nil { + name = service["name"].(string) + } + + result, err := cc.updateRegistry(stub, did, service["did"].(string), name, channel) + if err != nil { + log.Errorf("[%s][%s][updateService] Error updating registry access: %v", CHANNEL_ENV, ServiceGATEWAY, err.Error()) + log.Errorf("[%s][%s][updateService] Return error", CHANNEL_ENV, ServiceGATEWAY) + return "", err + } + log.Infof("[%s][%s][updateService] Update registry Ok", CHANNEL_ENV, ServiceGATEWAY) return result, nil } func (cc *Chaincode) getServiceIdentity(stub shim.ChaincodeStubInterface, args interface{}) (string, error) { var err error - servReq := make(map[string]interface{}) - servReq = args.(map[string]interface{}) + service := make(map[string]interface{}) + service = args.(map[string]interface{}) + + if service["did"] == nil { + log.Errorf("[%s][%s][getServiceIdentity] Error creating service in registry: %v", CHANNEL_ENV, ServiceGATEWAY, "DID input param is undefined") + return "", errors.New("DID input param is undefined") + } - result, err := cc.getServiceRegistry(stub, servReq["did"].(string)) + result, err := cc.getServiceRegistry(stub, service["did"].(string)) if err != nil { - log.Errorf("[%s][getServiceIdentity] Error getting registry access: %v", ServiceGATEWAY, err.Error()) - log.Errorf("[%s][getServiceIdentity] Return error", ServiceGATEWAY) + log.Errorf("[%s][%s][getServiceIdentity] Error getting registry access: %v", CHANNEL_ENV, ServiceGATEWAY, err.Error()) + log.Errorf("[%s][%s][getServiceIdentity] Return error", CHANNEL_ENV, ServiceGATEWAY) return "", err } - log.Infof("[%s][getServiceIdentity]Service to return Name: %s, Controller: %s, Access: %v", ServiceGATEWAY, result.Name, result.Controller, result.Access) + log.Infof("[%s][%s][getServiceIdentity]Service to return Name: %s, Controller: %s, Access: %v", CHANNEL_ENV, ServiceGATEWAY, result.Name, result.Controller, result.Access) serviceBytes, err := json.Marshal(*result) return string(serviceBytes), nil diff --git a/fabric-chaincode/service.registry.go b/fabric-chaincode/service.registry.go index 4164b683..b864b0b6 100644 --- a/fabric-chaincode/service.registry.go +++ b/fabric-chaincode/service.registry.go @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 package main import ( - log "coren-identitycc/src/chaincode/log" + log "TrustID/fabric-chaincode/log" "encoding/json" "errors" @@ -16,55 +16,55 @@ import ( ) func (cc *Chaincode) createServiceRegistry(stub shim.ChaincodeStubInterface, did string, service Service) (string, error) { - log.Infof("[%s][createIDRegistry] Create Service for did %s", ServiceREGISTRY, did) + log.Infof("[%s][%s][createIDRegistry] Create Service for did %s", CHANNEL_ENV, ServiceREGISTRY, did) bytes, err := stub.GetState(did) if bytes != nil { - log.Errorf("[%s][createServiceRegistry] The service already exists", ServiceREGISTRY) - return "", errors.New("The service already exists in registry") + log.Errorf("[%s][%s][createServiceRegistry] The service already exists in registry", CHANNEL_ENV, ServiceREGISTRY) + return "", errors.New(ERRORServiceExists) } idBytes, err := json.Marshal(service) if err != nil { - log.Errorf("[%s][createIDRegistry] Error parsing: %v", ServiceREGISTRY, err.Error()) - return "", errors.New("Error parsing when create ID Registry:" + err.Error()) + log.Errorf("[%s][%s][createIDRegistry] Error parsing: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORParsingService + err.Error()) } err = stub.PutState(did, idBytes) if err != nil { - log.Errorf("[%s][createIDRegistry] Error parsing: %v", ServiceREGISTRY, err.Error()) - return "", errors.New("Error storing in create ID Registry:" + err.Error()) + log.Errorf("[%s][%s][createIDRegistry] Error creating service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORCreatingService + err.Error()) } - log.Infof("[%s][createIDRegistry] Service created", ServiceREGISTRY) + log.Infof("[%s][%s][createIDRegistry] Service created", CHANNEL_ENV, ServiceREGISTRY) return "Service created successfully", nil } func (cc *Chaincode) getServiceRegistry(stub shim.ChaincodeStubInterface, didService string) (*Service, error) { - log.Infof("[%s][getIDRegistry] Get Service for did %s", ServiceREGISTRY, didService) + log.Infof("[%s][%s][getIDRegistry] Get Service for did %s", CHANNEL_ENV, ServiceREGISTRY, didService) idStored := Service{} idBytes, err := stub.GetState(didService) if len(idBytes) == 0 { - log.Errorf("[%s][getIDRegistry] The service doesn't exist", ServiceREGISTRY) - return nil, errors.New("The service doesn't exist") + log.Errorf("[%s][%s][getIDRegistry] The service doesn't exist", CHANNEL_ENV, ServiceREGISTRY) + return nil, errors.New(ERRORServiceNotExists) } if err != nil { - log.Errorf("[%s][getIDRegistry] Error getting service: %v", ServiceREGISTRY, err.Error()) - return nil, errors.New("Error getting service:" + err.Error()) + log.Errorf("[%s][%s][getIDRegistry] Error getting service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return nil, errors.New(ERRORGetService + err.Error()) } err = json.Unmarshal(idBytes, &idStored) - log.Infof("[%s][getIDRegistry] The service info is %v", ServiceREGISTRY, idStored) + log.Infof("[%s][%s][getIDRegistry] The service info is %v", CHANNEL_ENV, ServiceREGISTRY, idStored) return &idStored, nil } // func (cc *Chaincode) getServiceRegistryNameAndAcess(stub shim.ChaincodeStubInterface, did string, didService string) (string, int, error) { -// log.Infof("[%s][getServiceRegistryAcess] Get Service for did %s", ServiceREGISTRY, did) +// log.Infof("[%s][%s][getServiceRegistryAcess] Get Service for did %s", ServiceREGISTRY, did) // service, err := cc.getServiceRegistry(stub, didService) // if err != nil { -// log.Errorf("[%s][getServiceRegistryAcess] Error getting service: %v", ServiceREGISTRY, err.Error()) +// log.Errorf("[%s][%s][getServiceRegistryAcess] Error getting service: %v", ServiceREGISTRY, err.Error()) // return "", 0, errors.New("Error getting service" + err.Error()) // } @@ -74,15 +74,15 @@ func (cc *Chaincode) getServiceRegistry(stub shim.ChaincodeStubInterface, didSer func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didController string, didService string, accessPolicy AccessPolicy) (string, error) { - log.Infof("[%s][updateRegistryAccess] Get Service for did %s", ServiceREGISTRY, didService) + log.Infof("[%s][%s][updateRegistryAccess] Get Service for did %s", CHANNEL_ENV, ServiceREGISTRY, didService) service, err := cc.getServiceRegistry(stub, didService) if err != nil { - log.Errorf("[%s][updateRegistryAccess] Error getting service: %v", ServiceREGISTRY, err.Error()) - return "", errors.New("Error getting service in update" + err.Error()) + log.Errorf("[%s][%s][updateRegistryAccess] Error getting service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORGetService + err.Error()) } if didController != service.Controller { - log.Errorf("[%s][updateRegistryAccess] User has not access to update Registry") - return "", errors.New("User has not access to update de service") + log.Errorf("[%s][%s][updateRegistryAccess] User has not access to update Registry", CHANNEL_ENV, ServiceREGISTRY) + return "", errors.New(ERRORUserAccess) } // service.Access[didAccess] = accessType @@ -90,19 +90,51 @@ func (cc *Chaincode) updateRegistryAccess(stub shim.ChaincodeStubInterface, didC idBytes, err := json.Marshal(service) if err != nil { - log.Errorf("[%s][updateRegistryAccess] Error parsing: %v", ServiceREGISTRY, err.Error()) - return "", errors.New("Error parsing" + err.Error()) + log.Errorf("[%s][%s][updateRegistryAccess] Error parsing: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORParsingData + err.Error()) } err = stub.PutState(didService, idBytes) if err != nil { - log.Errorf("[%s][updateRegistryAccess] Error updating service: %v", ServiceREGISTRY, err.Error()) - return "", errors.New("Error updating service" + err.Error()) + log.Errorf("[%s][%s][updateRegistryAccess] Error updating service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORUpdService + err.Error()) } return "Registry updated sucessfully", nil } -func (s *Service) updateAccess(newAccess AccessPolicy) { +func (cc *Chaincode) updateRegistry(stub shim.ChaincodeStubInterface, didController string, didService string, name string, channel string) (string, error) { + + log.Infof("[%s][%s][updateRegistry] Get Service for did %s", CHANNEL_ENV, ServiceREGISTRY, didService) + service, err := cc.getServiceRegistry(stub, didService) + if err != nil { + log.Errorf("[%s][%s][updateRegistry] Error getting service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORGetService + err.Error()) + } + if didController != service.Controller { + log.Errorf("[%s][%s][updateRegistry] User has not access to update Registry", CHANNEL_ENV, ServiceREGISTRY) + return "", errors.New(ERRORUserAccess) + } + + if name != "" { + service.Name = name + } + if channel != "" { + service.Channel = channel + } + idBytes, err := json.Marshal(service) + if err != nil { + log.Errorf("[%s][%s][updateRegistryAccess] Error parsing: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORParsingData + err.Error()) + } + err = stub.PutState(didService, idBytes) + if err != nil { + log.Errorf("[%s][%s][updateRegistryAccess] Error updating service: %v", CHANNEL_ENV, ServiceREGISTRY, err.Error()) + return "", errors.New(ERRORUpdService + err.Error()) + } + return "Registry updated sucessfully", nil +} + +func (s *Service) updateAccess(newAccess AccessPolicy) { if newAccess.Policy == "" { s.Access = AccessPolicy{Policy: PublicPolicy} return diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md index 831fb8f2..28de218d 100644 --- a/trustid-sdk/README.md +++ b/trustid-sdk/README.md @@ -128,7 +128,8 @@ networks. * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. * `createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise`: Creates a new service in the TrustID network. - * `updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the information from a service. + * `updateService(did: DID, serviceDID: string, name: string, channel: string): Promise`: Updates the information from a service. + * `updateServiceAccess(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the access from a service. * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network diff --git a/trustid-sdk/connection-profile.json b/trustid-sdk/connection-profile.json deleted file mode 100644 index c5df0927..00000000 --- a/trustid-sdk/connection-profile.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "version": "1.0.0", - "client": { - "organization": "org1", - "logging": { - "level": "debug" - }, - "peer": { - "timeout": { - "connection": "15s", - "response": "180s", - "discovery": { - "greylistExpiry": "10s" - } - } - }, - "orderer": { - "timeout": { - "connection": "15s", - "response": "15s" - } - }, - "global": { - "timeout": { - "query": "180s", - "execute": "180s", - "resmgmt": "180s" - }, - "cache": { - "connectionIdle": "30s", - "eventServiceIdle": "2m", - "channelConfig": "30m", - "channelMembership": "30s", - "discovery": "10s", - "selection": "10m" - } - }, - "cryptoconfig": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config" - }, - "credentialStore": { - "path": "/Users/mtng/go1.10/credentialstore", - "cryptoStore": { - "path": "/Users/mtng/go1.10/credentialstore" - } - }, - "BCCSP": { - "security": { - "enabled": true, - "default": { - "provider": "SW" - }, - "hashAlgorithm": "SHA2", - "softVerify": true, - "level": 256 - } - }, - "tlsCerts": { - "systemCertPool": true, - "client": { - "key": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/tls/client.key" - }, - "cert": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/tls/client.crt" - } - } - } - }, - "channels": { - "telefonicachannel": { - "peers": { - "peer0.org1.telefonica.com": { - "endorsingPeer": true, - "chaincodeQuery": true, - "ledgerQuery": true, - "eventSource": true - } - - }, - "orderers": [ - "orderer0.telefonica.com" - ], - "policies": { - "queryChannelConfig": { - "minResponses": 1, - "maxTargets": 1, - "retryOpts": { - "attempts": 5, - "initialBackoff": "500ms", - "maxBackoff": "5s", - "backoffFactor": 2.0 - } - } - } - }, - "channel2": { - "peers": { - "peer0.org1.telefonica.com": { - "endorsingPeer": true, - "chaincodeQuery": true, - "ledgerQuery": true, - "eventSource": true - } - - }, - "orderers": [ - "orderer0.telefonica.com" - ], - - "policies": { - "queryChannelConfig": { - "minResponses": 1, - "maxTargets": 1, - "retryOpts": { - "attempts": 5, - "initialBackoff": "500ms", - "maxBackoff": "5s", - "backoffFactor": 2.0 - } - } - } - } - }, - "organizations": { - "org1": { - "mspid": "org1MSP", - "cryptoPath": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/users/Admin@org1.telefonica.com/msp", - "peers": [ - "peer0.org1.telefonica.com" - ], - "certificateAuthorities": [ - "ca.org1.telefonica.com" - ] - }, - "ordererorg": { - "mspID": "OrdererMSP", - "cryptoPath": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/msp" - } - }, - "orderers": { - "orderer0.telefonica.com": { - "url": "grpcs://localhost:7050", - "grpcOptions": { - "ssl-target-name-override": "orderer0.telefonica.com" - }, - "tlsCACerts": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" - } - }, - "orderer1.telefonica.com": { - "url": "grpcs://localhost:8050", - "grpcOptions": { - "ssl-target-name-override": "orderer1.telefonica.com" - }, - "tlsCACerts": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" - } - }, - "orderer2.telefonica.com": { - "url": "grpcs://localhost:9050", - "grpcOptions": { - "ssl-target-name-override": "orderer2.telefonica.com" - }, - "tlsCACerts": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/ordererOrganizations/telefonica.com/orderers/orderer0.telefonica.com/msp/tlscacerts/tlsca.telefonica.com-cert.pem" - } - } - }, - - - "peers": { - "peer0.org1.telefonica.com": { - "url": "grpcs://localhost:7051", - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.telefonica.com" - }, - "tlsCACerts": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/peers/peer0.org1.telefonica.com/tls/ca.crt" - } - } - }, - - "certificateAuthorities": { - "ca.org1.telefonica.com": { - "url": "https://ca.org1.telefonica.com:7054", - "tlsCACerts": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/crypto-config/peerOrganizations/org1.telefonica.com/ca/ca.org1.telefonica.com-cert.pem", - "client": { - "key": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/sdk-keys/MyKey.key" - }, - "cert": { - "path": "/Users/mtng/go1.10/src/github.com/coren-hf-dev/hyperledgerfabrictestnet/sdk-keys/MyCertificate.crt" - } - } - }, - "registrar": { - "enrollId": "adminCA", - "enrollSecret": "adminpw" - }, - "caName": "ca.org1.telefonica.com" - } - } -} \ No newline at end of file diff --git a/trustid-sdk/examples/getting-started.ts b/trustid-sdk/examples/getting-started.ts index 63a48539..9ebd5666 100644 --- a/trustid-sdk/examples/getting-started.ts +++ b/trustid-sdk/examples/getting-started.ts @@ -1,3 +1,4 @@ +import { exit } from "process"; // Load SDK library. const sdk = require("../dist/index.js"); @@ -11,10 +12,10 @@ console.log(wal) const ks = new sdk.FileKeystore("file", "./keystore"); wal.setKeystore(ks) -const ccp = JSON.parse(fs.readFileSync("./ccp-cloud.json", 'utf8')); +const ccp = JSON.parse(fs.readFileSync("../connection-profile.json", 'utf8')); const config = { stateStore: '/tmp/statestore', - caURL: 'https://telefonicaca:7054', + caURL: 'https://ca.org1.telefonica.com:7054', caName: 'telefonicaca', caAdmin: 'adminCA', caPassword: 'adminpw', @@ -26,7 +27,7 @@ const config = { walletID: 'admin', asLocalhost: false, ccp: ccp, - chaincodeName: "trustidcc", + chaincodeName: "identitycc", fcn: "proxy", channel: "channel1" } @@ -60,15 +61,15 @@ async function createDID(){ async function serviceInteraction(){ const did = await wal.getDID("default") // Get service - let res = await wal.networks.hf.getService(did, "coren-trackscc-v2") + let res = await wal.networks.hf.getService(did, "coren-trackscc") console.log("[*] Service info:\n", res) // Create an asset in the service const asset = {assetId: "test"+Date.now(), data:{"a":1, "b":2}, metadata: {"c": 4}} const assetStr = JSON.stringify(asset) - res = await wal.networks.hf.invoke(did, "coren-trackscc-v2",["createAsset", assetStr], "channel1") + res = await wal.networks.hf.invoke(did, "coren-trackscc",["createAsset", assetStr], "channel1") console.log("[*] Asset creation:\n", res) // Get the created asset. - res = await wal.networks.hf.invoke(did, "coren-trackscc-v2",["getAsset", JSON.stringify({assetId: asset.assetId})], "channel1") + res = await wal.networks.hf.invoke(did, "coren-trackscc",["getAsset", JSON.stringify({assetId: asset.assetId})], "channel1") console.log("[*] Asset registered\n", res) } @@ -81,9 +82,9 @@ async function walletInteraction(){ console.log("[*] DID signature\n", sign) let verify = await did.verify(sign, did) console.log("[*] Signature verification\n", verify) - const did2 = await wal.generateDID("RSA", "test", "test") - verify = await did.verify(sign, did2) - console.log("[*] Signature wrong verification\n", verify) + // const did2 = await wal.generateDID("RSA", "test", "test") + // verify = await did.verify(sign, did2) + // console.log("[*] Signature wrong verification\n", verify) } // Main async function. @@ -91,8 +92,9 @@ async function main() { await configureNetwork() await createDID() await serviceInteraction() - await walletInteraction() + // await walletInteraction() + exit(1); } -main().then(console.log).catch(console.log) +main().then(() =>{} ).catch(console.log) // tsc getting-started.ts && node getting-started.js diff --git a/trustid-sdk/index-light.ts b/trustid-sdk/index-light.ts deleted file mode 100755 index 75aa23a5..00000000 --- a/trustid-sdk/index-light.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -import {Wallet, DID} from "./src/wallet"; -import {LocalStorageKeystore} from "./src/keystore/localStorageKeystore"; - -export {Wallet, DID, LocalStorageKeystore}; diff --git a/trustid-sdk/index.ts b/trustid-sdk/index.ts index 96722b40..7a938703 100755 --- a/trustid-sdk/index.ts +++ b/trustid-sdk/index.ts @@ -6,12 +6,13 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {Wallet, DID} from "./src/wallet"; -import {FileKeystore} from "./src/keystore/fileKeystore"; -import {MongoKeystore} from "./src/keystore/mongoKeystore"; -import {LocalStorageKeystore} from "./src/keystore/localStorageKeystore"; -import {TrustIdHf} from "./src/network/trustHF" -import {AccessPolicy, PolicyType} from "./src/network/trustInterface"; +import {Wallet} from "./src/wallet"; +import {DID} from "./src/core/did" +import {FileKeystore} from "./src/keystores/fileKeystore"; +import {MongoKeystore} from "./src/keystores/mongoKeystore"; +import {LocalStorageKeystore} from "./src/keystores/localStorageKeystore"; +import {TrustIdHf} from "./src/core/trustidHF" +import {AccessPolicy, PolicyType} from "./src/core/trustid"; export {Wallet, DID, FileKeystore, MongoKeystore, diff --git a/trustid-sdk/keystore b/trustid-sdk/keystore deleted file mode 100644 index 9e26dfee..00000000 --- a/trustid-sdk/keystore +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/trustid-sdk/main.js b/trustid-sdk/main.js deleted file mode 100644 index ec579420..00000000 --- a/trustid-sdk/main.js +++ /dev/null @@ -1,48 +0,0 @@ -var id = require("./dist/index.js") -var fs = require("fs") -var wal = id.Wallet.Instance; -var ks = new id.FileKeystore("file", "./keystore"); -wal.setKeystore(ks) -wal.generateDID("RSA").then(result => {}) -var ccp = JSON.parse(fs.readFileSync("./ccp-dev-dsn.json", 'utf8')); - -var config = { - stateStore: '/tmp/cloud', - caName: 'telefonicaca', - mspId: 'telefonicaMSP', - caURL: "hola", - walletID: 'adminUser', - asLocalhost: false, - ccp: ccp, - chaincodeName: "identitycc", - fcn: "proxy", - channel: "channel1" -} - - - -var trustID = new id.TrustIdHf(config); - -wal.addNetwork("hf", trustID); -wal.networks["hf"].configureDriver().then(() => { - - // Use the wallet and the driver - wal.generateDID("RSA", "test", "test").then(did => { - let access = { policy: id.PolicyType.PublicPolicy }; - did.unlockAccount("test").then(() => { - wal.networks.hf.createSelfIdentity(did).then(res => { - // wal.networks.hf.createService(did, "did:vtn:corentrack2", config.chaincodeName, access, config.channel).then(() => { - wal.networks.hf.subscribeEventService(did, "coren-trackscc", "track-event").then(listener => { - console.log("Listening to events...") - listener.on("track-event", - (returnedEvent) => { - console.log(returnedEvent) - }) - }) - - }); - //}) - - }) - }) -}) \ No newline at end of file diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index df046e07..493e8829 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -500,17 +500,17 @@ "dev": true }, "bson": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.4.tgz", - "integrity": "sha512-S/yKGU1syOMzO86+dGpg2qGoDL0zvzcb262G+gqEy6TgP6rt6z6qxSFX/8X6vLC91P7G7C3nLs0+bvDzmvBA3Q==" + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", + "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" }, "buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-from": { @@ -1236,9 +1236,9 @@ } }, "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "inflight": { "version": "1.0.6", @@ -1499,9 +1499,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" }, "lodash.camelcase": { "version": "4.3.0", @@ -1747,11 +1747,11 @@ } }, "mongodb": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.5.9.tgz", - "integrity": "sha512-vXHBY1CsGYcEPoVWhwgxIBeWqP3dSu9RuRDsoLRPTITrcrgm1f0Ubu1xqF9ozMwv53agmEiZm0YGo+7WL3Nbug==", + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", + "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", "requires": { - "bl": "^2.2.0", + "bl": "^2.2.1", "bson": "^1.1.4", "denque": "^1.4.1", "require_optional": "^1.0.1", @@ -1760,19 +1760,19 @@ } }, "mongoose": { - "version": "5.9.20", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.9.20.tgz", - "integrity": "sha512-vRP6Csu2obzSl3ed7kTQMrolBNgweiRJ/eBU1PSe/rJfjqWS1oqDE2D1ZPGxkVOsKXs7Gyd84GAXerj8IB2UWg==", + "version": "5.10.13", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.10.13.tgz", + "integrity": "sha512-lvZzTj449sVWijY76StOuTKt5oP5kyy70VdM3DMgPpKNqZfkAseHxekmqBbd9YQQDVIgrIYDar9vSlxKqc75MQ==", "requires": { "bson": "^1.1.4", "kareem": "2.3.1", - "mongodb": "3.5.9", + "mongodb": "3.6.3", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.7.0", "mquery": "3.2.2", "ms": "2.1.2", "regexp-clone": "1.0.0", - "safe-buffer": "5.1.2", + "safe-buffer": "5.2.1", "sift": "7.0.1", "sliced": "1.0.1" }, @@ -1781,11 +1781,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } }, @@ -1927,13 +1922,8 @@ } } }, - "node-forge": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.8.5.tgz", - "integrity": "sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q==" - }, "node-jose": { - "version": "git+https://github.com/cisco/node-jose.git#85610d6fdf411c72f58d15197e6f935e0b20a695", + "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", "from": "git+https://github.com/cisco/node-jose.git", "requires": { "base64url": "^3.0.1", @@ -1941,10 +1931,17 @@ "es6-promise": "^4.2.8", "lodash": "^4.17.15", "long": "^4.0.0", - "node-forge": "^0.8.5", + "node-forge": "^0.10.0", "pako": "^1.0.11", "process": "^0.11.10", "uuid": "^3.3.3" + }, + "dependencies": { + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + } } }, "normalize-path": { diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json index 7e5889d7..2d696d39 100755 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -30,7 +30,7 @@ "crypto-js": "^4.0.0", "fs": "0.0.1-security", "jose": "^1.22.1", - "mongoose": "^5.9.10", + "mongoose": "^5.10.13", "node": "^13.12.0", "node-jose": "git+https://github.com/cisco/node-jose.git", "optional": "^0.1.4", diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts new file mode 100644 index 00000000..29820c06 --- /dev/null +++ b/trustid-sdk/src/core/did.ts @@ -0,0 +1,172 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import {JWK, JWS} from "node-jose"; +import crypto from "crypto-js"; +import { Console } from "console"; + + + +export class DID { + public id: string; + public pubkey: string; + public type: string; + public controller: string; + public access: number; + private privkey: string; + private unlockedKey: any; + public unlockTimestamp: any; + public tempPrivKey: string; + public networkID: string; + + // TODO: Default parameters for now: + // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. + readonly ALGO_TYPES = ["RSA", "EC", "oct"]; + + public constructor(type: any = "RSA", controller: string = "default") { + // If type not supported throw error. + if (!Object.values(this.ALGO_TYPES).includes(type)) { + throw new Error("Key algorithm not supported"); + } + + this.id = ""; + this.type = type; + this.controller = controller; + this.access = 0; + this.privkey = ""; + this.tempPrivKey = ""; + this.pubkey = ""; + this.unlockedKey = null; + this.unlockTimestamp = 0; + this.networkID = ""; + } + + // TODO: Can we do this more efficiently? + private async keyGeneration(): Promise { + switch (this.type) { + case "RSA": + return JWK.createKey("RSA", 2048, {alg: ""}); + case "EC": + return JWK.createKey("EC", "P-521", {alg: ""}); + case "oct": + return JWK.createKey("oct", 256, {alg: ""}); + default: + throw new Error("Key algorithm not supported"); + } + } + + public async createKey(passphrase: string = "") { + // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { + let key = await this.keyGeneration(); + let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); + this.id = `did:vtn:trustid:${addr}`; + this.pubkey = key.toPEM(); + let pk = key.toPEM(true); + this.privkey = crypto.AES.encrypt(pk, passphrase).toString(); + } + } + + public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + if (tempPassphrase != "") { + this.tempPrivKey = crypto.AES.encrypt(this.unlockedKey.toPEM(true), tempPassphrase).toString(); + } + return this + } catch { + throw new Error("Private key couldn't be deciphered"); + } + } + public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase); + const parsed = pem.toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(parsed, "pem"); + return + } catch (err){ + throw err; + } + } + + public lockAccount(): any { + this.unlockedKey = undefined; + } + + public loadFromObject(obj: any): void { + let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp, networkID } = obj; + this.id = id; + this.type = type; + this.controller = controller; + this.access = access; + this.pubkey = pubkey; + this.privkey = privkey; + this.tempPrivKey = tempPrivKey; + this.unlockTimestamp = unlockTimestamp; + this.networkID = networkID; + } + + public exportDID(withPrivate: boolean) { + const privkey = withPrivate ? this.privkey : ""; + return { + id: this.id, + type: this.type, + pubkey: this.pubkey, + privkey: privkey, + controller: this.controller, + }; + } + + public importDID(obj: any) { + const fieldsMandatory = ["pubkey", "privkey"] + if(obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')){ + const did = new DID(); + did.loadFromObject(obj); + let addr = crypto.SHA256(obj.pubkey.toString(crypto.enc.Hex)); + this.id = `did:vtn:trustid:${addr}`; + + } + else{ + throw new Error("Field pubkey or privkey is missing"); + } + + } + + /** sign Generates a JWS from a payload using an id from the wallet */ + public async sign(payload: object): Promise { + try{ + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + var buf = Buffer.from(JSON.stringify(payload)); + let sign = await JWS.createSign( + { + fields: {cty: "jwk+json"}, + format: "compact", + }, + this.unlockedKey + ) + .update(buf) + .final(); + + return sign.toString(); + } + catch(err) { + throw err; + } + } + + /** verify Verifies a JWS from a payload using a did */ + public async verify(signature: string, did: DID): Promise { + let pk = await JWK.asKey(did.pubkey, "pem"); + let verify = await JWS.createVerify(pk).verify(signature); + return JSON.parse(verify.payload.toString()); + } +} \ No newline at end of file diff --git a/trustid-sdk/src/network/trustInterface.ts b/trustid-sdk/src/core/trustid.ts similarity index 81% rename from trustid-sdk/src/network/trustInterface.ts rename to trustid-sdk/src/core/trustid.ts index ae1b1d5b..3dda2d66 100755 --- a/trustid-sdk/src/network/trustInterface.ts +++ b/trustid-sdk/src/core/trustid.ts @@ -5,7 +5,7 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import { DID } from "../wallet"; +import { DID } from "./did"; export abstract class TrustID { @@ -14,19 +14,18 @@ export abstract class TrustID { abstract createIdentity(did: DID, controller: DID): Promise; abstract createSelfIdentity(did: DID): Promise; - + abstract importIdentity(did: DID, controller?: DID): Promise; abstract verifyIdentity(adminDID: DID, id:string): Promise; abstract getIdentity(did: DID, id: string): Promise; abstract revokeIdentity(adminDID: DID, id: string): Promise; abstract createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise; - abstract updateService(did: DID, serviceDID: string, access: AccessPolicy): Promise; + abstract updateService(did: DID, serviceDID: string, name: string, channel: string): Promise; + abstract updateServiceAccess(did: DID, serviceDID: string, access: AccessPolicy): Promise; abstract getService(did: DID, serviceDID: string): Promise; abstract invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise; abstract query(did: DID, serviceDID: string, args: string[], channel: string): Promise; abstract subscribeEventService(did: DID, serviceDID: string, eventName: string): any; abstract checkConnection(): Promise; - - } export enum PolicyType { @@ -40,4 +39,3 @@ export interface AccessPolicy { threshold?: Number, registry?: object, } - diff --git a/trustid-sdk/src/network/trustHF.ts b/trustid-sdk/src/core/trustidHF.ts similarity index 74% rename from trustid-sdk/src/network/trustHF.ts rename to trustid-sdk/src/core/trustidHF.ts index 21113332..3df1a7a0 100755 --- a/trustid-sdk/src/network/trustHF.ts +++ b/trustid-sdk/src/core/trustidHF.ts @@ -5,9 +5,9 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {TrustID, AccessPolicy} from "./trustInterface"; -import {HfDriver, HfConfig} from "./hfdriver"; -import {DID} from "../wallet"; +import {TrustID, AccessPolicy} from "./trustid"; +import {HfDriver} from "../drivers/hfdriver"; +import {DID} from "./did"; export interface Config { fcn: string; @@ -90,6 +90,45 @@ export class TrustIdHf extends TrustID { ); return res; } + + /** createIdentity registers a new unverified identity */ + public async importIdentity(did: DID): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "createSelfIdentity", + params: { + did: did.id, + publicKey: did.pubkey, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + + /** createIdentity registers a new unverified identity */ + public async importSignedIdentity(publicKey: string, payload: string): Promise { + const args = [ JSON.stringify({ + publicKey: publicKey, + payload: payload + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } /** VerifyIdentity allow admins to verify user identityes */ public async verifyIdentity(adminDID: DID, id: string): Promise { const args = [ @@ -185,6 +224,33 @@ export class TrustIdHf extends TrustID { /** Updates accesses for a service */ public async updateService( + did: DID, + serviceDID: string, + name: string, + channel: string + ): Promise { + const args = [ + JSON.stringify({ + did: did.id, + payload: await did.sign({ + function: "updateService", + params: { + did: serviceDID, + name: name, + channel: channel, + }, + }), + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + args, + this.config.channel + ); + return res; + } + public async updateServiceAccess( did: DID, serviceDID: string, access: AccessPolicy @@ -258,6 +324,21 @@ export class TrustIdHf extends TrustID { return res; } + public async invokeSigned(did: string, payload: string): Promise { + const argsCall = [ JSON.stringify({ + did: did, + payload: payload + }), + ]; + let res: any = await this.driver.callContractTransaction( + this.config.chaincodeName, + this.config.fcn, + argsCall, + this.config.channel + ); + return res; + } + /** Invokes a chaincode through the proxy */ public async query(did: DID, serviceDID: string, args: string[], channel: string): Promise { const argsCall = [ @@ -282,6 +363,21 @@ export class TrustIdHf extends TrustID { ); return res; } + + public async querySigned(did: string, payload: string): Promise { + const argsCall = [ JSON.stringify({ + did: did, + payload: payload + }), + ]; + let res: any = await this.driver.getContractTransaction( + this.config.chaincodeName, + this.config.fcn, + argsCall, + this.config.channel + ); + return res; + } /** Subscribe Event Service */ public async subscribeEventService(did: DID, serviceDID: string, eventName: string): Promise { diff --git a/trustid-sdk/src/network/driver.ts b/trustid-sdk/src/drivers/driver.ts similarity index 100% rename from trustid-sdk/src/network/driver.ts rename to trustid-sdk/src/drivers/driver.ts diff --git a/trustid-sdk/src/network/hfdriver.ts b/trustid-sdk/src/drivers/hfdriver.ts similarity index 100% rename from trustid-sdk/src/network/hfdriver.ts rename to trustid-sdk/src/drivers/hfdriver.ts diff --git a/trustid-sdk/src/keystore/mongoKeystore.ts b/trustid-sdk/src/keystore/mongoKeystore.ts deleted file mode 100644 index 484903ce..00000000 --- a/trustid-sdk/src/keystore/mongoKeystore.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -import { Keystore } from './keystore'; -import { DID } from '../wallet' -const mongodb = require("mongodb") - - - -//const DIDModel = Mongoose.model("did", DIDSchema); - -export class MongoKeystore extends Keystore { - - private database: any; - private uri: string; - private databaseName: string; - private validator = { - $jsonSchema: { - bsonType: "object", - required: [ "id", "pubkey", "type", "controller", "access", "privkey"], - properties: { - id: { - bsonType: "string", - description: "must be a string and is required" - }, - pubkey: { - bsonType: "string", - description: "must be a string and is required" - }, - type: { - bsonType: "string", - description: "must be a string and is required" - }, - controller: { - bsonType: "string", - description: "must be a string and is required" - }, - access: { - bsonType: "int", - description: "must be an integer and is required" - }, - privkey: { - bsonType: "string", - description: "must be a string and is required" - }, - tempPrivKey: { - bsonType: "string", - description: "must be a string" - } - } - } - } - - - // Create connection to the keystore database. - constructor(mongoURI: string, databaseName: string) { - super(); - this.uri = mongoURI; - this.database = null; - this.databaseName = databaseName; - } - - public async init() { - try { - const client = await mongodb.MongoClient.connect(this.uri, { useUnifiedTopology: true }); - this.database = client.db(this.databaseName); - this.database.createCollection("dids", { - validator: this.validator - }); - } catch(err){ - throw err; - - } - - } - - /** getKey gets a key from the keystore of the wallet */ - public async getDID(id: string = "default"): Promise { - // We check DID in mongoDB - // Retrieve from database - try { - const didObj = await this.database.collection('dids').findOne({ id: id }); - let emptyDID: DID = new DID("RSA", undefined); - await emptyDID.loadFromObject(didObj); - return emptyDID - } catch (err) { - throw new Error("DID not found in database") - } - } - - /** Stores DID in the permanent keystore */ - public async storeDID(did: DID): Promise { - try { - const didObj = await this.database.collection('dids').findOne({ id: did.id }); - if(!didObj){ - await this.database.collection('dids').insertOne(did) - return true; - } else { - throw new Error("The identity already exists in the database"); - } - } catch (err){ - throw err; - } - } - - /** Stores DID in the permanent keystore */ - public async updateDID(did: DID): Promise { - try { - // Update DID in Mongo. Modify if it exists, create if it doesn't - await this.database.collection('dids').replaceOne({ - id: did.id }, - did, - {upsert: false }); - this.keystore[did.id] = did // update in memory keystore - - return true - } catch (err){ - throw err; - } - } - -} \ No newline at end of file diff --git a/trustid-sdk/src/keystore/fileKeystore.ts b/trustid-sdk/src/keystores/fileKeystore.ts similarity index 95% rename from trustid-sdk/src/keystore/fileKeystore.ts rename to trustid-sdk/src/keystores/fileKeystore.ts index 9aeaa25d..b9e4586c 100644 --- a/trustid-sdk/src/keystore/fileKeystore.ts +++ b/trustid-sdk/src/keystores/fileKeystore.ts @@ -6,7 +6,7 @@ SPDX-License-Identifier: Apache-2.0 */ import { Keystore } from './keystore'; -import { DID } from '../wallet' +import { DID } from '../core/did' import fs from 'fs'; @@ -69,7 +69,6 @@ export class FileKeystore extends Keystore { auxKs[k] = emptyDID; } this.keystore = auxKs; - // this.keystore = JSON.parse(fs.readFileSync(dir, 'utf8')) break; } case "localStorage": { @@ -114,7 +113,13 @@ export class FileKeystore extends Keystore { } // TO DO public async updateDID(did: DID): Promise { - + try{ + this.keystore[did.id] = did; + this.saveKeystore(); + } catch { + throw false; + } + return true } diff --git a/trustid-sdk/src/keystore/keystore.ts b/trustid-sdk/src/keystores/keystore.ts similarity index 83% rename from trustid-sdk/src/keystore/keystore.ts rename to trustid-sdk/src/keystores/keystore.ts index 7ec2bfd4..5128781c 100755 --- a/trustid-sdk/src/keystore/keystore.ts +++ b/trustid-sdk/src/keystores/keystore.ts @@ -5,7 +5,7 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import { DID } from "../wallet"; +import { DID } from "../core/did"; export abstract class Keystore { /** InMemory Keystore representing all the DIDs loaded in the wallet*/ @@ -35,4 +35,10 @@ export abstract class Keystore { this.keystore["default"] = did; return true; } -} \ No newline at end of file + + /** setDefault sets a DID as the default key for the wallet */ + public getDefault(): boolean { + return this.keystore["default"] + + } +} diff --git a/trustid-sdk/src/keystore/localStorageKeystore.ts b/trustid-sdk/src/keystores/localStorageKeystore.ts similarity index 97% rename from trustid-sdk/src/keystore/localStorageKeystore.ts rename to trustid-sdk/src/keystores/localStorageKeystore.ts index b5d87f36..da7aac9a 100644 --- a/trustid-sdk/src/keystore/localStorageKeystore.ts +++ b/trustid-sdk/src/keystores/localStorageKeystore.ts @@ -6,7 +6,7 @@ SPDX-License-Identifier: Apache-2.0 */ import { Keystore } from './keystore'; -import { DID } from '../wallet' +import { DID } from '../core/did' export class LocalStorageKeystore extends Keystore { diff --git a/trustid-sdk/src/keystores/mongoKeystore.ts b/trustid-sdk/src/keystores/mongoKeystore.ts new file mode 100644 index 00000000..d05c62fa --- /dev/null +++ b/trustid-sdk/src/keystores/mongoKeystore.ts @@ -0,0 +1,112 @@ +/* + +Copyright 2020 Telefónica Digital España. All Rights Reserved. + +SPDX-License-Identifier: Apache-2.0 + +*/ +import { Keystore } from './keystore'; +import { DID } from '../core/did' +const Mongoose = require("mongoose") + +const DIDSchema = new Mongoose.Schema({ + id: String, + pubkey: String, + type: String, + controller: String, + access: Number, + privkey: String, + tempPrivKey: String, + networkID: String, +}) + + +const DIDModel = Mongoose.model("dids", DIDSchema); + +export class MongoKeystore extends Keystore { + + private database: any; + private uri: string; + private databaseName: string; + + // Create connection to the keystore database. + constructor(mongoURI: string, databaseName: string) { + super(); + this.uri = mongoURI; + this.database = null; + this.databaseName = databaseName; + } + + public async init() { + try{ + await Mongoose.connect(this.uri, { + useNewUrlParser: true, + useFindAndModify: true, + useUnifiedTopology: true, + useCreateIndex: true, + }); + this.database = Mongoose.connection; + this.database.on("error", () => { + console.log("Error connecting to database"); + }); + } catch(err){ + throw err; + } + + + } + + /** getKey gets a key from the keystore of the wallet */ + public async getDID(id: string = "default"): Promise { + // We check if DID in memory + // Retrieve from database + try { + const didObj = await DIDModel.findOne({ id: id }); + let emptyDID: DID = new DID("RSA", undefined); + emptyDID.loadFromObject(didObj); + this.keystore[id] = emptyDID; + } catch { + throw new Error("DID not found in database") + } + + + return this.keystore[id]; + } + + /** Stores DID in the permanent keystore */ + public async storeDID(did: DID): Promise { + try { + // Store DID in Mongo. Modify if it exists, create if it doesn't + const didObj = await DIDModel.findOne({ id: did.id }); + console.log(didObj) + if(!didObj){ + await DIDModel.create(did); + return true; + + } else { + throw new Error("The identity already exists in the storage"); + + } + + } catch (err){ + throw err; + } + } + + /** Stores DID in the permanent keystore */ + public async updateDID(did: DID): Promise { + try { + // Store DID in Mongo. Modify if it exists, create if it doesn't + console.log(did.tempPrivKey) + const didObj = await DIDModel.updateOne( + {id: did.id }, + {tempPrivKey: did.tempPrivKey }, + ); + this.keystore[did.id] = did // update in memory keystore + return true; + + } catch (err){ + throw err; + } + } +} \ No newline at end of file diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts old mode 100755 new mode 100644 index 27bc6f79..fe3fe512 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -1,162 +1,11 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -import {JWK, JWS} from "node-jose"; -import {TrustID} from "./network/trustInterface"; - -import crypto from "crypto-js"; - -import {Keystore} from "./keystore/keystore"; -import {FileKeystore} from "./keystore/fileKeystore"; - -export class DID { - public id: string; - public pubkey: string; - public type: string; - public controller: string; - public access: number; - private privkey: string; - private unlockedKey: any; - public unlockTimestamp: any; - public tempPrivKey: string; - - // TODO: Default parameters for now: - // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. - readonly ALGO_TYPES = ["RSA", "EC", "oct"]; - - public constructor(type: any = "RSA", controller: string = "default") { - // If type not supported throw error. - if (!Object.values(this.ALGO_TYPES).includes(type)) { - throw new Error("Key algorithm not supported"); - } - - this.id = ""; - this.type = type; - this.controller = controller; - this.access = 0; - this.privkey = ""; - this.tempPrivKey = ""; - this.pubkey = ""; - this.unlockedKey = null; - this.unlockTimestamp = 0; - } - - // TODO: Can we do this more efficiently? - private async keyGeneration(): Promise { - switch (this.type) { - case "RSA": - return JWK.createKey("RSA", 2048, {alg: ""}); - case "EC": - return JWK.createKey("EC", "P-521", {alg: ""}); - case "oct": - return JWK.createKey("oct", 256, {alg: ""}); - default: - throw new Error("Key algorithm not supported"); - } - } - - public async createKey(passphrase: string = "") { - // Only createKey for DID if not already created. - if (this.privkey + this.id + this.pubkey === "") { - let key = await this.keyGeneration(); - let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); - this.id = `did:vtn:trustid:${addr}`; - this.pubkey = key.toPEM(); - let pk = key.toPEM(true); - this.privkey = crypto.AES.encrypt(pk, passphrase).toString(); - } - } - - public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { - try { - this.unlockTimestamp = Date.now() + timeout * 1000; - const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); - this.unlockedKey = await JWK.asKey(pem, "pem"); - if (tempPassphrase != "") { - this.tempPrivKey = crypto.AES.encrypt(pem, tempPassphrase).toString(); - } - return this - } catch { - throw new Error("Private key couldn't be deciphered"); - } - } - public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { - try { - this.unlockTimestamp = Date.now() + timeout * 1000; - const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase).toString(crypto.enc.Utf8); - this.unlockedKey = await JWK.asKey(pem, "pem"); - return - } catch { - throw new Error("Private key couldn't be deciphered"); - } - } - - public lockAccount(): any { - this.unlockedKey = undefined; - } - - public loadFromObject(obj: any): void { - let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp } = obj; - this.id = id; - this.type = type; - this.controller = controller; - this.access = access; - this.pubkey = pubkey; - this.privkey = privkey; - this.tempPrivKey = tempPrivKey; - this.unlockTimestamp = unlockTimestamp; - } - - public exportDID(withPrivate: boolean) { - const privkey = withPrivate ? this.privkey : ""; - return { - id: this.id, - type: this.type, - pubkey: this.pubkey, - privkey: privkey, - controller: this.controller, - }; - } - - /** sign Generates a JWS from a payload using an id from the wallet */ - public async sign(payload: object): Promise { - - - //TODO: TRY -- CATCH - if (!this.unlockedKey) { - throw Error("You must unlock the account before signing the message."); - } - - var buf = Buffer.from(JSON.stringify(payload)); - - let sign = await JWS.createSign( - { - fields: {cty: "jwk+json"}, - format: "compact", - }, - this.unlockedKey - ) - .update(buf) - .final(); - - return sign.toString(); - } - - /** verify Verifies a JWS from a payload using a did */ - public async verify(signature: string, did: DID): Promise { - let pk = await JWK.asKey(did.pubkey, "pem"); - let verify = await JWS.createVerify(pk).verify(signature); - return JSON.parse(verify.payload.toString()); - } -} - /** Class representing Wallets * It follows a Singleton pattern. */ +import {DID} from './core/did' +import {TrustID} from './core/trustid' +import {Keystore} from './keystores/keystore' +import {FileKeystore} from './keystores/fileKeystore' + export class Wallet { /** Instance for the wallet */ private static _instance: Wallet; @@ -192,6 +41,9 @@ export class Wallet { public setDefault(did: DID): boolean { return this.keystore.setDefault(did); } + public getDefault(): boolean { + return this.keystore.getDefault(); + } public storeInMemory(did: DID): boolean { return this.keystore.storeInMemory(did); } @@ -201,23 +53,11 @@ export class Wallet { this.keystore = keystore; } - /** Set the Keystore to use in the wallet. */ - public addNetwork(id: string, network: TrustID): void { - this.networks[id] = network; - } - /** generateDID generates a new DID in the wallet */ public async generateDID(type: string, controller: string = "default", passphrase: string = ""): Promise { const value: DID = new DID(type, controller); await value.createKey(passphrase); await this.keystore.storeDID(value); - - // If it is the first key assign key as default. - // if (Object.keys(await this.keystore.getDID("default")).length === 0) { - // this.keystore.setDefault(value); - // } - - return value; } @@ -227,4 +67,8 @@ export class Wallet { const unlockedDID = await did.unlockAccount(passphrase, tempPassphrase) await this.keystore.updateDID(unlockedDID) } -} + /** Set the Keystore to use in the wallet. */ + public addNetwork(id: string, network: TrustID): void { + this.networks[id] = network; + } +} \ No newline at end of file diff --git a/trustid-sdk/test/integration/test.ts b/trustid-sdk/test/integration/test.ts index 47e03162..b1da378c 100755 --- a/trustid-sdk/test/integration/test.ts +++ b/trustid-sdk/test/integration/test.ts @@ -6,13 +6,13 @@ SPDX-License-Identifier: Apache-2.0 */ import {Wallet} from "../../src/wallet"; -import {AccessPolicy, PolicyType} from "../../src/network/trustInterface"; +import {AccessPolicy, PolicyType} from "../../src/core/trustid"; import {expect} from "chai"; -import {TrustIdHf} from "../../src/network/trustHF"; +import {TrustIdHf} from "../../src/core/trustidHF"; const path = require("path"); const fs = require("fs"); -const ccpPath = path.resolve(__dirname, "..", "..", "..", "ccp-dev-dsn.json"); +const ccpPath = path.resolve(__dirname, "..", "..", "..", "config", "connection-profile.json"); const adminPriv = `-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7Th71Us2fUkeB @@ -92,7 +92,7 @@ describe("Integration test", async() => { await trustID.getIdentity(await wal.getDID("default"), await didUnlock.id); const id = Date.now(); const res = await trustID.createService(await wal.getDID("default"), `vtn:trustos:service:${id}`, "sacc", access,config.channel); - await trustID.updateService(await wal.getDID("default"), `vtn:trustos:service:${id}`, access); + await trustID.updateServiceAccess(await wal.getDID("default"), `vtn:trustos:service:${id}`, access); const result = await trustID.invoke( await wal.getDID("default"), `vtn:trustos:service:${id}`, diff --git a/trustid-sdk/test/unit/fileKeystore.spec.ts b/trustid-sdk/test/unit/fileKeystore.spec.ts index f74de510..7d1d1f57 100644 --- a/trustid-sdk/test/unit/fileKeystore.spec.ts +++ b/trustid-sdk/test/unit/fileKeystore.spec.ts @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 */ import {expect} from "chai"; import {Wallet} from "../../src/wallet"; -import {FileKeystore} from "../../src/keystore/fileKeystore"; +import {FileKeystore} from "../../src/keystores/fileKeystore"; import "mocha"; diff --git a/trustid-sdk/test/unit/hfdiver.spec.ts b/trustid-sdk/test/unit/hfdiver.spec.ts index 47ea1884..2fee97fb 100644 --- a/trustid-sdk/test/unit/hfdiver.spec.ts +++ b/trustid-sdk/test/unit/hfdiver.spec.ts @@ -5,7 +5,7 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import { HfDriver } from "../../src/network/hfdriver"; +import { HfDriver } from "../../src/drivers/hfdriver"; /* global describe, it, before, after */ diff --git a/trustid-sdk/test/unit/localKeystore.spec.ts b/trustid-sdk/test/unit/localKeystore.spec.ts index a0e179d5..c7143953 100644 --- a/trustid-sdk/test/unit/localKeystore.spec.ts +++ b/trustid-sdk/test/unit/localKeystore.spec.ts @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0 */ import {expect} from "chai"; import {Wallet} from "../../src/wallet"; -import {LocalStorageKeystore} from "../../src/keystore/localStorageKeystore"; +import {LocalStorageKeystore} from "../../src/keystores/localStorageKeystore"; import "mocha"; diff --git a/trustid-sdk/test/unit/trustHF.spec.ts b/trustid-sdk/test/unit/trustHF.spec.ts index 63bd3b3c..d0f29d9b 100644 --- a/trustid-sdk/test/unit/trustHF.spec.ts +++ b/trustid-sdk/test/unit/trustHF.spec.ts @@ -5,11 +5,11 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {HfDriver} from "../../src/network/hfdriver"; -import {TrustIdHf} from "../../src/network/trustHF"; -import {DID} from "../../src/wallet"; +import {HfDriver} from "../../src/drivers/hfdriver"; +import {TrustIdHf} from "../../src/core/trustidHF"; +import {DID} from "../../src/core/did"; import {Wallet} from "../../src/wallet"; -import { AccessPolicy, PolicyType} from "../../src/network/trustInterface"; +import { AccessPolicy, PolicyType} from "../../src/core/trustid"; /* global describe, it, before, after */ const {expect} = require("chai"); @@ -258,6 +258,9 @@ describe("TrustHF - Test", async() => { console.log(err); } }); + + + it("Get identity Fail", async () => { try { const trustID = new TrustIdHf(config); @@ -267,6 +270,71 @@ describe("TrustHF - Test", async() => { } }); }); + describe("Import Signed Identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Import Signed Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.importSignedIdentity("did", "payload"); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Import signed Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.importSignedIdentity("id", "payload"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + + describe("Import Identity ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Import Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.importIdentity(identity); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Import Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.importIdentity(identity); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); describe("Create Service ", () => { let driverStub: any; let access: AccessPolicy = {policy: PolicyType.PublicPolicy, threshold: 0, registry: {}}; @@ -320,7 +388,7 @@ describe("TrustHF - Test", async() => { try { const trustID = new TrustIdHf(config); - const result = await trustID.updateService(identity, "id", access); + const result = await trustID.updateServiceAccess(identity, "id", access); expect(result).to.equal("OK"); } catch (err) { console.log(err); @@ -329,7 +397,7 @@ describe("TrustHF - Test", async() => { it("Update Service Fail", async () => { try { const trustID = new TrustIdHf(config); - await trustID.updateService(identity, "id", access); + await trustID.updateServiceAccess(identity, "id", access); } catch (err) { expect(err.message).to.equal("Error calling contract"); } @@ -434,4 +502,69 @@ describe("TrustHF - Test", async() => { } }); }); + describe("Invoke Signed Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "callContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Invoke Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.invokeSigned("did", "payload"); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Invoke Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.invokeSigned("id", "payload"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); + + describe("Query Signed Service ", () => { + let driverStub: any; + before((done) => { + driverStub = sinon.stub(HfDriver.prototype, "getContractTransaction").resolves("result"); + driverStub.onSecondCall().rejects(new Error("Error calling contract")); + done(); + }); + + after((done) => { + driverStub.restore(); + done(); + }); + + it("Query Success", async () => { + try { + + const trustID = new TrustIdHf(config); + const result = await trustID.querySigned("did", "payload"); + expect(result).to.equal("result"); + } catch (err) { + console.log(err); + } + }); + it("Query Fail", async () => { + try { + const trustID = new TrustIdHf(config); + await trustID.querySigned("id", "payload"); + } catch (err) { + expect(err.message).to.equal("Error calling contract"); + } + }); + }); }); diff --git a/trustid-sdk/test/unit/wallet.spec.ts b/trustid-sdk/test/unit/wallet.spec.ts index 4347af1d..049f2620 100644 --- a/trustid-sdk/test/unit/wallet.spec.ts +++ b/trustid-sdk/test/unit/wallet.spec.ts @@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0 */ import { expect } from 'chai'; import { Wallet } from '../../src/wallet'; -import { FileKeystore } from '../../src/keystore/fileKeystore'; +import { FileKeystore } from '../../src/keystores/fileKeystore'; import 'mocha'; const wal = Wallet.Instance; @@ -77,14 +77,14 @@ describe('Wallet tests', () => { }); - it('Update did', async() => { - const did = await wal.generateDID('RSA', 'default', 'secret'); - did.tempPrivKey = "lalsal" - await wal.updateDID(did); + // it('Update did', async() => { + // const did = await wal.generateDID('RSA', 'default', 'secret'); + // did.tempPrivKey = "lalsal" + // await wal.updateDID(did); - const getDID = await wal.getDID(did.id) - expect(getDID.tempPrivKey).to.eql(did.tempPrivKey) - }); + // const getDID = await wal.getDID(did.id) + // expect(getDID.tempPrivKey).to.eql(did.tempPrivKey) + // }); it('Unlock account bad', async() => { try { @@ -119,7 +119,7 @@ describe('Wallet tests', () => { await did.unlockAccount('secret' ) await did.unlockAccountTemp('tempPass') } catch(err){ - expect(err.message).to.eql("Private key couldn't be deciphered") + expect(err.message).to.eql("Invalid PEM formatted message.") } }); diff --git a/trustid-sdk/tsconfig-light.json b/trustid-sdk/tsconfig-light.json deleted file mode 100755 index 25f4f71f..00000000 --- a/trustid-sdk/tsconfig-light.json +++ /dev/null @@ -1,76 +0,0 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -{ - "compilerOptions": { - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5", "es6", "dom"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./dist-light/build.js", /* Concatenate and emit output to single file. */ - "outDir": "./dist-light", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "allowJs": true, - - }, - "exclude": ["./src/network/hfdriver.ts", "./src/network/trustHF.ts", "dist/*", "index.ts"], -} diff --git a/trustid-sdk/tsconfig-singleFile.json b/trustid-sdk/tsconfig-singleFile.json deleted file mode 100755 index 01395dfe..00000000 --- a/trustid-sdk/tsconfig-singleFile.json +++ /dev/null @@ -1,76 +0,0 @@ -/* - -Copyright 2020 Telefónica Digital España. All Rights Reserved. - -SPDX-License-Identifier: Apache-2.0 - -*/ -{ - "compilerOptions": { - /* Basic Options */ - // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "amd", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es5", "es6", "dom"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - "outFile": "./dist-light/build.js", /* Concatenate and emit output to single file. */ - "outDir": "./dist-light", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - - /* Advanced Options */ - "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */ - "allowJs": true, - - }, - "exclude": ["./src/network/hfdriver.ts", "./src/network/trustHF.ts", "dist/*", "index.ts"], -} From 914351d8046f6bc25f2c20aacecb1ac0a1763df9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:28:32 +0100 Subject: [PATCH 12/25] Bump highlight.js from 9.18.1 to 9.18.5 in /trustid-sdk (#22) Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 493e8829..f8e258ad 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -418,9 +418,9 @@ "dev": true }, "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "base64url": { "version": "3.0.1", @@ -1208,9 +1208,9 @@ "dev": true }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", "dev": true }, "hmac-drbg": { From cb1b0b9a6b25fe531cc248b32561440b4184b24c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Jan 2021 13:28:52 +0100 Subject: [PATCH 13/25] Bump lodash from 4.17.15 to 4.17.20 in /trustid-sdk (#28) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index f8e258ad..4fae9324 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1499,9 +1499,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "lodash.camelcase": { "version": "4.3.0", @@ -1922,6 +1922,11 @@ } } }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, "node-jose": { "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", "from": "git+https://github.com/cisco/node-jose.git", @@ -1935,13 +1940,6 @@ "pako": "^1.0.11", "process": "^0.11.10", "uuid": "^3.3.3" - }, - "dependencies": { - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - } } }, "normalize-path": { From 453b4f49dccddd346b30e26097f63bb1250de3fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Feb 2021 16:44:10 +0100 Subject: [PATCH 14/25] Bump axios from 0.19.2 to 0.21.1 in /trustid-sdk (#24) Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 17 +++++++---------- trustid-sdk/package.json | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) mode change 100755 => 100644 trustid-sdk/package.json diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 4fae9324..64e0c548 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -395,11 +395,11 @@ "optional": true }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { - "follow-redirects": "1.5.10" + "follow-redirects": "^1.10.0" } }, "backbone": { @@ -1022,12 +1022,9 @@ } }, "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - } + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", + "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" }, "forever-agent": { "version": "0.6.1", diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json old mode 100755 new mode 100644 index 2d696d39..363789e2 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -26,7 +26,7 @@ "dependencies": { "@types/mongoose": "^5.7.14", "@types/node": "^13.7.1", - "axios": "^0.19.2", + "axios": "^0.21.1", "crypto-js": "^4.0.0", "fs": "0.0.1-security", "jose": "^1.22.1", From c0245bb30db0616fe93cda7e3aa5ef912411d202 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Mar 2021 10:47:54 +0100 Subject: [PATCH 15/25] Bump ini from 1.3.5 to 1.3.8 in /trustid-sdk (#23) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 64e0c548..70b0eb88 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1253,9 +1253,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "optional": true }, "interpret": { From 77e9e76576a7b7e3892ba449f909c11ecc4791ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 18 Mar 2021 10:48:04 +0100 Subject: [PATCH 16/25] Bump elliptic from 6.5.3 to 6.5.4 in /trustid-sdk (#31) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 70b0eb88..cd97c7ed 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -800,18 +800,18 @@ } }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "optional": true, "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, "emoji-regex": { From f3528f5a80ded9c946793fac4c39ddcd794fa3de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 13:20:57 +0000 Subject: [PATCH 17/25] Bump y18n from 3.2.1 to 3.2.2 in /trustid-sdk Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] --- trustid-sdk/package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index cd97c7ed..8f49bea9 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1718,9 +1718,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { @@ -3035,9 +3035,9 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "optional": true }, "yargs": { @@ -3139,9 +3139,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { From d94adc142ce090b6c361d315062a72a925aaadba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 13:20:57 +0000 Subject: [PATCH 18/25] Bump y18n from 3.2.1 to 3.2.2 in /trustid-sdk Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] --- trustid-sdk/package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index cd97c7ed..8f49bea9 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1718,9 +1718,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { @@ -3035,9 +3035,9 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "optional": true }, "yargs": { @@ -3139,9 +3139,9 @@ } }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs": { From 95e7abe5516c04ddcf922a24ef9acf882e25cc40 Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Date: Thu, 15 Apr 2021 15:42:21 +0200 Subject: [PATCH 19/25] added recovery functions Signed-off-by: Maria Teresa Nieto --- trustid-sdk/README.md | 162 - trustid-sdk/examples/keystore | 0 trustid-sdk/package-lock.json | 6268 ++++++++++---------- trustid-sdk/package.json | 14 +- trustid-sdk/src/core/did.ts | 211 +- trustid-sdk/src/keystores/mongoKeystore.ts | 4 +- trustid-sdk/src/wallet.ts | 29 + trustid-sdk/test/unit/wallet.spec.ts | 31 +- 8 files changed, 3372 insertions(+), 3347 deletions(-) delete mode 100644 trustid-sdk/README.md create mode 100644 trustid-sdk/examples/keystore mode change 100644 => 100755 trustid-sdk/package.json diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md deleted file mode 100644 index 28de218d..00000000 --- a/trustid-sdk/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# TRUSTID SDK - - -This SDK exposes all the functionalities required to interact with -TRUSTID-based DLT networks. - -### Install -* To install this library you need access to the private repo: -``` -$ npm install @hyperledger-labs/trustid-sdk@1.0.0 - -``` - -### Getting started - -To use the sdk it's necessary to read the [Getting started guide](../README.md) - -The SDK to connect with Hyperledger Fabric will need to configure the connection. On one side we need the hyperledger fabric standard [connection profile](./connection-profile.json), on the othe side we will need to complete de following configuration in a JSON object. -```js -{ - stateStore: '', - caURL: '', - caName: '', - caAdmin: '', - caPassword: '', - tlsOptions: { - trustedRoots:"", - verify: false - }, - mspId: '', - walletID: '', - asLocalhost: , - ccp: connection profile commented bellow, - chaincodeName: "name of the identity chaincode deployed", - fcn: "proxy", - channel: "" -} - -``` - -### Example of use -You can find a set of examples using the SDK in the [examples](../examples) directory. - -```js -// Use library -var id = require('trustid-sdk') -import { TrustIdHf, Keystore, FileKeystore } from 'trustid-sdk'; -import {AccessPolicy, PolicyType} from 'trustid-sdk'; - -// Initialize wallet -wal = id.Wallet.Instance; - -// Create Keystore -ks = new FileKeystore(); -// Set keystore in wallet -wal.setKeystore(ks) -// LoadKeystore from file - wal.loadKeystore('file', './keystore') -// Set endpoint of driver and store in variable to use it. -let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); -let config = { - stateStore: '/tmp/statestore', - caURL: 'https://ca.org1.telefonica.com:7054', - caName: 'ca.org1.telefonica.com', - caAdmin: 'adminCA', - caPassword: 'adminpw', - tlsOptions: { - trustedRoots:"-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false - }, - mspId: 'org1MSP', - walletID: 'admin', - asLocalhost: true, - ccp: ccp, - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel" -} - -const trustID = new TrustIdHf(config); -wal.addNetwork("hf", trustID); -await wal.networks["hf"].configureDriver(); - -// Use the wallet and the driver -wal.generateDID("RSA") -await wal.networks["hf"].createIdentity(wal.getDID("default")) -await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); - -let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; - -await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", access, "mychannel"); - -``` - -### Structure -The library has the following modules: - -* `wallet.ts`: Core module of the library. It wraps all the state and -logic for identity management and interaction with TRUSTID networks. -To start using the SDK a new wallet needs to be initialized. A wallet -exposes the following methods: - * `public setKeystore(keystore: Keystore): void`: - * `public generateDID(type: string, controller: string = "default", passphrase: string = ""): DID` - - And stores the following information: - -* `class DID`: Has the following structure. - * `public id: string`: Id string that identifies the DID. - * `public pubkey: string`: PublicKey of the DID. - * `public type: string`: Key type (RSA / EC / OKP). - * `public controller: string`: Verifier of the identity - * `public access: number`: Access level. This is the access level to be checked in the service AccessPolicy threshold. - * `private privkey: string`: Private Key of the DID. - - And exposes the following functions: - * `public unlockAccount(passphrase: string = ""): void`: Unlocks private key in order to use the DID. - * `public lockAccount(): any`: Locks the private key for a DID. - * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. - * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. - -* `trustInterface.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is -the `hfdriver.ts` enabling the interaction with Hyperledger Fabric TrustID -networks. - - * `setEndpoint(endpoint: string): void`: Sets the network endpoint to interact with the TRUSTID network. - * `createIdentity(did: DID): Promise`: Create an identity in TrustID. It generates a new DID in the wallet and register it in the network. - * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. - * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. - * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. - * `createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise`: Creates a new service in the TrustID network. - * `updateService(did: DID, serviceDID: string, name: string, channel: string): Promise`: Updates the information from a service. - * `updateServiceAccess(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the access from a service. - * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. - * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. - * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network - * `PolicyType (policy: PolicyType, threshold:?Number, registry:?object)`: It - defined the policyType to be used for a service. There are currently three - types of policyTypes supported (more could be easily added according to - your needs) - * PublicPolicy: Grants public access by any user to your service. - * SameControllerPolicy: Only verified identities whose controller is the - same controller who created the service has access to the service (this - policy comes pretty handy when you want to define "corporate-wide" services). - * FineGrainedPolicy: Grants fine-grained access to users to your service. - In this policy you explicitly define the access of users to the service. - There are two ways of using this policyType, you can define a threshold - so every user with an access level equal or higher than the threshold - is granted access to the service; or you could use fine-grained - access levels defined in the registry, where you would add the following - tuple: `{, }`. Thus, only users in the registry - with an access level over the threshold will be granted access to the - service with `access_role` permissions. - -* `keystore.ts`: Interface that enables the implementation of keystore storages. - There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). - - * `abstract getDID(id: string): DID`: Get specific DID from keystore. - * `abstract storeDID(did: DID): boolean`: Store DID in keystore. - * `public storeInMemory(did: DID): boolean`: Store DID inMemory for easy and performant use. - * `public listDID(): string[]`: List DIDs in memory. - * `public setDefault(did: DID): boolean`: Set DID as default identity for the keystore wallet. - diff --git a/trustid-sdk/examples/keystore b/trustid-sdk/examples/keystore new file mode 100644 index 00000000..e69de29b diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index cd97c7ed..94d7820d 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1,3173 +1,3171 @@ { - "name": "coren-id-sdk", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/runtime": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", - "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@grpc/grpc-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", - "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", - "optional": true, - "requires": { - "semver": "^6.2.0" - } - }, - "@grpc/proto-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", - "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", - "optional": true, - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@panva/asn1.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", - "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", - "optional": true - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "optional": true - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "optional": true - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", - "optional": true - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", - "optional": true - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", - "optional": true - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", - "optional": true - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", - "optional": true - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", - "optional": true - }, - "@semantic-ui-react/event-stack": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz", - "integrity": "sha512-SA7VOu/tY3OkooR++mm9voeQrJpYXjJaMHO1aFCcSouS2xhqMR9Gnz0LEGLOR0h9ueWPBKaQzKIrx3FTTJZmUQ==", - "dev": true, - "requires": { - "exenv": "^1.2.2", - "prop-types": "^15.6.2" - } - }, - "@sinonjs/commons": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", - "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, - "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@stardust-ui/react-component-event-listener": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", - "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2" - } - }, - "@stardust-ui/react-component-ref": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", - "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2", - "react-is": "^16.6.3" - } - }, - "@types/bson": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", - "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", - "requires": { - "@types/node": "*" - } - }, - "@types/caseless": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", - "optional": true - }, - "@types/chai": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", - "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", - "dev": true - }, - "@types/crypto-js": { - "version": "3.1.47", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", - "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", - "dev": true - }, - "@types/jwk-to-pem": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", - "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", - "dev": true - }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", - "optional": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mocha": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", - "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", - "dev": true - }, - "@types/mongodb": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.25.tgz", - "integrity": "sha512-2H/Owt+pHCl9YmBOYnXc3VdnxejJEjVdH+QCWL5ZAfPehEn3evygKBX3/vKRv7aTwfNbUd0E5vjJdQklH/9a6w==", - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, - "@types/mongoose": { - "version": "5.7.29", - "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.29.tgz", - "integrity": "sha512-+7u1akCerciZ2MG66p6Vy+9Tg7dYcgSeNbDInxdOA5vB5xAZhNiIBj8HESnJmIqOBcWxQ90HpaPWtEwggBqXug==", - "requires": { - "@types/mongodb": "*", - "@types/node": "*" - } - }, - "@types/node": { - "version": "13.13.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.12.tgz", - "integrity": "sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw==" - }, - "@types/node-jose": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.4.tgz", - "integrity": "sha512-qdCc4utrY71TF8Ghm+uW92EAZU9PW3kok4yvEbdFT/GRZ5VvsU3NuZH59mxfOFBtdsHiLjWjOsXlVSPC3z6cJw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/request": { - "version": "2.48.5", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", - "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", - "optional": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "@types/sinon": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", - "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", - "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", - "dev": true - }, - "@types/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", - "optional": true - }, - "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", - "optional": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "optional": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "optional": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "optional": true - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", - "optional": true - }, - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", - "dev": true, - "requires": { - "underscore": ">=1.8.3" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "optional": true - }, - "browser-request": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "optional": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "bson": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", - "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "optional": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "optional": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "cloudant-follow": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", - "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", - "optional": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "name": "coren-id-sdk", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", + "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-react-context": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", - "integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==", - "dev": true, - "requires": { - "gud": "^1.0.0", - "warning": "^4.0.3" - } - }, - "crypto-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", - "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", - "optional": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "optional": true - }, - "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "eastasianwidth": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", - "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "errs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "optional": true - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "optional": true - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", - "optional": true - }, - "fabric-ca-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", - "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", - "optional": true, - "requires": { - "fabric-common": "^2.1.1", - "jsrsasign": "^7.2.2", - "url": "^0.11.0", - "util": "^0.10.3", - "winston": "^2.4.0" - } - }, - "fabric-common": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.1.tgz", - "integrity": "sha512-IwkOTB/jJIm2aOfJaYFirCYrorIb8TvW7lvU65b/CGwpXK1GuFWYOYCZa+SXggl9z4ZoADDrIYTZ76BAaFIDKQ==", - "optional": true, - "requires": { - "callsite": "^1.0.0", - "elliptic": "^6.5.2", - "fabric-protos": "2.1.1", - "js-sha3": "^0.7.0", - "jsrsasign": "^8.0.15", - "nconf": "^0.10.0", - "pkcs11js": "^1.0.6", - "promise-settle": "^0.3.0", - "sjcl": "1.0.7", - "winston": "^2.4.0", - "yn": "^3.1.0" - }, - "dependencies": { - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-network": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.1.0.tgz", - "integrity": "sha512-9VqUvYX2fROleTl1sKIx51EhLDfhDxDMHIgafRvicBFJKYAeQ6nyKWmk3gZIlGxmB2LjpIV+WzwR5Z2PiNI03w==", - "optional": true, - "requires": { - "fabric-ca-client": "^2.1.1", - "fabric-common": "^2.1.1", - "fs-extra": "^8.1.0", - "long": "^4.0.0", - "nano": "^8.1.0", - "winston": "^2.4.0" - }, - "dependencies": { - "fabric-ca-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.1.tgz", - "integrity": "sha512-TcX/frTOun76DPh3FcKQ3kCue1K2CK00H43ZGBqIQGqtF42pDeNRqDSrAbvYTujg9lzKVLRZl2k0h4m/oP2UaQ==", - "optional": true, - "requires": { - "fabric-common": "2.1.1", - "jsrsasign": "^8.0.15", - "url": "^0.11.0", - "winston": "^2.4.0" - } + "@grpc/grpc-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", + "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", + "requires": { + "semver": "^6.2.0" + } + }, + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", + "requires": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + } + }, + "@hypnosphi/create-react-context": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz", + "integrity": "sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==", + "dev": true, + "requires": { + "gud": "^1.0.0", + "warning": "^4.0.3" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@panva/asn1.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", + "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@semantic-ui-react/event-stack": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.2.tgz", + "integrity": "sha512-Yd0Qf7lPCIjzJ9bZYfurlNu2RDXT6KKSyubHfYK3WjRauhxCsq6Fk2LMRI9DEvShoEU+AsLSv3NGkqXAcVp0zg==", + "dev": true, + "requires": { + "exenv": "^1.2.2", + "prop-types": "^15.6.2" + } + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@stardust-ui/react-component-event-listener": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", + "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2" + } + }, + "@stardust-ui/react-component-ref": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", + "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.6.3" + } + }, + "@types/bson": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", + "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", + "requires": { + "@types/node": "*" + } + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + }, + "@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, + "@types/crypto-js": { + "version": "3.1.47", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", + "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", + "dev": true + }, + "@types/jwk-to-pem": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", + "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", + "dev": true + }, + "@types/long": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", + "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mocha": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", + "dev": true + }, + "@types/mongodb": { + "version": "3.6.12", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.12.tgz", + "integrity": "sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, + "@types/mongoose": { + "version": "5.10.4", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.10.4.tgz", + "integrity": "sha512-U7fNDcTcdaSGzQ3+mlSBeebiYr6eaacJi330LTLOEh8Sm6mXfuec70ag/UXkL+alFm7pfAjFqfc7jEaJEJvAHQ==", + "requires": { + "@types/mongodb": "*", + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.13.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.49.tgz", + "integrity": "sha512-v5fPzKjPAZ33/G4X8EXvGlbHFKQClfKAz1bKF/+cKaWss9lAIqrOETfcFNL3xG+DG2VCEev+dK4/lCa+YZaxBA==" + }, + "@types/node-jose": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.5.tgz", + "integrity": "sha512-fScnd7GdaHC31PYouWR0xYSOXQLrmxPhLM92CYlVy4UetSwis2u5e6khMazj1Xyidt8zPeRU0PHLmI+mpamhGQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "@types/sinon": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", + "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", + "integrity": "sha512-dIPoZ3g5gcx9zZEszaxLSVTvMReD3xxyyDnQUjA6IYDG9Ba2AV0otMPs+77sG9ojB4Qr2N2Vk5RnKeuA0X/0bg==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true }, - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-protos": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.1.tgz", - "integrity": "sha512-ENki8xgRQqxd/qe0EVvNlr7k2LmEOMqGrrw22+ufY/sAE8OyFXpQa3+1J9wErzN+cASt2t/DuCaIIKURPJrFRg==", - "optional": true, - "requires": { - "@grpc/grpc-js": "1.0.3", - "@grpc/proto-loader": "0.5.4", - "lodash.clone": "4.5.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "optional": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "optional": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "follow-redirects": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true - }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gud": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", - "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", - "dev": true - }, - "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "optional": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "optional": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "optional": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "optional": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "optional": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "optional": true - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true - }, - "jose": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.1.tgz", - "integrity": "sha512-VyHM6IJPw0TTGqHVNlPWg16/ASDPAmcChcLqSb3WNBvwWFoWPeFqlmAUCm8/oIG1GjZwAlUDuRKFfycowarcVA==", - "requires": { - "@panva/asn1.js": "^1.0.0" - } - }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", - "dev": true - }, - "js-sha3": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", - "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==", - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "optional": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "optional": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "optional": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jsrsasign": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", - "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=", - "optional": true - }, - "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", - "dev": true - }, - "kareem": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", - "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" - }, - "keyboard-key": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", - "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "optional": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "optional": true - }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", - "optional": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", - "dev": true - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "optional": true - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "optional": true, - "requires": { - "mime-db": "1.44.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "optional": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", + "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "cloudant-follow": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", + "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", + "requires": { + "browser-request": "~0.3.0", + "debug": "^4.0.1", + "request": "^2.88.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", + "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "errs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=" + }, + "es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fabric-ca-client": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.2.5.tgz", + "integrity": "sha512-wjXNHkQ2mFznmeleqq/FzUqCojMhUOyzmAMV12spIuW03tyPIq5A9/eDCGjeAu8+8WYBYSKmAx95pO3PeBeKSg==", + "requires": { + "fabric-common": "2.2.5", + "jsrsasign": "^8.0.20", + "url": "^0.11.0", + "winston": "^2.4.0" + } + }, + "fabric-common": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.2.5.tgz", + "integrity": "sha512-nAnga2klnAsyzzPlOwxW8kjKBFWqhAH/P3c987RCjh95h/C1lA0VksjyeMhmRmoo6wxFE5MHv/vY2FVh0gwNCw==", + "requires": { + "callsite": "^1.0.0", + "elliptic": "^6.5.3", + "fabric-protos": "2.2.5", + "js-sha3": "^0.7.0", + "jsrsasign": "^8.0.20", + "long": "^4.0.0", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" + } + }, + "fabric-network": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.2.5.tgz", + "integrity": "sha512-NGMwMiZ93hW4R5yimZo1CvjdPs9mRjYR3/fh6xpjTvQZhVsJvHxggRKa+HhkySr4FJGJ52raQ/Nj3DsOxd4XTg==", + "requires": { + "fabric-common": "2.2.5", + "fabric-protos": "2.2.5", + "long": "^4.0.0", + "nano": "^8.2.2" + } + }, + "fabric-protos": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.2.5.tgz", + "integrity": "sha512-5ylljqycb4621jOFFAkwJxfzfhUbf5ovddb/RpDO8MgrPO+ZIqI5lU7Lc+jPtl29Xa3rxK94MctkVoRejgz5Tg==", + "requires": { + "@grpc/grpc-js": "1.0.3", + "@grpc/proto-loader": "0.5.4", + "protobufjs": "^6.9.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - } - } - }, - "mongodb": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", - "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.10.13.tgz", - "integrity": "sha512-lvZzTj449sVWijY76StOuTKt5oP5kyy70VdM3DMgPpKNqZfkAseHxekmqBbd9YQQDVIgrIYDar9vSlxKqc75MQ==", - "requires": { - "bson": "^1.1.4", - "kareem": "2.3.1", - "mongodb": "3.6.3", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.7.0", - "mquery": "3.2.2", - "ms": "2.1.2", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "7.0.1", - "sliced": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz", - "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==" - }, - "mquery": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", - "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", - "optional": true - }, - "nano": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", - "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", - "optional": true, - "requires": { - "@types/request": "^2.48.4", - "cloudant-follow": "^0.18.2", - "debug": "^4.1.1", - "errs": "^0.3.2", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "nconf": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", - "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", - "optional": true, - "requires": { - "async": "^1.4.0", - "ini": "^1.3.0", - "secure-keys": "^1.0.0", - "yargs": "^3.19.0" - } - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nise": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", - "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/node/-/node-13.14.0.tgz", - "integrity": "sha512-y5pClvPYkG7cTPRDmyNeCuOseyRFuZbrvQVbyAEhkfRWtfhyyu6lHYUjBSJzrSZXlbkCIlx+TKqLDAEhxc9Vkw==", - "requires": { - "node-bin-setup": "^1.0.0" - } - }, - "node-bin-setup": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz", - "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q==" - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, - "node-jose": { - "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", - "from": "git+https://github.com/cisco/node-jose.git", - "requires": { - "base64url": "^3.0.1", - "buffer": "^5.5.0", - "es6-promise": "^4.2.8", - "lodash": "^4.17.15", - "long": "^4.0.0", - "node-forge": "^0.10.0", - "pako": "^1.0.11", - "process": "^0.11.10", - "uuid": "^3.3.3" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", - "dev": true - }, - "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", - "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optional": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", - "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "optional": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", - "requires": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "optional": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pkcs11js": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.21.tgz", - "integrity": "sha512-U+UUXbVqdL3q95zNqi8aGbAg6KcyVkKocKR4QicvoEEO9NVW2podLkaq5hhxLGUi+OOJSL5VBNbUE2EatbeITw==", - "optional": true, - "requires": { - "nan": "^2.14.0" - } - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise-settle": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", - "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=", - "optional": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "protobufjs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", - "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "optional": true - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "optional": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "optional": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "optional": true - }, - "react": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", - "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "react-popper": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz", - "integrity": "sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "create-react-context": "^0.3.0", - "deep-equal": "^1.1.1", - "popper.js": "^1.14.4", - "prop-types": "^15.6.1", - "typed-styles": "^0.0.7", - "warning": "^4.0.2" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jose": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.28.1.tgz", + "integrity": "sha512-6JK28rFu5ENp/yxMwM+iN7YeaInnY9B9Bggjkz5fuwLiJhbVrl2O4SJr65bdNBPl9y27fdC3Mymh+FVCvozLIg==", + "requires": { + "@panva/asn1.js": "^1.0.0" + } + }, + "jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "dev": true + }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsrsasign": { + "version": "8.0.24", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.24.tgz", + "integrity": "sha512-u45jAyusqUpyGbFc2IbHoeE4rSkoBWQgLe/w99temHenX+GyCz4nflU5sjK7ajU1ffZTezl6le7u43Yjr/lkQg==" + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "kareem": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + }, + "keyboard-key": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", + "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "marked": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "dev": true + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" + }, + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "requires": { + "mime-db": "1.47.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "mongodb": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", + "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.12.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.3.tgz", + "integrity": "sha512-frsSR9yeldaRpSUeTegXCSB0Tu5UGq8sHuHBuEV31Jk3COyxlKFQPL7UsdMhxPUCmk74FpOYSmNwxhWBEqgzQg==", + "requires": { + "@types/mongodb": "^3.5.27", + "bson": "^1.1.4", + "kareem": "2.3.2", + "mongodb": "3.6.5", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.8.3", + "mquery": "3.2.5", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.2.1", + "sift": "7.0.1", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", + "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" + }, + "mquery": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", + "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "optional": true + }, + "nano": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.3.tgz", + "integrity": "sha512-nubyTQeZ/p+xf3ZFFMd7WrZwpcy9tUDrbaXw9HFBsM6zBY5gXspvOjvG2Zz3emT6nfJtP/h7F2/ESfsVVXnuMw==", + "requires": { + "@types/request": "^2.48.4", + "cloudant-follow": "^0.18.2", + "debug": "^4.1.1", + "errs": "^0.3.2", + "request": "^2.88.0" + } + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nise": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, + "node-jose": { + "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", + "from": "git+https://github.com/cisco/node-jose.git", + "requires": { + "base64url": "^3.0.1", + "buffer": "^5.5.0", + "es6-promise": "^4.2.8", + "lodash": "^4.17.15", + "long": "^4.0.0", + "node-forge": "^0.10.0", + "pako": "^1.0.11", + "process": "^0.11.10", + "uuid": "^3.3.3" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optional": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "dev": true + }, + "pkcs11js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.2.2.tgz", + "integrity": "sha512-xZYdI3qOfOQhSl4j79iR+8Yj3ZkwlILkIfpJkhWPLDP00DyT0aiPOVTh8tt8vgda0GrSjyJza3GFjFyRdV+eFg==", + "optional": true, + "requires": { + "nan": "^2.14.2" + } + }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-settle": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", + "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=" + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "protobufjs": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", + "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "react-popper": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.11.tgz", + "integrity": "sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@hypnosphi/create-react-context": "^0.3.1", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" + }, + "semantic-ui-react": { + "version": "0.88.2", + "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", + "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@semantic-ui-react/event-stack": "^3.1.0", + "@stardust-ui/react-component-event-listener": "~0.38.0", + "@stardust-ui/react-component-ref": "~0.38.0", + "classnames": "^2.2.6", + "keyboard-key": "^1.0.4", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-is": "^16.8.6", + "react-popper": "^1.3.4", + "shallowequal": "^1.1.0" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "secure-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", - "optional": true - }, - "semantic-ui-react": { - "version": "0.88.2", - "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", - "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "@semantic-ui-react/event-stack": "^3.1.0", - "@stardust-ui/react-component-event-listener": "~0.38.0", - "@stardust-ui/react-component-ref": "~0.38.0", - "classnames": "^2.2.6", - "keyboard-key": "^1.0.4", - "lodash": "^4.17.15", - "prop-types": "^15.7.2", - "react-is": "^16.8.6", - "react-popper": "^1.3.4", - "shallowequal": "^1.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "sift": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", - "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" - }, - "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.2", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "shamirs-secret-sharing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/shamirs-secret-sharing/-/shamirs-secret-sharing-1.0.1.tgz", + "integrity": "sha512-+sbTZJfis6EtDZTgkf0gSUahXDDuFRY8GK0DUw0lXqMDN54a5ywLD6D2sab45AA2SLQxTS4gB0kUmelNVaPVlA==" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, + "sinon": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "sjcl": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "sjcl": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", - "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=", - "optional": true - }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "terminal-table": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", - "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", - "dev": true, - "requires": { - "colors": "^1.0.3", - "eastasianwidth": "^0.1.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "optional": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "ts-lib-utils": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.7.2.tgz", - "integrity": "sha512-SBOsyeNB8ECoSQkwgYaecn2yVIY7WCFkcfzXIu0iGyg6gCC5bXGr+jwBbDVnUjAfN0MOI3J66gVLdnv/GYak3g==", - "dev": true, - "requires": { - "glob": "7", - "tslib": "1 || 2" - } - }, - "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } - } - }, - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", - "dev": true - }, - "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terminal-table": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", + "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", + "dev": true, + "requires": { + "colors": "^1.0.3", + "eastasianwidth": "^0.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-coverage-core": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.8.3.tgz", - "integrity": "sha512-Go4QSExs0kGcW9yxvIAv4XSAuIC89cAbdb9Qqj/XdqcYoT2X3fB6x+2jwYwE/opbgrAHijh23TT/C6w9VEj6rw==", - "dev": true, - "requires": { - "minimatch": "3", - "ts-lib-utils": "^2.7.2", - "tslib": "1 || 2", - "tsutils": "3" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "typed-styles": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", - "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", - "dev": true - }, - "typedoc": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", - "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", - "dev": true, - "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.7.2", - "highlight.js": "^9.17.1", - "lodash": "^4.17.15", - "marked": "^0.8.0", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.7.2", - "typescript": "3.7.x" - }, - "dependencies": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-coverage-core": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.17.2.tgz", + "integrity": "sha512-J+kKjdJIJetfXkpl1Fg5CFzx09xmFX3aID5w3KJh/RmFSdT05APdPhGxTPMpSSbqNlcDVVnGcVm1LvDZNrlE7A==", + "dev": true, + "requires": { + "fast-glob": "3", + "minimatch": "3", + "tslib": "1 || 2", + "tsutils": "3" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", + "dev": true + }, + "typedoc": { + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", + "dev": true, + "requires": { + "@types/minimatch": "3.0.3", + "fs-extra": "^8.1.0", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", + "lodash": "^4.17.15", + "marked": "^0.8.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" + }, + "dependencies": { + "typescript": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.7.tgz", + "integrity": "sha512-MmQdgo/XenfZPvVLtKZOq9jQQvzaUAUpcKW8Z43x9B2fOm4S5g//tPtMweZUIP+SoBqrVPEIm+dJeQ9dfO0QdA==", + "dev": true + } + } + }, + "typedoc-default-themes": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.8", + "underscore": "^1.9.1" + } + }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", - "dev": true - } - } - }, - "typedoc-default-themes": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", - "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", - "dev": true, - "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" - } - }, - "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", - "dev": true - }, - "typescript-coverage-report": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", - "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", - "dev": true, - "requires": { - "colors": "^1.4.0", - "commander": "^5.0.0", - "ncp": "^2.0.0", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "rimraf": "^3.0.2", - "semantic-ui-react": "^0.88.2", - "terminal-table": "^0.0.12", - "type-coverage-core": "^2.4.1", - "typescript": "^3.8.3" - }, - "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - } - } - }, - "uglify-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", - "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", - "dev": true, - "optional": true - }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "optional": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "optional": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", - "optional": true - }, - "winston": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", - "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", - "optional": true, - "requires": { - "async": "~1.0.0", - "colors": "1.0.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", - "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", - "optional": true - } - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "optional": true - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "optional": true, - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "typescript-coverage-report": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", + "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", + "dev": true, + "requires": { + "colors": "^1.4.0", + "commander": "^5.0.0", + "ncp": "^2.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "rimraf": "^3.0.2", + "semantic-ui-react": "^0.88.2", + "terminal-table": "^0.0.12", + "type-coverage-core": "^2.4.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + } + } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "uglify-js": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "dev": true, + "optional": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "underscore": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.0.tgz", + "integrity": "sha512-sCs4H3pCytsb5K7i072FAEC9YlSYFIbosvM0tAKAlpSSUgD7yC1iXSEGdl5XrDKQ1YUB+p/HDzYrSG2H2Vl36g==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "winston": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" + } + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } } diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json old mode 100644 new mode 100755 index 363789e2..38c433d1 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -26,15 +26,16 @@ "dependencies": { "@types/mongoose": "^5.7.14", "@types/node": "^13.7.1", - "axios": "^0.21.1", "crypto-js": "^4.0.0", + "fabric-ca-client": "2.2.5", + "fabric-network": "v2.2.5", "fs": "0.0.1-security", "jose": "^1.22.1", "mongoose": "^5.10.13", - "node": "^13.12.0", "node-jose": "git+https://github.com/cisco/node-jose.git", "optional": "^0.1.4", - "path": "^0.12.7" + "path": "^0.12.7", + "shamirs-secret-sharing": "1.0.1" }, "devDependencies": { "@types/chai": "^4.2.11", @@ -51,8 +52,5 @@ "typescript": "^3.8.3", "typescript-coverage-report": "^0.1.3" }, - "optionalDependencies": { - "fabric-ca-client": "2.1.0", - "fabric-network": "v2.1.0" - } -} \ No newline at end of file + "optionalDependencies": {} +} diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index 29820c06..b69d32e5 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -5,9 +5,12 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {JWK, JWS} from "node-jose"; +import { + JWK, + JWS +} from "node-jose"; import crypto from "crypto-js"; -import { Console } from "console"; +const sss = require('shamirs-secret-sharing'); @@ -22,6 +25,9 @@ export class DID { public unlockTimestamp: any; public tempPrivKey: string; public networkID: string; + public recoveryKey: string; + + // TODO: Default parameters for now: // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. @@ -43,24 +49,51 @@ export class DID { this.unlockedKey = null; this.unlockTimestamp = 0; this.networkID = ""; + this.recoveryKey = ""; + } // TODO: Can we do this more efficiently? - private async keyGeneration(): Promise { + private async keyGeneration(): Promise < JWK.Key > { switch (this.type) { case "RSA": - return JWK.createKey("RSA", 2048, {alg: ""}); + return JWK.createKey("RSA", 2048, { + alg: "" + }); case "EC": - return JWK.createKey("EC", "P-521", {alg: ""}); + return JWK.createKey("EC", "P-521", { + alg: "" + }); case "oct": - return JWK.createKey("oct", 256, {alg: ""}); + return JWK.createKey("oct", 256, { + alg: "" + }); default: throw new Error("Key algorithm not supported"); } } + + + public async createKeySSS(shares: number = 1, threshold: number = 1) { + // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { + let key = await this.keyGeneration(); + let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); + this.id = `did:vtn:trustid:${addr}`; + this.pubkey = key.toPEM(); + let pk = key.toPEM(true); + const secret = Buffer.from(pk) + const secrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return secrets + } + } public async createKey(passphrase: string = "") { // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { let key = await this.keyGeneration(); let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); @@ -71,7 +104,7 @@ export class DID { } } - public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { + public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise < DID > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); @@ -84,14 +117,41 @@ export class DID { throw new Error("Private key couldn't be deciphered"); } } - public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { + public async updatePassword(oldPassphrase: string = "", passphrase: string = ""): Promise < DID > { + try { + + const pem = crypto.AES.decrypt(this.privkey, oldPassphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(this.unlockedKey.toPEM(true), passphrase).toString(); + return this + } catch { + throw new Error("Private key couldn't be deciphered"); + } + } + + + public async unlockAccountSSS(secrets: string[], timeout: number = 30): Promise < DID > { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = sss.combine(secrets).toString(); + this.unlockedKey = await JWK.asKey(pem, "pem"); + return this + } catch (err) { + throw new Error(err); + } + } + + + + + public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise < void > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase); const parsed = pem.toString(crypto.enc.Utf8); this.unlockedKey = await JWK.asKey(parsed, "pem"); return - } catch (err){ + } catch (err) { throw err; } } @@ -100,8 +160,62 @@ export class DID { this.unlockedKey = undefined; } + public async generateRecoveryKey(password: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccount(password); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccountTemp(passwordTemp); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + + + /* el nuevo */ + public async recoverKey(secrets: Buffer[], newPassword: string): Promise < DID > { + // Only createKey for DID if not already created. + try { + const pem = sss.combine(secrets); + const unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(unlockedKey.toPEM(true), newPassword).toString(); + return this; + } catch (err) { + throw err; + } + } public loadFromObject(obj: any): void { - let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp, networkID } = obj; + let { + id, + type, + controller, + access, + pubkey, + privkey, + tempPrivKey, + unlockTimestamp, + networkID + } = obj; this.id = id; this.type = type; this.controller = controller; @@ -125,48 +239,69 @@ export class DID { } public importDID(obj: any) { - const fieldsMandatory = ["pubkey", "privkey"] - if(obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')){ + if (obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')) { const did = new DID(); did.loadFromObject(obj); let addr = crypto.SHA256(obj.pubkey.toString(crypto.enc.Hex)); this.id = `did:vtn:trustid:${addr}`; - - } - else{ + + } else { throw new Error("Field pubkey or privkey is missing"); } - + } /** sign Generates a JWS from a payload using an id from the wallet */ - public async sign(payload: object): Promise { - try{ - if (!this.unlockedKey) { - throw Error("You must unlock the account before signing the message."); - } - var buf = Buffer.from(JSON.stringify(payload)); - let sign = await JWS.createSign( - { - fields: {cty: "jwk+json"}, - format: "compact", - }, - this.unlockedKey - ) - .update(buf) - .final(); - - return sign.toString(); - } - catch(err) { - throw err; - } + public async sign(payload: object): Promise < string > { + try { + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + var buf = Buffer.from(JSON.stringify(payload)); + let sign = await JWS.createSign({ + fields: { + cty: "jwk+json" + }, + format: "compact", + }, + this.unlockedKey + ) + .update(buf) + .final(); + + return sign.toString(); + } catch (err) { + throw err; + } } /** verify Verifies a JWS from a payload using a did */ - public async verify(signature: string, did: DID): Promise { + public async verify(signature: string, did: DID): Promise < any > { let pk = await JWK.asKey(did.pubkey, "pem"); let verify = await JWS.createVerify(pk).verify(signature); return JSON.parse(verify.payload.toString()); } + + public generateRandomKey(): string { + const words = crypto.lib.WordArray.random(32); + return words.toString(); + } + + public cipherChunkSSS(password: string, share: Buffer): string { + // Only createKey for DID if not already created. + try { + return crypto.AES.encrypt(share.toString('hex'), password).toString(); + } catch (err) { + throw err; + } + } + public decipherChunkSSS(password: string, cipheredShare: string): Buffer { + // Only createKey for DID if not already created. + try { + const decipheredShare = crypto.AES.decrypt(cipheredShare, password).toString(crypto.enc.Utf8) + return Buffer.from(decipheredShare, 'hex'); + } catch (err) { + throw err; + } + } } \ No newline at end of file diff --git a/trustid-sdk/src/keystores/mongoKeystore.ts b/trustid-sdk/src/keystores/mongoKeystore.ts index d05c62fa..65375de4 100644 --- a/trustid-sdk/src/keystores/mongoKeystore.ts +++ b/trustid-sdk/src/keystores/mongoKeystore.ts @@ -78,7 +78,6 @@ export class MongoKeystore extends Keystore { try { // Store DID in Mongo. Modify if it exists, create if it doesn't const didObj = await DIDModel.findOne({ id: did.id }); - console.log(didObj) if(!didObj){ await DIDModel.create(did); return true; @@ -97,10 +96,9 @@ export class MongoKeystore extends Keystore { public async updateDID(did: DID): Promise { try { // Store DID in Mongo. Modify if it exists, create if it doesn't - console.log(did.tempPrivKey) const didObj = await DIDModel.updateOne( {id: did.id }, - {tempPrivKey: did.tempPrivKey }, + did, ); this.keystore[did.id] = did // update in memory keystore return true; diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts index fe3fe512..da443b56 100644 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -53,6 +53,7 @@ export class Wallet { this.keystore = keystore; } + /** generateDID generates a new DID in the wallet */ /** generateDID generates a new DID in the wallet */ public async generateDID(type: string, controller: string = "default", passphrase: string = ""): Promise { const value: DID = new DID(type, controller); @@ -61,12 +62,40 @@ export class Wallet { return value; } + /** generateDID generates a new DID in the wallet */ + public async generateDIDwithSSS(type: string, controller: string = "default", shares: number = 3, threshold: number = 1): Promise { + const value: DID = new DID(type, controller); + const secrets = await value.createKeySSS(shares, threshold); + await this.keystore.storeDID(value); + const did = { + did: value, + secrets: secrets + } + return did; + } + + /** Recovers the keyt */ + public async recoverKeySSS(id: string, secrets: Buffer[], newPassword: string): Promise{ + const did = await this.getDID(id) + const recoveredDID = await did.recoverKey(secrets, newPassword); + await this.keystore.updateDID(recoveredDID) + return; + } + /** updateTempKeyDID updates the temp key for a DID */ public async updateTempKeyDID(id: string, passphrase: string = "",tempPassphrase: string=""): Promise { const did = await this.keystore.getDID(id); const unlockedDID = await did.unlockAccount(passphrase, tempPassphrase) await this.keystore.updateDID(unlockedDID) } + + public async updatePassword(id: string, oldPassphrase: string = "",passphrase: string=""): Promise { + const did = await this.keystore.getDID(id); + const unlockedDID = await did.updatePassword(oldPassphrase, passphrase); + await this.keystore.updateDID(unlockedDID) + } + + /** Set the Keystore to use in the wallet. */ public addNetwork(id: string, network: TrustID): void { this.networks[id] = network; diff --git a/trustid-sdk/test/unit/wallet.spec.ts b/trustid-sdk/test/unit/wallet.spec.ts index 049f2620..fd2bfc25 100644 --- a/trustid-sdk/test/unit/wallet.spec.ts +++ b/trustid-sdk/test/unit/wallet.spec.ts @@ -173,6 +173,35 @@ describe('Wallet tests', () => { }); - + + it('Create did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + expect(obj.secrets.length).to.equal(3); + } catch(err) { + // expect(err).to.be.an('error'); + } + }) + + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + console.log(err) + // expect(err).to.be.an('error'); + } + }) + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 3); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + expect(err).to.be.an('error'); + } + }) + }); From 20b30398f9707d9f2823219ef1f3abbfc3c86895 Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Date: Thu, 15 Apr 2021 15:42:21 +0200 Subject: [PATCH 20/25] added recovery functions Signed-off-by: Maria Teresa Nieto --- trustid-sdk/README.md | 162 - trustid-sdk/examples/keystore | 0 trustid-sdk/package-lock.json | 6268 ++++++++++---------- trustid-sdk/package.json | 14 +- trustid-sdk/src/core/did.ts | 211 +- trustid-sdk/src/keystores/mongoKeystore.ts | 4 +- trustid-sdk/src/wallet.ts | 29 + trustid-sdk/test/unit/wallet.spec.ts | 31 +- 8 files changed, 3372 insertions(+), 3347 deletions(-) delete mode 100644 trustid-sdk/README.md create mode 100644 trustid-sdk/examples/keystore mode change 100644 => 100755 trustid-sdk/package.json diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md deleted file mode 100644 index 28de218d..00000000 --- a/trustid-sdk/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# TRUSTID SDK - - -This SDK exposes all the functionalities required to interact with -TRUSTID-based DLT networks. - -### Install -* To install this library you need access to the private repo: -``` -$ npm install @hyperledger-labs/trustid-sdk@1.0.0 - -``` - -### Getting started - -To use the sdk it's necessary to read the [Getting started guide](../README.md) - -The SDK to connect with Hyperledger Fabric will need to configure the connection. On one side we need the hyperledger fabric standard [connection profile](./connection-profile.json), on the othe side we will need to complete de following configuration in a JSON object. -```js -{ - stateStore: '', - caURL: '', - caName: '', - caAdmin: '', - caPassword: '', - tlsOptions: { - trustedRoots:"", - verify: false - }, - mspId: '', - walletID: '', - asLocalhost: , - ccp: connection profile commented bellow, - chaincodeName: "name of the identity chaincode deployed", - fcn: "proxy", - channel: "" -} - -``` - -### Example of use -You can find a set of examples using the SDK in the [examples](../examples) directory. - -```js -// Use library -var id = require('trustid-sdk') -import { TrustIdHf, Keystore, FileKeystore } from 'trustid-sdk'; -import {AccessPolicy, PolicyType} from 'trustid-sdk'; - -// Initialize wallet -wal = id.Wallet.Instance; - -// Create Keystore -ks = new FileKeystore(); -// Set keystore in wallet -wal.setKeystore(ks) -// LoadKeystore from file - wal.loadKeystore('file', './keystore') -// Set endpoint of driver and store in variable to use it. -let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); -let config = { - stateStore: '/tmp/statestore', - caURL: 'https://ca.org1.telefonica.com:7054', - caName: 'ca.org1.telefonica.com', - caAdmin: 'adminCA', - caPassword: 'adminpw', - tlsOptions: { - trustedRoots:"-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false - }, - mspId: 'org1MSP', - walletID: 'admin', - asLocalhost: true, - ccp: ccp, - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel" -} - -const trustID = new TrustIdHf(config); -wal.addNetwork("hf", trustID); -await wal.networks["hf"].configureDriver(); - -// Use the wallet and the driver -wal.generateDID("RSA") -await wal.networks["hf"].createIdentity(wal.getDID("default")) -await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); - -let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; - -await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", access, "mychannel"); - -``` - -### Structure -The library has the following modules: - -* `wallet.ts`: Core module of the library. It wraps all the state and -logic for identity management and interaction with TRUSTID networks. -To start using the SDK a new wallet needs to be initialized. A wallet -exposes the following methods: - * `public setKeystore(keystore: Keystore): void`: - * `public generateDID(type: string, controller: string = "default", passphrase: string = ""): DID` - - And stores the following information: - -* `class DID`: Has the following structure. - * `public id: string`: Id string that identifies the DID. - * `public pubkey: string`: PublicKey of the DID. - * `public type: string`: Key type (RSA / EC / OKP). - * `public controller: string`: Verifier of the identity - * `public access: number`: Access level. This is the access level to be checked in the service AccessPolicy threshold. - * `private privkey: string`: Private Key of the DID. - - And exposes the following functions: - * `public unlockAccount(passphrase: string = ""): void`: Unlocks private key in order to use the DID. - * `public lockAccount(): any`: Locks the private key for a DID. - * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. - * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. - -* `trustInterface.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is -the `hfdriver.ts` enabling the interaction with Hyperledger Fabric TrustID -networks. - - * `setEndpoint(endpoint: string): void`: Sets the network endpoint to interact with the TRUSTID network. - * `createIdentity(did: DID): Promise`: Create an identity in TrustID. It generates a new DID in the wallet and register it in the network. - * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. - * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. - * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. - * `createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise`: Creates a new service in the TrustID network. - * `updateService(did: DID, serviceDID: string, name: string, channel: string): Promise`: Updates the information from a service. - * `updateServiceAccess(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the access from a service. - * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. - * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. - * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network - * `PolicyType (policy: PolicyType, threshold:?Number, registry:?object)`: It - defined the policyType to be used for a service. There are currently three - types of policyTypes supported (more could be easily added according to - your needs) - * PublicPolicy: Grants public access by any user to your service. - * SameControllerPolicy: Only verified identities whose controller is the - same controller who created the service has access to the service (this - policy comes pretty handy when you want to define "corporate-wide" services). - * FineGrainedPolicy: Grants fine-grained access to users to your service. - In this policy you explicitly define the access of users to the service. - There are two ways of using this policyType, you can define a threshold - so every user with an access level equal or higher than the threshold - is granted access to the service; or you could use fine-grained - access levels defined in the registry, where you would add the following - tuple: `{, }`. Thus, only users in the registry - with an access level over the threshold will be granted access to the - service with `access_role` permissions. - -* `keystore.ts`: Interface that enables the implementation of keystore storages. - There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). - - * `abstract getDID(id: string): DID`: Get specific DID from keystore. - * `abstract storeDID(did: DID): boolean`: Store DID in keystore. - * `public storeInMemory(did: DID): boolean`: Store DID inMemory for easy and performant use. - * `public listDID(): string[]`: List DIDs in memory. - * `public setDefault(did: DID): boolean`: Set DID as default identity for the keystore wallet. - diff --git a/trustid-sdk/examples/keystore b/trustid-sdk/examples/keystore new file mode 100644 index 00000000..e69de29b diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index cd97c7ed..94d7820d 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1,3173 +1,3171 @@ { - "name": "coren-id-sdk", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/runtime": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", - "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@grpc/grpc-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", - "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", - "optional": true, - "requires": { - "semver": "^6.2.0" - } - }, - "@grpc/proto-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", - "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", - "optional": true, - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@panva/asn1.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", - "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", - "optional": true - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "optional": true - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "optional": true - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", - "optional": true - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", - "optional": true - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", - "optional": true - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", - "optional": true - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", - "optional": true - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", - "optional": true - }, - "@semantic-ui-react/event-stack": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz", - "integrity": "sha512-SA7VOu/tY3OkooR++mm9voeQrJpYXjJaMHO1aFCcSouS2xhqMR9Gnz0LEGLOR0h9ueWPBKaQzKIrx3FTTJZmUQ==", - "dev": true, - "requires": { - "exenv": "^1.2.2", - "prop-types": "^15.6.2" - } - }, - "@sinonjs/commons": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", - "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, - "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@stardust-ui/react-component-event-listener": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", - "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2" - } - }, - "@stardust-ui/react-component-ref": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", - "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2", - "react-is": "^16.6.3" - } - }, - "@types/bson": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", - "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", - "requires": { - "@types/node": "*" - } - }, - "@types/caseless": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", - "optional": true - }, - "@types/chai": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", - "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", - "dev": true - }, - "@types/crypto-js": { - "version": "3.1.47", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", - "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", - "dev": true - }, - "@types/jwk-to-pem": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", - "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", - "dev": true - }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", - "optional": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mocha": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", - "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", - "dev": true - }, - "@types/mongodb": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.25.tgz", - "integrity": "sha512-2H/Owt+pHCl9YmBOYnXc3VdnxejJEjVdH+QCWL5ZAfPehEn3evygKBX3/vKRv7aTwfNbUd0E5vjJdQklH/9a6w==", - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, - "@types/mongoose": { - "version": "5.7.29", - "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.29.tgz", - "integrity": "sha512-+7u1akCerciZ2MG66p6Vy+9Tg7dYcgSeNbDInxdOA5vB5xAZhNiIBj8HESnJmIqOBcWxQ90HpaPWtEwggBqXug==", - "requires": { - "@types/mongodb": "*", - "@types/node": "*" - } - }, - "@types/node": { - "version": "13.13.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.12.tgz", - "integrity": "sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw==" - }, - "@types/node-jose": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.4.tgz", - "integrity": "sha512-qdCc4utrY71TF8Ghm+uW92EAZU9PW3kok4yvEbdFT/GRZ5VvsU3NuZH59mxfOFBtdsHiLjWjOsXlVSPC3z6cJw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/request": { - "version": "2.48.5", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", - "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", - "optional": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "@types/sinon": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", - "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", - "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", - "dev": true - }, - "@types/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", - "optional": true - }, - "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", - "optional": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "optional": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "optional": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "optional": true - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", - "optional": true - }, - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", - "dev": true, - "requires": { - "underscore": ">=1.8.3" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "optional": true - }, - "browser-request": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "optional": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "bson": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", - "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "optional": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "optional": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "cloudant-follow": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", - "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", - "optional": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "name": "coren-id-sdk", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", + "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-react-context": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", - "integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==", - "dev": true, - "requires": { - "gud": "^1.0.0", - "warning": "^4.0.3" - } - }, - "crypto-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", - "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", - "optional": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "optional": true - }, - "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "eastasianwidth": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", - "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "errs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "optional": true - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "optional": true - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", - "optional": true - }, - "fabric-ca-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", - "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", - "optional": true, - "requires": { - "fabric-common": "^2.1.1", - "jsrsasign": "^7.2.2", - "url": "^0.11.0", - "util": "^0.10.3", - "winston": "^2.4.0" - } - }, - "fabric-common": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.1.tgz", - "integrity": "sha512-IwkOTB/jJIm2aOfJaYFirCYrorIb8TvW7lvU65b/CGwpXK1GuFWYOYCZa+SXggl9z4ZoADDrIYTZ76BAaFIDKQ==", - "optional": true, - "requires": { - "callsite": "^1.0.0", - "elliptic": "^6.5.2", - "fabric-protos": "2.1.1", - "js-sha3": "^0.7.0", - "jsrsasign": "^8.0.15", - "nconf": "^0.10.0", - "pkcs11js": "^1.0.6", - "promise-settle": "^0.3.0", - "sjcl": "1.0.7", - "winston": "^2.4.0", - "yn": "^3.1.0" - }, - "dependencies": { - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-network": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.1.0.tgz", - "integrity": "sha512-9VqUvYX2fROleTl1sKIx51EhLDfhDxDMHIgafRvicBFJKYAeQ6nyKWmk3gZIlGxmB2LjpIV+WzwR5Z2PiNI03w==", - "optional": true, - "requires": { - "fabric-ca-client": "^2.1.1", - "fabric-common": "^2.1.1", - "fs-extra": "^8.1.0", - "long": "^4.0.0", - "nano": "^8.1.0", - "winston": "^2.4.0" - }, - "dependencies": { - "fabric-ca-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.1.tgz", - "integrity": "sha512-TcX/frTOun76DPh3FcKQ3kCue1K2CK00H43ZGBqIQGqtF42pDeNRqDSrAbvYTujg9lzKVLRZl2k0h4m/oP2UaQ==", - "optional": true, - "requires": { - "fabric-common": "2.1.1", - "jsrsasign": "^8.0.15", - "url": "^0.11.0", - "winston": "^2.4.0" - } + "@grpc/grpc-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", + "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", + "requires": { + "semver": "^6.2.0" + } + }, + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", + "requires": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + } + }, + "@hypnosphi/create-react-context": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz", + "integrity": "sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==", + "dev": true, + "requires": { + "gud": "^1.0.0", + "warning": "^4.0.3" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@panva/asn1.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", + "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@semantic-ui-react/event-stack": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.2.tgz", + "integrity": "sha512-Yd0Qf7lPCIjzJ9bZYfurlNu2RDXT6KKSyubHfYK3WjRauhxCsq6Fk2LMRI9DEvShoEU+AsLSv3NGkqXAcVp0zg==", + "dev": true, + "requires": { + "exenv": "^1.2.2", + "prop-types": "^15.6.2" + } + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@stardust-ui/react-component-event-listener": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", + "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2" + } + }, + "@stardust-ui/react-component-ref": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", + "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.6.3" + } + }, + "@types/bson": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", + "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", + "requires": { + "@types/node": "*" + } + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + }, + "@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, + "@types/crypto-js": { + "version": "3.1.47", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", + "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", + "dev": true + }, + "@types/jwk-to-pem": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", + "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", + "dev": true + }, + "@types/long": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", + "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mocha": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", + "dev": true + }, + "@types/mongodb": { + "version": "3.6.12", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.12.tgz", + "integrity": "sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, + "@types/mongoose": { + "version": "5.10.4", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.10.4.tgz", + "integrity": "sha512-U7fNDcTcdaSGzQ3+mlSBeebiYr6eaacJi330LTLOEh8Sm6mXfuec70ag/UXkL+alFm7pfAjFqfc7jEaJEJvAHQ==", + "requires": { + "@types/mongodb": "*", + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.13.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.49.tgz", + "integrity": "sha512-v5fPzKjPAZ33/G4X8EXvGlbHFKQClfKAz1bKF/+cKaWss9lAIqrOETfcFNL3xG+DG2VCEev+dK4/lCa+YZaxBA==" + }, + "@types/node-jose": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.5.tgz", + "integrity": "sha512-fScnd7GdaHC31PYouWR0xYSOXQLrmxPhLM92CYlVy4UetSwis2u5e6khMazj1Xyidt8zPeRU0PHLmI+mpamhGQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "@types/sinon": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", + "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", + "integrity": "sha512-dIPoZ3g5gcx9zZEszaxLSVTvMReD3xxyyDnQUjA6IYDG9Ba2AV0otMPs+77sG9ojB4Qr2N2Vk5RnKeuA0X/0bg==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true }, - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-protos": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.1.tgz", - "integrity": "sha512-ENki8xgRQqxd/qe0EVvNlr7k2LmEOMqGrrw22+ufY/sAE8OyFXpQa3+1J9wErzN+cASt2t/DuCaIIKURPJrFRg==", - "optional": true, - "requires": { - "@grpc/grpc-js": "1.0.3", - "@grpc/proto-loader": "0.5.4", - "lodash.clone": "4.5.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "optional": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "optional": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "follow-redirects": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true - }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gud": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", - "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", - "dev": true - }, - "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "optional": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "optional": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "optional": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "optional": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "optional": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "optional": true - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true - }, - "jose": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.1.tgz", - "integrity": "sha512-VyHM6IJPw0TTGqHVNlPWg16/ASDPAmcChcLqSb3WNBvwWFoWPeFqlmAUCm8/oIG1GjZwAlUDuRKFfycowarcVA==", - "requires": { - "@panva/asn1.js": "^1.0.0" - } - }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", - "dev": true - }, - "js-sha3": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", - "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==", - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "optional": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "optional": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "optional": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jsrsasign": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", - "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=", - "optional": true - }, - "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", - "dev": true - }, - "kareem": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", - "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" - }, - "keyboard-key": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", - "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "optional": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "optional": true - }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", - "optional": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", - "dev": true - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "optional": true - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "optional": true, - "requires": { - "mime-db": "1.44.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "optional": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", + "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "cloudant-follow": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", + "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", + "requires": { + "browser-request": "~0.3.0", + "debug": "^4.0.1", + "request": "^2.88.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", + "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "errs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=" + }, + "es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fabric-ca-client": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.2.5.tgz", + "integrity": "sha512-wjXNHkQ2mFznmeleqq/FzUqCojMhUOyzmAMV12spIuW03tyPIq5A9/eDCGjeAu8+8WYBYSKmAx95pO3PeBeKSg==", + "requires": { + "fabric-common": "2.2.5", + "jsrsasign": "^8.0.20", + "url": "^0.11.0", + "winston": "^2.4.0" + } + }, + "fabric-common": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.2.5.tgz", + "integrity": "sha512-nAnga2klnAsyzzPlOwxW8kjKBFWqhAH/P3c987RCjh95h/C1lA0VksjyeMhmRmoo6wxFE5MHv/vY2FVh0gwNCw==", + "requires": { + "callsite": "^1.0.0", + "elliptic": "^6.5.3", + "fabric-protos": "2.2.5", + "js-sha3": "^0.7.0", + "jsrsasign": "^8.0.20", + "long": "^4.0.0", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" + } + }, + "fabric-network": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.2.5.tgz", + "integrity": "sha512-NGMwMiZ93hW4R5yimZo1CvjdPs9mRjYR3/fh6xpjTvQZhVsJvHxggRKa+HhkySr4FJGJ52raQ/Nj3DsOxd4XTg==", + "requires": { + "fabric-common": "2.2.5", + "fabric-protos": "2.2.5", + "long": "^4.0.0", + "nano": "^8.2.2" + } + }, + "fabric-protos": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.2.5.tgz", + "integrity": "sha512-5ylljqycb4621jOFFAkwJxfzfhUbf5ovddb/RpDO8MgrPO+ZIqI5lU7Lc+jPtl29Xa3rxK94MctkVoRejgz5Tg==", + "requires": { + "@grpc/grpc-js": "1.0.3", + "@grpc/proto-loader": "0.5.4", + "protobufjs": "^6.9.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - } - } - }, - "mongodb": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", - "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.10.13.tgz", - "integrity": "sha512-lvZzTj449sVWijY76StOuTKt5oP5kyy70VdM3DMgPpKNqZfkAseHxekmqBbd9YQQDVIgrIYDar9vSlxKqc75MQ==", - "requires": { - "bson": "^1.1.4", - "kareem": "2.3.1", - "mongodb": "3.6.3", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.7.0", - "mquery": "3.2.2", - "ms": "2.1.2", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "7.0.1", - "sliced": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz", - "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==" - }, - "mquery": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", - "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", - "optional": true - }, - "nano": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", - "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", - "optional": true, - "requires": { - "@types/request": "^2.48.4", - "cloudant-follow": "^0.18.2", - "debug": "^4.1.1", - "errs": "^0.3.2", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "nconf": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", - "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", - "optional": true, - "requires": { - "async": "^1.4.0", - "ini": "^1.3.0", - "secure-keys": "^1.0.0", - "yargs": "^3.19.0" - } - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nise": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", - "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/node/-/node-13.14.0.tgz", - "integrity": "sha512-y5pClvPYkG7cTPRDmyNeCuOseyRFuZbrvQVbyAEhkfRWtfhyyu6lHYUjBSJzrSZXlbkCIlx+TKqLDAEhxc9Vkw==", - "requires": { - "node-bin-setup": "^1.0.0" - } - }, - "node-bin-setup": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz", - "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q==" - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, - "node-jose": { - "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", - "from": "git+https://github.com/cisco/node-jose.git", - "requires": { - "base64url": "^3.0.1", - "buffer": "^5.5.0", - "es6-promise": "^4.2.8", - "lodash": "^4.17.15", - "long": "^4.0.0", - "node-forge": "^0.10.0", - "pako": "^1.0.11", - "process": "^0.11.10", - "uuid": "^3.3.3" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", - "dev": true - }, - "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", - "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optional": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", - "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "optional": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", - "requires": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "optional": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pkcs11js": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.21.tgz", - "integrity": "sha512-U+UUXbVqdL3q95zNqi8aGbAg6KcyVkKocKR4QicvoEEO9NVW2podLkaq5hhxLGUi+OOJSL5VBNbUE2EatbeITw==", - "optional": true, - "requires": { - "nan": "^2.14.0" - } - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise-settle": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", - "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=", - "optional": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "protobufjs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", - "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "optional": true - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "optional": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "optional": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "optional": true - }, - "react": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", - "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "react-popper": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz", - "integrity": "sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "create-react-context": "^0.3.0", - "deep-equal": "^1.1.1", - "popper.js": "^1.14.4", - "prop-types": "^15.6.1", - "typed-styles": "^0.0.7", - "warning": "^4.0.2" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jose": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.28.1.tgz", + "integrity": "sha512-6JK28rFu5ENp/yxMwM+iN7YeaInnY9B9Bggjkz5fuwLiJhbVrl2O4SJr65bdNBPl9y27fdC3Mymh+FVCvozLIg==", + "requires": { + "@panva/asn1.js": "^1.0.0" + } + }, + "jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "dev": true + }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsrsasign": { + "version": "8.0.24", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.24.tgz", + "integrity": "sha512-u45jAyusqUpyGbFc2IbHoeE4rSkoBWQgLe/w99temHenX+GyCz4nflU5sjK7ajU1ffZTezl6le7u43Yjr/lkQg==" + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "kareem": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + }, + "keyboard-key": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", + "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "marked": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "dev": true + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" + }, + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "requires": { + "mime-db": "1.47.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "mongodb": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", + "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.12.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.3.tgz", + "integrity": "sha512-frsSR9yeldaRpSUeTegXCSB0Tu5UGq8sHuHBuEV31Jk3COyxlKFQPL7UsdMhxPUCmk74FpOYSmNwxhWBEqgzQg==", + "requires": { + "@types/mongodb": "^3.5.27", + "bson": "^1.1.4", + "kareem": "2.3.2", + "mongodb": "3.6.5", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.8.3", + "mquery": "3.2.5", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.2.1", + "sift": "7.0.1", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", + "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" + }, + "mquery": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", + "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "optional": true + }, + "nano": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.3.tgz", + "integrity": "sha512-nubyTQeZ/p+xf3ZFFMd7WrZwpcy9tUDrbaXw9HFBsM6zBY5gXspvOjvG2Zz3emT6nfJtP/h7F2/ESfsVVXnuMw==", + "requires": { + "@types/request": "^2.48.4", + "cloudant-follow": "^0.18.2", + "debug": "^4.1.1", + "errs": "^0.3.2", + "request": "^2.88.0" + } + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nise": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, + "node-jose": { + "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", + "from": "git+https://github.com/cisco/node-jose.git", + "requires": { + "base64url": "^3.0.1", + "buffer": "^5.5.0", + "es6-promise": "^4.2.8", + "lodash": "^4.17.15", + "long": "^4.0.0", + "node-forge": "^0.10.0", + "pako": "^1.0.11", + "process": "^0.11.10", + "uuid": "^3.3.3" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optional": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "dev": true + }, + "pkcs11js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.2.2.tgz", + "integrity": "sha512-xZYdI3qOfOQhSl4j79iR+8Yj3ZkwlILkIfpJkhWPLDP00DyT0aiPOVTh8tt8vgda0GrSjyJza3GFjFyRdV+eFg==", + "optional": true, + "requires": { + "nan": "^2.14.2" + } + }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-settle": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", + "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=" + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "protobufjs": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", + "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "react-popper": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.11.tgz", + "integrity": "sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@hypnosphi/create-react-context": "^0.3.1", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" + }, + "semantic-ui-react": { + "version": "0.88.2", + "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", + "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@semantic-ui-react/event-stack": "^3.1.0", + "@stardust-ui/react-component-event-listener": "~0.38.0", + "@stardust-ui/react-component-ref": "~0.38.0", + "classnames": "^2.2.6", + "keyboard-key": "^1.0.4", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-is": "^16.8.6", + "react-popper": "^1.3.4", + "shallowequal": "^1.1.0" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "secure-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", - "optional": true - }, - "semantic-ui-react": { - "version": "0.88.2", - "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", - "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "@semantic-ui-react/event-stack": "^3.1.0", - "@stardust-ui/react-component-event-listener": "~0.38.0", - "@stardust-ui/react-component-ref": "~0.38.0", - "classnames": "^2.2.6", - "keyboard-key": "^1.0.4", - "lodash": "^4.17.15", - "prop-types": "^15.7.2", - "react-is": "^16.8.6", - "react-popper": "^1.3.4", - "shallowequal": "^1.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "sift": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", - "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" - }, - "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.2", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "shamirs-secret-sharing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/shamirs-secret-sharing/-/shamirs-secret-sharing-1.0.1.tgz", + "integrity": "sha512-+sbTZJfis6EtDZTgkf0gSUahXDDuFRY8GK0DUw0lXqMDN54a5ywLD6D2sab45AA2SLQxTS4gB0kUmelNVaPVlA==" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, + "sinon": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "sjcl": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "sjcl": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", - "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=", - "optional": true - }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "terminal-table": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", - "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", - "dev": true, - "requires": { - "colors": "^1.0.3", - "eastasianwidth": "^0.1.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "optional": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "ts-lib-utils": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.7.2.tgz", - "integrity": "sha512-SBOsyeNB8ECoSQkwgYaecn2yVIY7WCFkcfzXIu0iGyg6gCC5bXGr+jwBbDVnUjAfN0MOI3J66gVLdnv/GYak3g==", - "dev": true, - "requires": { - "glob": "7", - "tslib": "1 || 2" - } - }, - "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } - } - }, - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", - "dev": true - }, - "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terminal-table": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", + "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", + "dev": true, + "requires": { + "colors": "^1.0.3", + "eastasianwidth": "^0.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-coverage-core": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.8.3.tgz", - "integrity": "sha512-Go4QSExs0kGcW9yxvIAv4XSAuIC89cAbdb9Qqj/XdqcYoT2X3fB6x+2jwYwE/opbgrAHijh23TT/C6w9VEj6rw==", - "dev": true, - "requires": { - "minimatch": "3", - "ts-lib-utils": "^2.7.2", - "tslib": "1 || 2", - "tsutils": "3" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "typed-styles": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", - "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", - "dev": true - }, - "typedoc": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", - "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", - "dev": true, - "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.7.2", - "highlight.js": "^9.17.1", - "lodash": "^4.17.15", - "marked": "^0.8.0", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.7.2", - "typescript": "3.7.x" - }, - "dependencies": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-coverage-core": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.17.2.tgz", + "integrity": "sha512-J+kKjdJIJetfXkpl1Fg5CFzx09xmFX3aID5w3KJh/RmFSdT05APdPhGxTPMpSSbqNlcDVVnGcVm1LvDZNrlE7A==", + "dev": true, + "requires": { + "fast-glob": "3", + "minimatch": "3", + "tslib": "1 || 2", + "tsutils": "3" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", + "dev": true + }, + "typedoc": { + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", + "dev": true, + "requires": { + "@types/minimatch": "3.0.3", + "fs-extra": "^8.1.0", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", + "lodash": "^4.17.15", + "marked": "^0.8.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" + }, + "dependencies": { + "typescript": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.7.tgz", + "integrity": "sha512-MmQdgo/XenfZPvVLtKZOq9jQQvzaUAUpcKW8Z43x9B2fOm4S5g//tPtMweZUIP+SoBqrVPEIm+dJeQ9dfO0QdA==", + "dev": true + } + } + }, + "typedoc-default-themes": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.8", + "underscore": "^1.9.1" + } + }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", - "dev": true - } - } - }, - "typedoc-default-themes": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", - "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", - "dev": true, - "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" - } - }, - "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", - "dev": true - }, - "typescript-coverage-report": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", - "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", - "dev": true, - "requires": { - "colors": "^1.4.0", - "commander": "^5.0.0", - "ncp": "^2.0.0", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "rimraf": "^3.0.2", - "semantic-ui-react": "^0.88.2", - "terminal-table": "^0.0.12", - "type-coverage-core": "^2.4.1", - "typescript": "^3.8.3" - }, - "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - } - } - }, - "uglify-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", - "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", - "dev": true, - "optional": true - }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "optional": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "optional": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", - "optional": true - }, - "winston": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", - "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", - "optional": true, - "requires": { - "async": "~1.0.0", - "colors": "1.0.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", - "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", - "optional": true - } - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "optional": true - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "optional": true, - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "typescript-coverage-report": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", + "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", + "dev": true, + "requires": { + "colors": "^1.4.0", + "commander": "^5.0.0", + "ncp": "^2.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "rimraf": "^3.0.2", + "semantic-ui-react": "^0.88.2", + "terminal-table": "^0.0.12", + "type-coverage-core": "^2.4.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + } + } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "uglify-js": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "dev": true, + "optional": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "underscore": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.0.tgz", + "integrity": "sha512-sCs4H3pCytsb5K7i072FAEC9YlSYFIbosvM0tAKAlpSSUgD7yC1iXSEGdl5XrDKQ1YUB+p/HDzYrSG2H2Vl36g==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "winston": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" + } + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } } diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json old mode 100644 new mode 100755 index 363789e2..38c433d1 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -26,15 +26,16 @@ "dependencies": { "@types/mongoose": "^5.7.14", "@types/node": "^13.7.1", - "axios": "^0.21.1", "crypto-js": "^4.0.0", + "fabric-ca-client": "2.2.5", + "fabric-network": "v2.2.5", "fs": "0.0.1-security", "jose": "^1.22.1", "mongoose": "^5.10.13", - "node": "^13.12.0", "node-jose": "git+https://github.com/cisco/node-jose.git", "optional": "^0.1.4", - "path": "^0.12.7" + "path": "^0.12.7", + "shamirs-secret-sharing": "1.0.1" }, "devDependencies": { "@types/chai": "^4.2.11", @@ -51,8 +52,5 @@ "typescript": "^3.8.3", "typescript-coverage-report": "^0.1.3" }, - "optionalDependencies": { - "fabric-ca-client": "2.1.0", - "fabric-network": "v2.1.0" - } -} \ No newline at end of file + "optionalDependencies": {} +} diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index 29820c06..b69d32e5 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -5,9 +5,12 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {JWK, JWS} from "node-jose"; +import { + JWK, + JWS +} from "node-jose"; import crypto from "crypto-js"; -import { Console } from "console"; +const sss = require('shamirs-secret-sharing'); @@ -22,6 +25,9 @@ export class DID { public unlockTimestamp: any; public tempPrivKey: string; public networkID: string; + public recoveryKey: string; + + // TODO: Default parameters for now: // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. @@ -43,24 +49,51 @@ export class DID { this.unlockedKey = null; this.unlockTimestamp = 0; this.networkID = ""; + this.recoveryKey = ""; + } // TODO: Can we do this more efficiently? - private async keyGeneration(): Promise { + private async keyGeneration(): Promise < JWK.Key > { switch (this.type) { case "RSA": - return JWK.createKey("RSA", 2048, {alg: ""}); + return JWK.createKey("RSA", 2048, { + alg: "" + }); case "EC": - return JWK.createKey("EC", "P-521", {alg: ""}); + return JWK.createKey("EC", "P-521", { + alg: "" + }); case "oct": - return JWK.createKey("oct", 256, {alg: ""}); + return JWK.createKey("oct", 256, { + alg: "" + }); default: throw new Error("Key algorithm not supported"); } } + + + public async createKeySSS(shares: number = 1, threshold: number = 1) { + // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { + let key = await this.keyGeneration(); + let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); + this.id = `did:vtn:trustid:${addr}`; + this.pubkey = key.toPEM(); + let pk = key.toPEM(true); + const secret = Buffer.from(pk) + const secrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return secrets + } + } public async createKey(passphrase: string = "") { // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { let key = await this.keyGeneration(); let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); @@ -71,7 +104,7 @@ export class DID { } } - public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { + public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise < DID > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); @@ -84,14 +117,41 @@ export class DID { throw new Error("Private key couldn't be deciphered"); } } - public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { + public async updatePassword(oldPassphrase: string = "", passphrase: string = ""): Promise < DID > { + try { + + const pem = crypto.AES.decrypt(this.privkey, oldPassphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(this.unlockedKey.toPEM(true), passphrase).toString(); + return this + } catch { + throw new Error("Private key couldn't be deciphered"); + } + } + + + public async unlockAccountSSS(secrets: string[], timeout: number = 30): Promise < DID > { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = sss.combine(secrets).toString(); + this.unlockedKey = await JWK.asKey(pem, "pem"); + return this + } catch (err) { + throw new Error(err); + } + } + + + + + public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise < void > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase); const parsed = pem.toString(crypto.enc.Utf8); this.unlockedKey = await JWK.asKey(parsed, "pem"); return - } catch (err){ + } catch (err) { throw err; } } @@ -100,8 +160,62 @@ export class DID { this.unlockedKey = undefined; } + public async generateRecoveryKey(password: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccount(password); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccountTemp(passwordTemp); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + + + /* el nuevo */ + public async recoverKey(secrets: Buffer[], newPassword: string): Promise < DID > { + // Only createKey for DID if not already created. + try { + const pem = sss.combine(secrets); + const unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(unlockedKey.toPEM(true), newPassword).toString(); + return this; + } catch (err) { + throw err; + } + } public loadFromObject(obj: any): void { - let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp, networkID } = obj; + let { + id, + type, + controller, + access, + pubkey, + privkey, + tempPrivKey, + unlockTimestamp, + networkID + } = obj; this.id = id; this.type = type; this.controller = controller; @@ -125,48 +239,69 @@ export class DID { } public importDID(obj: any) { - const fieldsMandatory = ["pubkey", "privkey"] - if(obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')){ + if (obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')) { const did = new DID(); did.loadFromObject(obj); let addr = crypto.SHA256(obj.pubkey.toString(crypto.enc.Hex)); this.id = `did:vtn:trustid:${addr}`; - - } - else{ + + } else { throw new Error("Field pubkey or privkey is missing"); } - + } /** sign Generates a JWS from a payload using an id from the wallet */ - public async sign(payload: object): Promise { - try{ - if (!this.unlockedKey) { - throw Error("You must unlock the account before signing the message."); - } - var buf = Buffer.from(JSON.stringify(payload)); - let sign = await JWS.createSign( - { - fields: {cty: "jwk+json"}, - format: "compact", - }, - this.unlockedKey - ) - .update(buf) - .final(); - - return sign.toString(); - } - catch(err) { - throw err; - } + public async sign(payload: object): Promise < string > { + try { + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + var buf = Buffer.from(JSON.stringify(payload)); + let sign = await JWS.createSign({ + fields: { + cty: "jwk+json" + }, + format: "compact", + }, + this.unlockedKey + ) + .update(buf) + .final(); + + return sign.toString(); + } catch (err) { + throw err; + } } /** verify Verifies a JWS from a payload using a did */ - public async verify(signature: string, did: DID): Promise { + public async verify(signature: string, did: DID): Promise < any > { let pk = await JWK.asKey(did.pubkey, "pem"); let verify = await JWS.createVerify(pk).verify(signature); return JSON.parse(verify.payload.toString()); } + + public generateRandomKey(): string { + const words = crypto.lib.WordArray.random(32); + return words.toString(); + } + + public cipherChunkSSS(password: string, share: Buffer): string { + // Only createKey for DID if not already created. + try { + return crypto.AES.encrypt(share.toString('hex'), password).toString(); + } catch (err) { + throw err; + } + } + public decipherChunkSSS(password: string, cipheredShare: string): Buffer { + // Only createKey for DID if not already created. + try { + const decipheredShare = crypto.AES.decrypt(cipheredShare, password).toString(crypto.enc.Utf8) + return Buffer.from(decipheredShare, 'hex'); + } catch (err) { + throw err; + } + } } \ No newline at end of file diff --git a/trustid-sdk/src/keystores/mongoKeystore.ts b/trustid-sdk/src/keystores/mongoKeystore.ts index d05c62fa..65375de4 100644 --- a/trustid-sdk/src/keystores/mongoKeystore.ts +++ b/trustid-sdk/src/keystores/mongoKeystore.ts @@ -78,7 +78,6 @@ export class MongoKeystore extends Keystore { try { // Store DID in Mongo. Modify if it exists, create if it doesn't const didObj = await DIDModel.findOne({ id: did.id }); - console.log(didObj) if(!didObj){ await DIDModel.create(did); return true; @@ -97,10 +96,9 @@ export class MongoKeystore extends Keystore { public async updateDID(did: DID): Promise { try { // Store DID in Mongo. Modify if it exists, create if it doesn't - console.log(did.tempPrivKey) const didObj = await DIDModel.updateOne( {id: did.id }, - {tempPrivKey: did.tempPrivKey }, + did, ); this.keystore[did.id] = did // update in memory keystore return true; diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts index fe3fe512..da443b56 100644 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -53,6 +53,7 @@ export class Wallet { this.keystore = keystore; } + /** generateDID generates a new DID in the wallet */ /** generateDID generates a new DID in the wallet */ public async generateDID(type: string, controller: string = "default", passphrase: string = ""): Promise { const value: DID = new DID(type, controller); @@ -61,12 +62,40 @@ export class Wallet { return value; } + /** generateDID generates a new DID in the wallet */ + public async generateDIDwithSSS(type: string, controller: string = "default", shares: number = 3, threshold: number = 1): Promise { + const value: DID = new DID(type, controller); + const secrets = await value.createKeySSS(shares, threshold); + await this.keystore.storeDID(value); + const did = { + did: value, + secrets: secrets + } + return did; + } + + /** Recovers the keyt */ + public async recoverKeySSS(id: string, secrets: Buffer[], newPassword: string): Promise{ + const did = await this.getDID(id) + const recoveredDID = await did.recoverKey(secrets, newPassword); + await this.keystore.updateDID(recoveredDID) + return; + } + /** updateTempKeyDID updates the temp key for a DID */ public async updateTempKeyDID(id: string, passphrase: string = "",tempPassphrase: string=""): Promise { const did = await this.keystore.getDID(id); const unlockedDID = await did.unlockAccount(passphrase, tempPassphrase) await this.keystore.updateDID(unlockedDID) } + + public async updatePassword(id: string, oldPassphrase: string = "",passphrase: string=""): Promise { + const did = await this.keystore.getDID(id); + const unlockedDID = await did.updatePassword(oldPassphrase, passphrase); + await this.keystore.updateDID(unlockedDID) + } + + /** Set the Keystore to use in the wallet. */ public addNetwork(id: string, network: TrustID): void { this.networks[id] = network; diff --git a/trustid-sdk/test/unit/wallet.spec.ts b/trustid-sdk/test/unit/wallet.spec.ts index 049f2620..fd2bfc25 100644 --- a/trustid-sdk/test/unit/wallet.spec.ts +++ b/trustid-sdk/test/unit/wallet.spec.ts @@ -173,6 +173,35 @@ describe('Wallet tests', () => { }); - + + it('Create did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + expect(obj.secrets.length).to.equal(3); + } catch(err) { + // expect(err).to.be.an('error'); + } + }) + + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + console.log(err) + // expect(err).to.be.an('error'); + } + }) + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 3); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + expect(err).to.be.an('error'); + } + }) + }); From 7d20fed9bcb7960bd7b7afcd55643b88f774d250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Thu, 15 Apr 2021 15:43:59 +0200 Subject: [PATCH 21/25] added recovery functions (#35) Signed-off-by: Maria Teresa Nieto --- trustid-sdk/README.md | 162 - trustid-sdk/examples/keystore | 0 trustid-sdk/package-lock.json | 6268 ++++++++++---------- trustid-sdk/package.json | 14 +- trustid-sdk/src/core/did.ts | 211 +- trustid-sdk/src/keystores/mongoKeystore.ts | 4 +- trustid-sdk/src/wallet.ts | 29 + trustid-sdk/test/unit/wallet.spec.ts | 31 +- 8 files changed, 3372 insertions(+), 3347 deletions(-) delete mode 100644 trustid-sdk/README.md create mode 100644 trustid-sdk/examples/keystore mode change 100644 => 100755 trustid-sdk/package.json diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md deleted file mode 100644 index 28de218d..00000000 --- a/trustid-sdk/README.md +++ /dev/null @@ -1,162 +0,0 @@ -# TRUSTID SDK - - -This SDK exposes all the functionalities required to interact with -TRUSTID-based DLT networks. - -### Install -* To install this library you need access to the private repo: -``` -$ npm install @hyperledger-labs/trustid-sdk@1.0.0 - -``` - -### Getting started - -To use the sdk it's necessary to read the [Getting started guide](../README.md) - -The SDK to connect with Hyperledger Fabric will need to configure the connection. On one side we need the hyperledger fabric standard [connection profile](./connection-profile.json), on the othe side we will need to complete de following configuration in a JSON object. -```js -{ - stateStore: '', - caURL: '', - caName: '', - caAdmin: '', - caPassword: '', - tlsOptions: { - trustedRoots:"", - verify: false - }, - mspId: '', - walletID: '', - asLocalhost: , - ccp: connection profile commented bellow, - chaincodeName: "name of the identity chaincode deployed", - fcn: "proxy", - channel: "" -} - -``` - -### Example of use -You can find a set of examples using the SDK in the [examples](../examples) directory. - -```js -// Use library -var id = require('trustid-sdk') -import { TrustIdHf, Keystore, FileKeystore } from 'trustid-sdk'; -import {AccessPolicy, PolicyType} from 'trustid-sdk'; - -// Initialize wallet -wal = id.Wallet.Instance; - -// Create Keystore -ks = new FileKeystore(); -// Set keystore in wallet -wal.setKeystore(ks) -// LoadKeystore from file - wal.loadKeystore('file', './keystore') -// Set endpoint of driver and store in variable to use it. -let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); -let config = { - stateStore: '/tmp/statestore', - caURL: 'https://ca.org1.telefonica.com:7054', - caName: 'ca.org1.telefonica.com', - caAdmin: 'adminCA', - caPassword: 'adminpw', - tlsOptions: { - trustedRoots:"-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", - verify: false - }, - mspId: 'org1MSP', - walletID: 'admin', - asLocalhost: true, - ccp: ccp, - chaincodeName: "identitycc", - fcn: "proxy", - channel: "telefonicachannel" -} - -const trustID = new TrustIdHf(config); -wal.addNetwork("hf", trustID); -await wal.networks["hf"].configureDriver(); - -// Use the wallet and the driver -wal.generateDID("RSA") -await wal.networks["hf"].createIdentity(wal.getDID("default")) -await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); - -let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; - -await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", access, "mychannel"); - -``` - -### Structure -The library has the following modules: - -* `wallet.ts`: Core module of the library. It wraps all the state and -logic for identity management and interaction with TRUSTID networks. -To start using the SDK a new wallet needs to be initialized. A wallet -exposes the following methods: - * `public setKeystore(keystore: Keystore): void`: - * `public generateDID(type: string, controller: string = "default", passphrase: string = ""): DID` - - And stores the following information: - -* `class DID`: Has the following structure. - * `public id: string`: Id string that identifies the DID. - * `public pubkey: string`: PublicKey of the DID. - * `public type: string`: Key type (RSA / EC / OKP). - * `public controller: string`: Verifier of the identity - * `public access: number`: Access level. This is the access level to be checked in the service AccessPolicy threshold. - * `private privkey: string`: Private Key of the DID. - - And exposes the following functions: - * `public unlockAccount(passphrase: string = ""): void`: Unlocks private key in order to use the DID. - * `public lockAccount(): any`: Locks the private key for a DID. - * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. - * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. - -* `trustInterface.ts`: Interface that enables the implementation of connection drivers with different TRUSTID networks. The only driver implemented currently is -the `hfdriver.ts` enabling the interaction with Hyperledger Fabric TrustID -networks. - - * `setEndpoint(endpoint: string): void`: Sets the network endpoint to interact with the TRUSTID network. - * `createIdentity(did: DID): Promise`: Create an identity in TrustID. It generates a new DID in the wallet and register it in the network. - * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. - * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. - * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. - * `createService(did: DID, serviceDID: string, name: string, access: AccessPolicy, channel: string): Promise`: Creates a new service in the TrustID network. - * `updateService(did: DID, serviceDID: string, name: string, channel: string): Promise`: Updates the information from a service. - * `updateServiceAccess(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the access from a service. - * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. - * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. - * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network - * `PolicyType (policy: PolicyType, threshold:?Number, registry:?object)`: It - defined the policyType to be used for a service. There are currently three - types of policyTypes supported (more could be easily added according to - your needs) - * PublicPolicy: Grants public access by any user to your service. - * SameControllerPolicy: Only verified identities whose controller is the - same controller who created the service has access to the service (this - policy comes pretty handy when you want to define "corporate-wide" services). - * FineGrainedPolicy: Grants fine-grained access to users to your service. - In this policy you explicitly define the access of users to the service. - There are two ways of using this policyType, you can define a threshold - so every user with an access level equal or higher than the threshold - is granted access to the service; or you could use fine-grained - access levels defined in the registry, where you would add the following - tuple: `{, }`. Thus, only users in the registry - with an access level over the threshold will be granted access to the - service with `access_role` permissions. - -* `keystore.ts`: Interface that enables the implementation of keystore storages. - There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). - - * `abstract getDID(id: string): DID`: Get specific DID from keystore. - * `abstract storeDID(did: DID): boolean`: Store DID in keystore. - * `public storeInMemory(did: DID): boolean`: Store DID inMemory for easy and performant use. - * `public listDID(): string[]`: List DIDs in memory. - * `public setDefault(did: DID): boolean`: Set DID as default identity for the keystore wallet. - diff --git a/trustid-sdk/examples/keystore b/trustid-sdk/examples/keystore new file mode 100644 index 00000000..e69de29b diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index cd97c7ed..94d7820d 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -1,3173 +1,3171 @@ { - "name": "coren-id-sdk", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/runtime": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", - "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@grpc/grpc-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", - "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", - "optional": true, - "requires": { - "semver": "^6.2.0" - } - }, - "@grpc/proto-loader": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", - "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", - "optional": true, - "requires": { - "lodash.camelcase": "^4.3.0", - "protobufjs": "^6.8.6" - } - }, - "@panva/asn1.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", - "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" - }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", - "optional": true - }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", - "optional": true - }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", - "optional": true - }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", - "optional": true - }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" - } - }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", - "optional": true - }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", - "optional": true - }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", - "optional": true - }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", - "optional": true - }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", - "optional": true - }, - "@semantic-ui-react/event-stack": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.1.tgz", - "integrity": "sha512-SA7VOu/tY3OkooR++mm9voeQrJpYXjJaMHO1aFCcSouS2xhqMR9Gnz0LEGLOR0h9ueWPBKaQzKIrx3FTTJZmUQ==", - "dev": true, - "requires": { - "exenv": "^1.2.2", - "prop-types": "^15.6.2" - } - }, - "@sinonjs/commons": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", - "integrity": "sha512-wEj54PfsZ5jGSwMX68G8ZXFawcSglQSXqCftWX3ec8MDUzQdHgcKvw97awHbY0efQEL5iKUOAmmVtoYgmrSG4Q==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/formatio": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-5.0.1.tgz", - "integrity": "sha512-KaiQ5pBf1MpS09MuA0kp6KBQt2JUOQycqVG1NZXvzeaXe5LGFqAKueIS0bw4w0P9r7KuBSVdUk5QjXsUdu2CxQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^5.0.2" - } - }, - "@sinonjs/samsam": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.0.3.tgz", - "integrity": "sha512-QucHkc2uMJ0pFGjJUDP3F9dq5dx8QIaqISl9QgwLOh6P9yv877uONPGXh/OH/0zmM3tW1JjuJltAZV2l7zU+uQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@stardust-ui/react-component-event-listener": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", - "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2" - } - }, - "@stardust-ui/react-component-ref": { - "version": "0.38.0", - "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", - "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "prop-types": "^15.7.2", - "react-is": "^16.6.3" - } - }, - "@types/bson": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.2.tgz", - "integrity": "sha512-+uWmsejEHfmSjyyM/LkrP0orfE2m5Mx9Xel4tXNeqi1ldK5XMQcDsFkBmLDtuyKUbxj2jGDo0H240fbCRJZo7Q==", - "requires": { - "@types/node": "*" - } - }, - "@types/caseless": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", - "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==", - "optional": true - }, - "@types/chai": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", - "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", - "dev": true - }, - "@types/crypto-js": { - "version": "3.1.47", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", - "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", - "dev": true - }, - "@types/jwk-to-pem": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", - "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", - "dev": true - }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", - "optional": true - }, - "@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true - }, - "@types/mocha": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", - "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", - "dev": true - }, - "@types/mongodb": { - "version": "3.5.25", - "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.5.25.tgz", - "integrity": "sha512-2H/Owt+pHCl9YmBOYnXc3VdnxejJEjVdH+QCWL5ZAfPehEn3evygKBX3/vKRv7aTwfNbUd0E5vjJdQklH/9a6w==", - "requires": { - "@types/bson": "*", - "@types/node": "*" - } - }, - "@types/mongoose": { - "version": "5.7.29", - "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.7.29.tgz", - "integrity": "sha512-+7u1akCerciZ2MG66p6Vy+9Tg7dYcgSeNbDInxdOA5vB5xAZhNiIBj8HESnJmIqOBcWxQ90HpaPWtEwggBqXug==", - "requires": { - "@types/mongodb": "*", - "@types/node": "*" - } - }, - "@types/node": { - "version": "13.13.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.12.tgz", - "integrity": "sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw==" - }, - "@types/node-jose": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.4.tgz", - "integrity": "sha512-qdCc4utrY71TF8Ghm+uW92EAZU9PW3kok4yvEbdFT/GRZ5VvsU3NuZH59mxfOFBtdsHiLjWjOsXlVSPC3z6cJw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/request": { - "version": "2.48.5", - "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", - "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", - "optional": true, - "requires": { - "@types/caseless": "*", - "@types/node": "*", - "@types/tough-cookie": "*", - "form-data": "^2.5.0" - } - }, - "@types/sinon": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.4.tgz", - "integrity": "sha512-sJmb32asJZY6Z2u09bl0G2wglSxDlROlAejCjsnor+LzBMz17gu8IU7vKC/vWDnv9zEq2wqADHVXFjf4eE8Gdw==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.1.tgz", - "integrity": "sha512-yYezQwGWty8ziyYLdZjwxyMb0CZR49h8JALHGrxjQHWlqGgc8kLdHEgWrgL0uZ29DMvEVBDnHU2Wg36zKSIUtA==", - "dev": true - }, - "@types/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==", - "optional": true - }, - "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", - "optional": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "optional": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "optional": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "optional": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "optional": true - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==", - "optional": true - }, - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "backbone": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", - "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", - "dev": true, - "requires": { - "underscore": ">=1.8.3" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "binary-extensions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", - "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", - "dev": true - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "bluebird": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" - }, - "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "optional": true - }, - "browser-request": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", - "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=", - "optional": true - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "bson": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.5.tgz", - "integrity": "sha512-kDuEzldR21lHciPQAIulLs1LZlCXdLziXI6Mb/TDkwXhb//UORJNPXgcRs2CuO4H0DcMkpfT3/ySsP3unoZjBg==" - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "callsite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", - "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=", - "optional": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "optional": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "dependencies": { - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", - "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.1.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.2.0" - } - }, - "classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "cloudant-follow": { - "version": "0.18.2", - "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", - "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", - "optional": true, - "requires": { - "browser-request": "~0.3.0", - "debug": "^4.0.1", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "name": "coren-id-sdk", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", + "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "optional": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-react-context": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", - "integrity": "sha512-dNldIoSuNSvlTJ7slIKC/ZFGKexBMBrrcc+TTe1NdmROnaASuLPvqpwj9v4XS4uXZ8+YPu0sNmShX2rXI5LNsw==", - "dev": true, - "requires": { - "gud": "^1.0.0", - "warning": "^4.0.3" - } - }, - "crypto-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", - "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", - "optional": true - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "optional": true - }, - "denque": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", - "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" - }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "eastasianwidth": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", - "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", - "dev": true - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "errs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", - "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=", - "optional": true - }, - "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "exenv": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", - "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", - "dev": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "optional": true - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", - "optional": true - }, - "fabric-ca-client": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.0.tgz", - "integrity": "sha512-f8s8e/tOwsWDHwMhvnPPdnL4bgwkpG8LED5frEaP+rWHUoqUNAUOpvs/kLdnBcezix84UNA3f+UbccF9KL6dAA==", - "optional": true, - "requires": { - "fabric-common": "^2.1.1", - "jsrsasign": "^7.2.2", - "url": "^0.11.0", - "util": "^0.10.3", - "winston": "^2.4.0" - } - }, - "fabric-common": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.1.1.tgz", - "integrity": "sha512-IwkOTB/jJIm2aOfJaYFirCYrorIb8TvW7lvU65b/CGwpXK1GuFWYOYCZa+SXggl9z4ZoADDrIYTZ76BAaFIDKQ==", - "optional": true, - "requires": { - "callsite": "^1.0.0", - "elliptic": "^6.5.2", - "fabric-protos": "2.1.1", - "js-sha3": "^0.7.0", - "jsrsasign": "^8.0.15", - "nconf": "^0.10.0", - "pkcs11js": "^1.0.6", - "promise-settle": "^0.3.0", - "sjcl": "1.0.7", - "winston": "^2.4.0", - "yn": "^3.1.0" - }, - "dependencies": { - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-network": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.1.0.tgz", - "integrity": "sha512-9VqUvYX2fROleTl1sKIx51EhLDfhDxDMHIgafRvicBFJKYAeQ6nyKWmk3gZIlGxmB2LjpIV+WzwR5Z2PiNI03w==", - "optional": true, - "requires": { - "fabric-ca-client": "^2.1.1", - "fabric-common": "^2.1.1", - "fs-extra": "^8.1.0", - "long": "^4.0.0", - "nano": "^8.1.0", - "winston": "^2.4.0" - }, - "dependencies": { - "fabric-ca-client": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.1.1.tgz", - "integrity": "sha512-TcX/frTOun76DPh3FcKQ3kCue1K2CK00H43ZGBqIQGqtF42pDeNRqDSrAbvYTujg9lzKVLRZl2k0h4m/oP2UaQ==", - "optional": true, - "requires": { - "fabric-common": "2.1.1", - "jsrsasign": "^8.0.15", - "url": "^0.11.0", - "winston": "^2.4.0" - } + "@grpc/grpc-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.0.3.tgz", + "integrity": "sha512-JKV3f5Bv2TZxK6eJSB9EarsZrnLxrvcFNwI9goq0YRXa3S6NNoCSnI3cG3lkXVIJ03Wng1WXe76kc2JQtRe7AQ==", + "requires": { + "semver": "^6.2.0" + } + }, + "@grpc/proto-loader": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.4.tgz", + "integrity": "sha512-HTM4QpI9B2XFkPz7pjwMyMgZchJ93TVkL3kWPW8GDMDKYxsMnmf4w2TNMJK7+KNiYHS5cJrCEAFlF+AwtXWVPA==", + "requires": { + "lodash.camelcase": "^4.3.0", + "protobufjs": "^6.8.6" + } + }, + "@hypnosphi/create-react-context": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz", + "integrity": "sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==", + "dev": true, + "requires": { + "gud": "^1.0.0", + "warning": "^4.0.3" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz", + "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.4", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz", + "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz", + "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.4", + "fastq": "^1.6.0" + } + }, + "@panva/asn1.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", + "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==" + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@semantic-ui-react/event-stack": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@semantic-ui-react/event-stack/-/event-stack-3.1.2.tgz", + "integrity": "sha512-Yd0Qf7lPCIjzJ9bZYfurlNu2RDXT6KKSyubHfYK3WjRauhxCsq6Fk2LMRI9DEvShoEU+AsLSv3NGkqXAcVp0zg==", + "dev": true, + "requires": { + "exenv": "^1.2.2", + "prop-types": "^15.6.2" + } + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@stardust-ui/react-component-event-listener": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-event-listener/-/react-component-event-listener-0.38.0.tgz", + "integrity": "sha512-sIP/e0dyOrrlb8K7KWumfMxj/gAifswTBC4o68Aa+C/GA73ccRp/6W1VlHvF/dlOR4KLsA+5SKnhjH36xzPsWg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2" + } + }, + "@stardust-ui/react-component-ref": { + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/@stardust-ui/react-component-ref/-/react-component-ref-0.38.0.tgz", + "integrity": "sha512-xjs6WnvJVueSIXMWw0C3oWIgAPpcD03qw43oGOjUXqFktvpNkB73JoKIhS4sCrtQxBdct75qqr4ZL6JiyPcESw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "prop-types": "^15.7.2", + "react-is": "^16.6.3" + } + }, + "@types/bson": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", + "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", + "requires": { + "@types/node": "*" + } + }, + "@types/caseless": { + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz", + "integrity": "sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w==" + }, + "@types/chai": { + "version": "4.2.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.16.tgz", + "integrity": "sha512-vI5iOAsez9+roLS3M3+Xx7w+WRuDtSmF8bQkrbcIJ2sC1PcDgVoA0WGpa+bIrJ+y8zqY2oi//fUctkxtIcXJCw==", + "dev": true + }, + "@types/crypto-js": { + "version": "3.1.47", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-3.1.47.tgz", + "integrity": "sha512-eI6gvpcGHLk3dAuHYnRCAjX+41gMv1nz/VP55wAe5HtmAKDOoPSfr3f6vkMc08ov1S0NsjvUBxDtHHxqQY1LGA==", + "dev": true + }, + "@types/jwk-to-pem": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/jwk-to-pem/-/jwk-to-pem-2.0.0.tgz", + "integrity": "sha512-m7ZnE+iJodvhu9XNkMc/1CNkIg7432d/YSB8Qo/4TbD86rZ1GgkB4MVTNqIZG5RCtL0H4iVxiMT2OGTQDZEfHg==", + "dev": true + }, + "@types/long": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", + "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==" + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/mocha": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-7.0.2.tgz", + "integrity": "sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==", + "dev": true + }, + "@types/mongodb": { + "version": "3.6.12", + "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.12.tgz", + "integrity": "sha512-49aEzQD5VdHPxyd5dRyQdqEveAg9LanwrH8RQipnMuulwzKmODXIZRp0umtxi1eBUfEusRkoy8AVOMr+kVuFog==", + "requires": { + "@types/bson": "*", + "@types/node": "*" + } + }, + "@types/mongoose": { + "version": "5.10.4", + "resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.10.4.tgz", + "integrity": "sha512-U7fNDcTcdaSGzQ3+mlSBeebiYr6eaacJi330LTLOEh8Sm6mXfuec70ag/UXkL+alFm7pfAjFqfc7jEaJEJvAHQ==", + "requires": { + "@types/mongodb": "*", + "@types/node": "*" + } + }, + "@types/node": { + "version": "13.13.49", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.49.tgz", + "integrity": "sha512-v5fPzKjPAZ33/G4X8EXvGlbHFKQClfKAz1bKF/+cKaWss9lAIqrOETfcFNL3xG+DG2VCEev+dK4/lCa+YZaxBA==" + }, + "@types/node-jose": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@types/node-jose/-/node-jose-1.1.5.tgz", + "integrity": "sha512-fScnd7GdaHC31PYouWR0xYSOXQLrmxPhLM92CYlVy4UetSwis2u5e6khMazj1Xyidt8zPeRU0PHLmI+mpamhGQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/request": { + "version": "2.48.5", + "resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.5.tgz", + "integrity": "sha512-/LO7xRVnL3DxJ1WkPGDQrp4VTV1reX9RkC85mJ+Qzykj2Bdw+mG15aAfDahc76HtknjzE16SX/Yddn6MxVbmGQ==", + "requires": { + "@types/caseless": "*", + "@types/node": "*", + "@types/tough-cookie": "*", + "form-data": "^2.5.0" + } + }, + "@types/sinon": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", + "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", + "dev": true, + "requires": { + "@types/sinonjs__fake-timers": "*" + } + }, + "@types/sinonjs__fake-timers": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.2.tgz", + "integrity": "sha512-dIPoZ3g5gcx9zZEszaxLSVTvMReD3xxyyDnQUjA6IYDG9Ba2AV0otMPs+77sG9ojB4Qr2N2Vk5RnKeuA0X/0bg==", + "dev": true + }, + "@types/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-I99sngh224D0M7XgW1s120zxCt3VYQ3IQsuw3P3jbq5GG4yc79+ZjyKznyOGIQrflfylLgcfekeZW/vk0yng6A==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true }, - "jsrsasign": { - "version": "8.0.20", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.20.tgz", - "integrity": "sha512-JTXt9+nqdynIB8wFsS6e8ffHhIjilhywXwdaEVHSj9OVmwldG2H0EoCqkQ+KXkm2tVqREfH/HEmklY4k1/6Rcg==", - "optional": true - } - } - }, - "fabric-protos": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.1.1.tgz", - "integrity": "sha512-ENki8xgRQqxd/qe0EVvNlr7k2LmEOMqGrrw22+ufY/sAE8OyFXpQa3+1J9wErzN+cASt2t/DuCaIIKURPJrFRg==", - "optional": true, - "requires": { - "@grpc/grpc-js": "1.0.3", - "@grpc/proto-loader": "0.5.4", - "lodash.clone": "4.5.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "optional": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "optional": true - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } - }, - "follow-redirects": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz", - "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true - }, - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs": { - "version": "0.0.1-security", - "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gud": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", - "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", - "dev": true - }, - "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "optional": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "optional": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "optional": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "highlight.js": { - "version": "9.18.5", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", - "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "optional": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "optional": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "optional": true - }, - "is-arguments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true - }, - "jose": { - "version": "1.27.1", - "resolved": "https://registry.npmjs.org/jose/-/jose-1.27.1.tgz", - "integrity": "sha512-VyHM6IJPw0TTGqHVNlPWg16/ASDPAmcChcLqSb3WNBvwWFoWPeFqlmAUCm8/oIG1GjZwAlUDuRKFfycowarcVA==", - "requires": { - "@panva/asn1.js": "^1.0.0" - } - }, - "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", - "dev": true - }, - "js-sha3": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", - "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==", - "optional": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "optional": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "optional": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "optional": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "optional": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "jsrsasign": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", - "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=", - "optional": true - }, - "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", - "dev": true - }, - "kareem": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz", - "integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==" - }, - "keyboard-key": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", - "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "optional": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" - }, - "lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", - "optional": true - }, - "lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=", - "optional": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "log-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", - "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lunr": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.8.tgz", - "integrity": "sha512-oxMeX/Y35PNFuZoHp+jUj5OSEmLCaIH4KTFJh7a93cHBoFmpw2IoPs22VIz7vyO2YUnx2Tn9dzIwO2P/4quIRg==", - "dev": true - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "marked": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", - "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", - "dev": true - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "optional": true - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", - "optional": true - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "optional": true, - "requires": { - "mime-db": "1.44.0" - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "optional": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mocha": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", - "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "chokidar": "3.3.0", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "3.0.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.5", - "ms": "2.1.1", - "node-environment-flags": "1.0.6", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", + "dev": true, + "requires": { + "underscore": ">=1.8.3" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" + }, + "base64url": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", + "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", + "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=" + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "bson": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", + "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "classnames": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz", + "integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==", + "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "cloudant-follow": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.18.2.tgz", + "integrity": "sha512-qu/AmKxDqJds+UmT77+0NbM7Yab2K3w0qSeJRzsq5dRWJTEJdWeb+XpG4OpKuTE9RKOa/Awn2gR3TTnvNr3TeA==", + "requires": { + "browser-request": "~0.3.0", + "debug": "^4.0.1", + "request": "^2.88.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crypto-js": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.0.0.tgz", + "integrity": "sha512-bzHZN8Pn+gS7DQA6n+iUmBfl0hO5DJq++QP3U6uTucDtk/0iGpXd/Gg7CGR0p8tJhofJyaKoWBuJI4eAO00BBg==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "denque": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", + "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "eastasianwidth": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.1.1.tgz", + "integrity": "sha1-RNZW3p2kFWlEZzNTZfsxR7hXK3w=", + "dev": true + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "errs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=" + }, + "es-abstract": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz", + "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.2", + "is-string": "^1.0.5", + "object-inspect": "^1.9.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.0" + }, + "dependencies": { + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "exenv": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/exenv/-/exenv-1.2.2.tgz", + "integrity": "sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fabric-ca-client": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-2.2.5.tgz", + "integrity": "sha512-wjXNHkQ2mFznmeleqq/FzUqCojMhUOyzmAMV12spIuW03tyPIq5A9/eDCGjeAu8+8WYBYSKmAx95pO3PeBeKSg==", + "requires": { + "fabric-common": "2.2.5", + "jsrsasign": "^8.0.20", + "url": "^0.11.0", + "winston": "^2.4.0" + } + }, + "fabric-common": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-common/-/fabric-common-2.2.5.tgz", + "integrity": "sha512-nAnga2klnAsyzzPlOwxW8kjKBFWqhAH/P3c987RCjh95h/C1lA0VksjyeMhmRmoo6wxFE5MHv/vY2FVh0gwNCw==", + "requires": { + "callsite": "^1.0.0", + "elliptic": "^6.5.3", + "fabric-protos": "2.2.5", + "js-sha3": "^0.7.0", + "jsrsasign": "^8.0.20", + "long": "^4.0.0", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "sjcl": "1.0.7", + "winston": "^2.4.0", + "yn": "^3.1.0" + } + }, + "fabric-network": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-network/-/fabric-network-2.2.5.tgz", + "integrity": "sha512-NGMwMiZ93hW4R5yimZo1CvjdPs9mRjYR3/fh6xpjTvQZhVsJvHxggRKa+HhkySr4FJGJ52raQ/Nj3DsOxd4XTg==", + "requires": { + "fabric-common": "2.2.5", + "fabric-protos": "2.2.5", + "long": "^4.0.0", + "nano": "^8.2.2" + } + }, + "fabric-protos": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fabric-protos/-/fabric-protos-2.2.5.tgz", + "integrity": "sha512-5ylljqycb4621jOFFAkwJxfzfhUbf5ovddb/RpDO8MgrPO+ZIqI5lU7Lc+jPtl29Xa3rxK94MctkVoRejgz5Tg==", + "requires": { + "@grpc/grpc-js": "1.0.3", + "@grpc/proto-loader": "0.5.4", + "protobufjs": "^6.9.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-glob": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz", + "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fastq": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", + "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==", + "dev": true + }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "highlight.js": { + "version": "9.18.5", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.5.tgz", + "integrity": "sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-bigint": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz", + "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==", + "dev": true + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "dev": true + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "is-regex": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz", + "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.1" + } }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - } - } - }, - "mongodb": { - "version": "3.6.3", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.3.tgz", - "integrity": "sha512-rOZuR0QkodZiM+UbQE5kDsJykBqWi0CL4Ec2i1nrGrUI3KO11r6Fbxskqmq3JK2NH7aW4dcccBuUujAP0ERl5w==", - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "require_optional": "^1.0.1", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "mongoose": { - "version": "5.10.13", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.10.13.tgz", - "integrity": "sha512-lvZzTj449sVWijY76StOuTKt5oP5kyy70VdM3DMgPpKNqZfkAseHxekmqBbd9YQQDVIgrIYDar9vSlxKqc75MQ==", - "requires": { - "bson": "^1.1.4", - "kareem": "2.3.1", - "mongodb": "3.6.3", - "mongoose-legacy-pluralize": "1.0.2", - "mpath": "0.7.0", - "mquery": "3.2.2", - "ms": "2.1.2", - "regexp-clone": "1.0.0", - "safe-buffer": "5.2.1", - "sift": "7.0.1", - "sliced": "1.0.1" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "mongoose-legacy-pluralize": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", - "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" - }, - "mpath": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.7.0.tgz", - "integrity": "sha512-Aiq04hILxhz1L+f7sjGyn7IxYzWm1zLNNXcfhDtx04kZ2Gk7uvFdgZ8ts1cWa/6d0TQmag2yR8zSGZUmp0tFNg==" - }, - "mquery": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz", - "integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==", - "requires": { - "bluebird": "3.5.1", - "debug": "3.1.0", - "regexp-clone": "^1.0.0", - "safe-buffer": "5.1.2", - "sliced": "1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "nan": { - "version": "2.14.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", - "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", - "optional": true - }, - "nano": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.2.tgz", - "integrity": "sha512-1/rAvpd1J0Os0SazgutWQBx2buAq3KwJpmdIylPDqOwy73iQeAhTSCq3uzbGzvcNNW16Vv/BLXkk+DYcdcH+aw==", - "optional": true, - "requires": { - "@types/request": "^2.48.4", - "cloudant-follow": "^0.18.2", - "debug": "^4.1.1", - "errs": "^0.3.2", - "request": "^2.88.0" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "optional": true, - "requires": { - "ms": "^2.1.1" - } + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "optional": true - } - } - }, - "nconf": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", - "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", - "optional": true, - "requires": { - "async": "^1.4.0", - "ini": "^1.3.0", - "secure-keys": "^1.0.0", - "yargs": "^3.19.0" - } - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "nise": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz", - "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node": { - "version": "13.14.0", - "resolved": "https://registry.npmjs.org/node/-/node-13.14.0.tgz", - "integrity": "sha512-y5pClvPYkG7cTPRDmyNeCuOseyRFuZbrvQVbyAEhkfRWtfhyyu6lHYUjBSJzrSZXlbkCIlx+TKqLDAEhxc9Vkw==", - "requires": { - "node-bin-setup": "^1.0.0" - } - }, - "node-bin-setup": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-bin-setup/-/node-bin-setup-1.0.6.tgz", - "integrity": "sha512-uPIxXNis1CRbv1DwqAxkgBk5NFV3s7cMN/Gf556jSw6jBvV7ca4F9lRL/8cALcZecRibeqU+5dFYqFFmzv5a0Q==" - }, - "node-environment-flags": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", - "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" - }, - "node-jose": { - "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", - "from": "git+https://github.com/cisco/node-jose.git", - "requires": { - "base64url": "^3.0.1", - "buffer": "^5.5.0", - "es6-promise": "^4.2.8", - "lodash": "^4.17.15", - "long": "^4.0.0", - "node-forge": "^0.10.0", - "pako": "^1.0.11", - "process": "^0.11.10", - "uuid": "^3.3.3" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", - "dev": true - }, - "object-is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.2.tgz", - "integrity": "sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optional": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", - "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "optional": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" - }, - "path": { - "version": "0.12.7", - "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", - "requires": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "optional": true - }, - "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pkcs11js": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.21.tgz", - "integrity": "sha512-U+UUXbVqdL3q95zNqi8aGbAg6KcyVkKocKR4QicvoEEO9NVW2podLkaq5hhxLGUi+OOJSL5VBNbUE2EatbeITw==", - "optional": true, - "requires": { - "nan": "^2.14.0" - } - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "promise-settle": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", - "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=", - "optional": true - }, - "prop-types": { - "version": "15.7.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", - "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.8.1" - } - }, - "protobufjs": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.9.0.tgz", - "integrity": "sha512-LlGVfEWDXoI/STstRDdZZKb/qusoAWUnmLg9R8OLSO473mBLWHowx8clbX5/+mKDEI+v7GzjoK9tRPZMMcoTrg==", - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": "^13.7.0", - "long": "^4.0.0" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "optional": true - }, - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "optional": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "optional": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "optional": true - }, - "react": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", - "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", - "integrity": "sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - }, - "react-popper": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.7.tgz", - "integrity": "sha512-nmqYTx7QVjCm3WUZLeuOomna138R1luC4EqkW3hxJUrAe+3eNz3oFCLYdnPwILfn0mX1Ew2c3wctrjlUMYYUww==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "create-react-context": "^0.3.0", - "deep-equal": "^1.1.1", - "popper.js": "^1.14.4", - "prop-types": "^15.6.1", - "typed-styles": "^0.0.7", - "warning": "^4.0.2" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jose": { + "version": "1.28.1", + "resolved": "https://registry.npmjs.org/jose/-/jose-1.28.1.tgz", + "integrity": "sha512-6JK28rFu5ENp/yxMwM+iN7YeaInnY9B9Bggjkz5fuwLiJhbVrl2O4SJr65bdNBPl9y27fdC3Mymh+FVCvozLIg==", + "requires": { + "@panva/asn1.js": "^1.0.0" + } + }, + "jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==", + "dev": true + }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsrsasign": { + "version": "8.0.24", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-8.0.24.tgz", + "integrity": "sha512-u45jAyusqUpyGbFc2IbHoeE4rSkoBWQgLe/w99temHenX+GyCz4nflU5sjK7ajU1ffZTezl6le7u43Yjr/lkQg==" + }, + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "kareem": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" + }, + "keyboard-key": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/keyboard-key/-/keyboard-key-1.1.0.tgz", + "integrity": "sha512-qkBzPTi3rlAKvX7k0/ub44sqOfXeLc/jcnGGmj5c7BJpU8eDrEVPyhCvNYAaoubbsLm9uGWwQJO1ytQK1a9/dQ==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "marked": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "dev": true + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" + }, + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "requires": { + "mime-db": "1.47.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "mongodb": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", + "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "requires": { + "bl": "^2.2.1", + "bson": "^1.1.4", + "denque": "^1.4.1", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.12.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.3.tgz", + "integrity": "sha512-frsSR9yeldaRpSUeTegXCSB0Tu5UGq8sHuHBuEV31Jk3COyxlKFQPL7UsdMhxPUCmk74FpOYSmNwxhWBEqgzQg==", + "requires": { + "@types/mongodb": "^3.5.27", + "bson": "^1.1.4", + "kareem": "2.3.2", + "mongodb": "3.6.5", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.8.3", + "mquery": "3.2.5", + "ms": "2.1.2", + "regexp-clone": "1.0.0", + "safe-buffer": "5.2.1", + "sift": "7.0.1", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", + "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" + }, + "mquery": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", + "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "^1.0.0", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", + "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", + "optional": true + }, + "nano": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/nano/-/nano-8.2.3.tgz", + "integrity": "sha512-nubyTQeZ/p+xf3ZFFMd7WrZwpcy9tUDrbaXw9HFBsM6zBY5gXspvOjvG2Zz3emT6nfJtP/h7F2/ESfsVVXnuMw==", + "requires": { + "@types/request": "^2.48.4", + "cloudant-follow": "^0.18.2", + "debug": "^4.1.1", + "errs": "^0.3.2", + "request": "^2.88.0" + } + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nise": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" + } + }, + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "requires": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "node-forge": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" + }, + "node-jose": { + "version": "git+https://github.com/cisco/node-jose.git#1f86e23fc69063aea56974aa7247c2400b7dd50c", + "from": "git+https://github.com/cisco/node-jose.git", + "requires": { + "base64url": "^3.0.1", + "buffer": "^5.5.0", + "es6-promise": "^4.2.8", + "lodash": "^4.17.15", + "long": "^4.0.0", + "node-forge": "^0.10.0", + "pako": "^1.0.11", + "process": "^0.11.10", + "uuid": "^3.3.3" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optional": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", + "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==" + }, + "path": { + "version": "0.12.7", + "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", + "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "requires": { + "process": "^0.11.1", + "util": "^0.10.3" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + } + } + }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "picomatch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "dev": true + }, + "pkcs11js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.2.2.tgz", + "integrity": "sha512-xZYdI3qOfOQhSl4j79iR+8Yj3ZkwlILkIfpJkhWPLDP00DyT0aiPOVTh8tt8vgda0GrSjyJza3GFjFyRdV+eFg==", + "optional": true, + "requires": { + "nan": "^2.14.2" + } + }, + "popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-settle": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", + "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=" + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "protobufjs": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.10.2.tgz", + "integrity": "sha512-27yj+04uF6ya9l+qfpH187aqEzfCF4+Uit0I9ZBQVqK09hk/SQzKa2MUqUpXaVa7LOFRg1TSSr3lVxGOk6c0SQ==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.1", + "@types/node": "^13.7.0", + "long": "^4.0.0" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, + "react": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", + "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2" + } + }, + "react-dom": { + "version": "16.14.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", + "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "scheduler": "^0.19.1" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "react-popper": { + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.11.tgz", + "integrity": "sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@hypnosphi/create-react-context": "^0.3.1", + "deep-equal": "^1.1.1", + "popper.js": "^1.14.4", + "prop-types": "^15.6.1", + "typed-styles": "^0.0.7", + "warning": "^4.0.2" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "regexp-clone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" + }, + "regexp.prototype.flags": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", + "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "readdirp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", - "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", - "dev": true, - "requires": { - "picomatch": "^2.0.4" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - }, - "regexp-clone": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", - "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" - }, - "regexp.prototype.flags": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz", - "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "optional": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - } - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "scheduler": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", + "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "dev": true, + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" + }, + "semantic-ui-react": { + "version": "0.88.2", + "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", + "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.1.2", + "@semantic-ui-react/event-stack": "^3.1.0", + "@stardust-ui/react-component-event-listener": "~0.38.0", + "@stardust-ui/react-component-ref": "~0.38.0", + "classnames": "^2.2.6", + "keyboard-key": "^1.0.4", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-is": "^16.8.6", + "react-popper": "^1.3.4", + "shallowequal": "^1.1.0" + } + }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "optional": true - }, - "saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", - "optional": true, - "requires": { - "sparse-bitfield": "^3.0.3" - } - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "dev": true, - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "secure-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", - "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=", - "optional": true - }, - "semantic-ui-react": { - "version": "0.88.2", - "resolved": "https://registry.npmjs.org/semantic-ui-react/-/semantic-ui-react-0.88.2.tgz", - "integrity": "sha512-+02kN2z8PuA/cMdvDUsHhbJmBzxxgOXVHMFr9XK7zGb0wkW9A6OPQMFokWz7ozlVtKjN6r7zsb+Qvjk/qq1OWw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.1.2", - "@semantic-ui-react/event-stack": "^3.1.0", - "@stardust-ui/react-component-event-listener": "~0.38.0", - "@stardust-ui/react-component-ref": "~0.38.0", - "classnames": "^2.2.6", - "keyboard-key": "^1.0.4", - "lodash": "^4.17.15", - "prop-types": "^15.7.2", - "react-is": "^16.8.6", - "react-popper": "^1.3.4", - "shallowequal": "^1.1.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", - "dev": true - }, - "shelljs": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", - "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "sift": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", - "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" - }, - "sinon": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.0.2.tgz", - "integrity": "sha512-0uF8Q/QHkizNUmbK3LRFqx5cpTttEVXudywY9Uwzy8bTfZUhljZ7ARzSxnRHWYWtVTeh4Cw+tTb3iU21FQVO9A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.2", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/formatio": "^5.0.1", - "@sinonjs/samsam": "^5.0.3", - "diff": "^4.0.2", - "nise": "^4.0.1", - "supports-color": "^7.1.0" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "shallowequal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", + "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "dev": true + }, + "shamirs-secret-sharing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/shamirs-secret-sharing/-/shamirs-secret-sharing-1.0.1.tgz", + "integrity": "sha512-+sbTZJfis6EtDZTgkf0gSUahXDDuFRY8GK0DUw0lXqMDN54a5ywLD6D2sab45AA2SLQxTS4gB0kUmelNVaPVlA==" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "sift": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz", + "integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==" + }, + "sinon": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "sjcl": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true }, "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "sjcl": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", - "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=", - "optional": true - }, - "sliced": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", - "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", - "optional": true, - "requires": { - "memory-pager": "^1.0.2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "optional": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "optional": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string.prototype.trimend": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", - "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimstart": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", - "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "terminal-table": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", - "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", - "dev": true, - "requires": { - "colors": "^1.0.3", - "eastasianwidth": "^0.1.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "optional": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "ts-lib-utils": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/ts-lib-utils/-/ts-lib-utils-2.7.2.tgz", - "integrity": "sha512-SBOsyeNB8ECoSQkwgYaecn2yVIY7WCFkcfzXIu0iGyg6gCC5bXGr+jwBbDVnUjAfN0MOI3J66gVLdnv/GYak3g==", - "dev": true, - "requires": { - "glob": "7", - "tslib": "1 || 2" - } - }, - "ts-node": { - "version": "8.10.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", - "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } - } - }, - "tslib": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", - "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", - "dev": true - }, - "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terminal-table": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/terminal-table/-/terminal-table-0.0.12.tgz", + "integrity": "sha1-e1bQCapoKN/dEPEbZU55wGKWX6I=", + "dev": true, + "requires": { + "colors": "^1.0.3", + "eastasianwidth": "^0.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "ts-node": { + "version": "8.10.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.10.2.tgz", + "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + } + } + }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", - "dev": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-coverage-core": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.8.3.tgz", - "integrity": "sha512-Go4QSExs0kGcW9yxvIAv4XSAuIC89cAbdb9Qqj/XdqcYoT2X3fB6x+2jwYwE/opbgrAHijh23TT/C6w9VEj6rw==", - "dev": true, - "requires": { - "minimatch": "3", - "ts-lib-utils": "^2.7.2", - "tslib": "1 || 2", - "tsutils": "3" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "typed-styles": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", - "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", - "dev": true - }, - "typedoc": { - "version": "0.16.11", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", - "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", - "dev": true, - "requires": { - "@types/minimatch": "3.0.3", - "fs-extra": "^8.1.0", - "handlebars": "^4.7.2", - "highlight.js": "^9.17.1", - "lodash": "^4.17.15", - "marked": "^0.8.0", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "shelljs": "^0.8.3", - "typedoc-default-themes": "^0.7.2", - "typescript": "3.7.x" - }, - "dependencies": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz", + "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-coverage-core": { + "version": "2.17.2", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.17.2.tgz", + "integrity": "sha512-J+kKjdJIJetfXkpl1Fg5CFzx09xmFX3aID5w3KJh/RmFSdT05APdPhGxTPMpSSbqNlcDVVnGcVm1LvDZNrlE7A==", + "dev": true, + "requires": { + "fast-glob": "3", + "minimatch": "3", + "tslib": "1 || 2", + "tsutils": "3" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "typed-styles": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.7.tgz", + "integrity": "sha512-pzP0PWoZUhsECYjABgCGQlRGL1n7tOHsgwYv3oIiEpJwGhFTuty/YNeduxQYzXXa3Ge5BdT6sHYIQYpl4uJ+5Q==", + "dev": true + }, + "typedoc": { + "version": "0.16.11", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.16.11.tgz", + "integrity": "sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ==", + "dev": true, + "requires": { + "@types/minimatch": "3.0.3", + "fs-extra": "^8.1.0", + "handlebars": "^4.7.2", + "highlight.js": "^9.17.1", + "lodash": "^4.17.15", + "marked": "^0.8.0", + "minimatch": "^3.0.0", + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.7.2", + "typescript": "3.7.x" + }, + "dependencies": { + "typescript": { + "version": "3.7.7", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.7.tgz", + "integrity": "sha512-MmQdgo/XenfZPvVLtKZOq9jQQvzaUAUpcKW8Z43x9B2fOm4S5g//tPtMweZUIP+SoBqrVPEIm+dJeQ9dfO0QdA==", + "dev": true + } + } + }, + "typedoc-default-themes": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", + "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.8", + "underscore": "^1.9.1" + } + }, "typescript": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz", - "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==", - "dev": true - } - } - }, - "typedoc-default-themes": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz", - "integrity": "sha512-fiFKlFO6VTqjcno8w6WpTsbCgXmfPHVjnLfYkmByZE7moaz+E2DSpAT+oHtDHv7E0BM5kAhPrHJELP2J2Y2T9A==", - "dev": true, - "requires": { - "backbone": "^1.4.0", - "jquery": "^3.4.1", - "lunr": "^2.3.8", - "underscore": "^1.9.1" - } - }, - "typescript": { - "version": "3.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.5.tgz", - "integrity": "sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ==", - "dev": true - }, - "typescript-coverage-report": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", - "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", - "dev": true, - "requires": { - "colors": "^1.4.0", - "commander": "^5.0.0", - "ncp": "^2.0.0", - "react": "^16.13.1", - "react-dom": "^16.13.1", - "rimraf": "^3.0.2", - "semantic-ui-react": "^0.88.2", - "terminal-table": "^0.0.12", - "type-coverage-core": "^2.4.1", - "typescript": "^3.8.3" - }, - "dependencies": { - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true - } - } - }, - "uglify-js": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", - "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==", - "dev": true, - "optional": true - }, - "underscore": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", - "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "optional": true, - "requires": { - "punycode": "^2.1.0" - }, - "dependencies": { - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true - } - } - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "optional": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", - "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "optional": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "warning": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", - "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "window-size": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", - "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=", - "optional": true - }, - "winston": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", - "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", - "optional": true, - "requires": { - "async": "~1.0.0", - "colors": "1.0.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", - "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=", - "optional": true - } - } - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "optional": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "optional": true - }, - "yargs": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", - "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", - "optional": true, - "requires": { - "camelcase": "^2.0.1", - "cliui": "^3.0.3", - "decamelize": "^1.1.1", - "os-locale": "^1.4.0", - "string-width": "^1.0.1", - "window-size": "^0.1.4", - "y18n": "^3.2.0" - } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "typescript-coverage-report": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/typescript-coverage-report/-/typescript-coverage-report-0.1.3.tgz", + "integrity": "sha512-fvTlmz//XUZSZRc9BqpseymTJlpP6YlCj2dzYy10BZJJ6FbdXcvFSH3MNLi+HaAu4i+eAkuzjCWzqECCTKZeuQ==", + "dev": true, + "requires": { + "colors": "^1.4.0", + "commander": "^5.0.0", + "ncp": "^2.0.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "rimraf": "^3.0.2", + "semantic-ui-react": "^0.88.2", + "terminal-table": "^0.0.12", + "type-coverage-core": "^2.4.1", + "typescript": "^3.8.3" + }, + "dependencies": { + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + } + } }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "uglify-js": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "dev": true, + "optional": true }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" - } + "underscore": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.0.tgz", + "integrity": "sha512-sCs4H3pCytsb5K7i072FAEC9YlSYFIbosvM0tAKAlpSSUgD7yC1iXSEGdl5XrDKQ1YUB+p/HDzYrSG2H2Vl36g==", + "dev": true + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + } + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "winston": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.5.tgz", + "integrity": "sha512-TWoamHt5yYvsMarGlGEQE59SbJHqGsZV8/lwC+iCcGeAe0vUaOh+Lv6SYM17ouzC/a/LB1/hz/7sxFBtlu1l4A==", + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" + } + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true }, "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" }, "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } - } } diff --git a/trustid-sdk/package.json b/trustid-sdk/package.json old mode 100644 new mode 100755 index 363789e2..38c433d1 --- a/trustid-sdk/package.json +++ b/trustid-sdk/package.json @@ -26,15 +26,16 @@ "dependencies": { "@types/mongoose": "^5.7.14", "@types/node": "^13.7.1", - "axios": "^0.21.1", "crypto-js": "^4.0.0", + "fabric-ca-client": "2.2.5", + "fabric-network": "v2.2.5", "fs": "0.0.1-security", "jose": "^1.22.1", "mongoose": "^5.10.13", - "node": "^13.12.0", "node-jose": "git+https://github.com/cisco/node-jose.git", "optional": "^0.1.4", - "path": "^0.12.7" + "path": "^0.12.7", + "shamirs-secret-sharing": "1.0.1" }, "devDependencies": { "@types/chai": "^4.2.11", @@ -51,8 +52,5 @@ "typescript": "^3.8.3", "typescript-coverage-report": "^0.1.3" }, - "optionalDependencies": { - "fabric-ca-client": "2.1.0", - "fabric-network": "v2.1.0" - } -} \ No newline at end of file + "optionalDependencies": {} +} diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index 29820c06..b69d32e5 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -5,9 +5,12 @@ Copyright 2020 Telefónica Digital España. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ -import {JWK, JWS} from "node-jose"; +import { + JWK, + JWS +} from "node-jose"; import crypto from "crypto-js"; -import { Console } from "console"; +const sss = require('shamirs-secret-sharing'); @@ -22,6 +25,9 @@ export class DID { public unlockTimestamp: any; public tempPrivKey: string; public networkID: string; + public recoveryKey: string; + + // TODO: Default parameters for now: // Default: 2048 for RSA, 'P-256' for EC, 'Ed25519' for OKP and 256 for oct. @@ -43,24 +49,51 @@ export class DID { this.unlockedKey = null; this.unlockTimestamp = 0; this.networkID = ""; + this.recoveryKey = ""; + } // TODO: Can we do this more efficiently? - private async keyGeneration(): Promise { + private async keyGeneration(): Promise < JWK.Key > { switch (this.type) { case "RSA": - return JWK.createKey("RSA", 2048, {alg: ""}); + return JWK.createKey("RSA", 2048, { + alg: "" + }); case "EC": - return JWK.createKey("EC", "P-521", {alg: ""}); + return JWK.createKey("EC", "P-521", { + alg: "" + }); case "oct": - return JWK.createKey("oct", 256, {alg: ""}); + return JWK.createKey("oct", 256, { + alg: "" + }); default: throw new Error("Key algorithm not supported"); } } + + + public async createKeySSS(shares: number = 1, threshold: number = 1) { + // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { + let key = await this.keyGeneration(); + let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); + this.id = `did:vtn:trustid:${addr}`; + this.pubkey = key.toPEM(); + let pk = key.toPEM(true); + const secret = Buffer.from(pk) + const secrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return secrets + } + } public async createKey(passphrase: string = "") { // Only createKey for DID if not already created. + if (this.privkey + this.id + this.pubkey === "") { let key = await this.keyGeneration(); let addr = crypto.SHA256(key.toPEM(false)).toString(crypto.enc.Hex); @@ -71,7 +104,7 @@ export class DID { } } - public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise { + public async unlockAccount(passphrase: string = "", tempPassphrase: string = "", timeout: number = 30): Promise < DID > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = crypto.AES.decrypt(this.privkey, passphrase).toString(crypto.enc.Utf8); @@ -84,14 +117,41 @@ export class DID { throw new Error("Private key couldn't be deciphered"); } } - public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise { + public async updatePassword(oldPassphrase: string = "", passphrase: string = ""): Promise < DID > { + try { + + const pem = crypto.AES.decrypt(this.privkey, oldPassphrase).toString(crypto.enc.Utf8); + this.unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(this.unlockedKey.toPEM(true), passphrase).toString(); + return this + } catch { + throw new Error("Private key couldn't be deciphered"); + } + } + + + public async unlockAccountSSS(secrets: string[], timeout: number = 30): Promise < DID > { + try { + this.unlockTimestamp = Date.now() + timeout * 1000; + const pem = sss.combine(secrets).toString(); + this.unlockedKey = await JWK.asKey(pem, "pem"); + return this + } catch (err) { + throw new Error(err); + } + } + + + + + public async unlockAccountTemp(passphrase: string = "", timeout: number = 60000): Promise < void > { try { this.unlockTimestamp = Date.now() + timeout * 1000; const pem = await crypto.AES.decrypt(this.tempPrivKey, passphrase); const parsed = pem.toString(crypto.enc.Utf8); this.unlockedKey = await JWK.asKey(parsed, "pem"); return - } catch (err){ + } catch (err) { throw err; } } @@ -100,8 +160,62 @@ export class DID { this.unlockedKey = undefined; } + public async generateRecoveryKey(password: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccount(password); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { + // Only createKey for DID if not already created. + try { + await this.unlockAccountTemp(passwordTemp); + const pk = this.unlockedKey.toPEM(true); + const secret = Buffer.from(pk) + const newSecrets = sss.split(secret, { + shares: shares, + threshold: threshold + }) + return newSecrets + } catch (err) { + throw err; + } + } + + + /* el nuevo */ + public async recoverKey(secrets: Buffer[], newPassword: string): Promise < DID > { + // Only createKey for DID if not already created. + try { + const pem = sss.combine(secrets); + const unlockedKey = await JWK.asKey(pem, "pem"); + this.privkey = crypto.AES.encrypt(unlockedKey.toPEM(true), newPassword).toString(); + return this; + } catch (err) { + throw err; + } + } public loadFromObject(obj: any): void { - let { id, type, controller, access, pubkey, privkey, tempPrivKey, unlockTimestamp, networkID } = obj; + let { + id, + type, + controller, + access, + pubkey, + privkey, + tempPrivKey, + unlockTimestamp, + networkID + } = obj; this.id = id; this.type = type; this.controller = controller; @@ -125,48 +239,69 @@ export class DID { } public importDID(obj: any) { - const fieldsMandatory = ["pubkey", "privkey"] - if(obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')){ + if (obj.hasOwnProperty('pubkey') && obj.hasOwnProperty('privkey') && obj.hasOwnProperty('type')) { const did = new DID(); did.loadFromObject(obj); let addr = crypto.SHA256(obj.pubkey.toString(crypto.enc.Hex)); this.id = `did:vtn:trustid:${addr}`; - - } - else{ + + } else { throw new Error("Field pubkey or privkey is missing"); } - + } /** sign Generates a JWS from a payload using an id from the wallet */ - public async sign(payload: object): Promise { - try{ - if (!this.unlockedKey) { - throw Error("You must unlock the account before signing the message."); - } - var buf = Buffer.from(JSON.stringify(payload)); - let sign = await JWS.createSign( - { - fields: {cty: "jwk+json"}, - format: "compact", - }, - this.unlockedKey - ) - .update(buf) - .final(); - - return sign.toString(); - } - catch(err) { - throw err; - } + public async sign(payload: object): Promise < string > { + try { + if (!this.unlockedKey) { + throw Error("You must unlock the account before signing the message."); + } + var buf = Buffer.from(JSON.stringify(payload)); + let sign = await JWS.createSign({ + fields: { + cty: "jwk+json" + }, + format: "compact", + }, + this.unlockedKey + ) + .update(buf) + .final(); + + return sign.toString(); + } catch (err) { + throw err; + } } /** verify Verifies a JWS from a payload using a did */ - public async verify(signature: string, did: DID): Promise { + public async verify(signature: string, did: DID): Promise < any > { let pk = await JWK.asKey(did.pubkey, "pem"); let verify = await JWS.createVerify(pk).verify(signature); return JSON.parse(verify.payload.toString()); } + + public generateRandomKey(): string { + const words = crypto.lib.WordArray.random(32); + return words.toString(); + } + + public cipherChunkSSS(password: string, share: Buffer): string { + // Only createKey for DID if not already created. + try { + return crypto.AES.encrypt(share.toString('hex'), password).toString(); + } catch (err) { + throw err; + } + } + public decipherChunkSSS(password: string, cipheredShare: string): Buffer { + // Only createKey for DID if not already created. + try { + const decipheredShare = crypto.AES.decrypt(cipheredShare, password).toString(crypto.enc.Utf8) + return Buffer.from(decipheredShare, 'hex'); + } catch (err) { + throw err; + } + } } \ No newline at end of file diff --git a/trustid-sdk/src/keystores/mongoKeystore.ts b/trustid-sdk/src/keystores/mongoKeystore.ts index d05c62fa..65375de4 100644 --- a/trustid-sdk/src/keystores/mongoKeystore.ts +++ b/trustid-sdk/src/keystores/mongoKeystore.ts @@ -78,7 +78,6 @@ export class MongoKeystore extends Keystore { try { // Store DID in Mongo. Modify if it exists, create if it doesn't const didObj = await DIDModel.findOne({ id: did.id }); - console.log(didObj) if(!didObj){ await DIDModel.create(did); return true; @@ -97,10 +96,9 @@ export class MongoKeystore extends Keystore { public async updateDID(did: DID): Promise { try { // Store DID in Mongo. Modify if it exists, create if it doesn't - console.log(did.tempPrivKey) const didObj = await DIDModel.updateOne( {id: did.id }, - {tempPrivKey: did.tempPrivKey }, + did, ); this.keystore[did.id] = did // update in memory keystore return true; diff --git a/trustid-sdk/src/wallet.ts b/trustid-sdk/src/wallet.ts index fe3fe512..da443b56 100644 --- a/trustid-sdk/src/wallet.ts +++ b/trustid-sdk/src/wallet.ts @@ -53,6 +53,7 @@ export class Wallet { this.keystore = keystore; } + /** generateDID generates a new DID in the wallet */ /** generateDID generates a new DID in the wallet */ public async generateDID(type: string, controller: string = "default", passphrase: string = ""): Promise { const value: DID = new DID(type, controller); @@ -61,12 +62,40 @@ export class Wallet { return value; } + /** generateDID generates a new DID in the wallet */ + public async generateDIDwithSSS(type: string, controller: string = "default", shares: number = 3, threshold: number = 1): Promise { + const value: DID = new DID(type, controller); + const secrets = await value.createKeySSS(shares, threshold); + await this.keystore.storeDID(value); + const did = { + did: value, + secrets: secrets + } + return did; + } + + /** Recovers the keyt */ + public async recoverKeySSS(id: string, secrets: Buffer[], newPassword: string): Promise{ + const did = await this.getDID(id) + const recoveredDID = await did.recoverKey(secrets, newPassword); + await this.keystore.updateDID(recoveredDID) + return; + } + /** updateTempKeyDID updates the temp key for a DID */ public async updateTempKeyDID(id: string, passphrase: string = "",tempPassphrase: string=""): Promise { const did = await this.keystore.getDID(id); const unlockedDID = await did.unlockAccount(passphrase, tempPassphrase) await this.keystore.updateDID(unlockedDID) } + + public async updatePassword(id: string, oldPassphrase: string = "",passphrase: string=""): Promise { + const did = await this.keystore.getDID(id); + const unlockedDID = await did.updatePassword(oldPassphrase, passphrase); + await this.keystore.updateDID(unlockedDID) + } + + /** Set the Keystore to use in the wallet. */ public addNetwork(id: string, network: TrustID): void { this.networks[id] = network; diff --git a/trustid-sdk/test/unit/wallet.spec.ts b/trustid-sdk/test/unit/wallet.spec.ts index 049f2620..fd2bfc25 100644 --- a/trustid-sdk/test/unit/wallet.spec.ts +++ b/trustid-sdk/test/unit/wallet.spec.ts @@ -173,6 +173,35 @@ describe('Wallet tests', () => { }); - + + it('Create did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + expect(obj.secrets.length).to.equal(3); + } catch(err) { + // expect(err).to.be.an('error'); + } + }) + + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 1); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + console.log(err) + // expect(err).to.be.an('error'); + } + }) + it('Unlock did SSS', async() => { + try { + const obj = await wal.generateDIDwithSSS('EC', 'default', 3, 3); + const array = [obj.secrets[0], obj.secrets[1]] + obj.did.unlockAccountSSS(array) + } catch(err) { + expect(err).to.be.an('error'); + } + }) + }); From 622fc29a86472ae01ddcb9b6e3bd10aef962d414 Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Date: Fri, 16 Apr 2021 09:07:52 +0200 Subject: [PATCH 22/25] deleted comment Signed-off-by: Maria Teresa Nieto --- trustid-sdk/src/core/did.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index a0dc9601..7b2af721 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -175,7 +175,7 @@ export class DID { } } public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { - // Only createKey for DID if not already created. + try { await this.unlockAccountTemp(passwordTemp); const pk = this.unlockedKey.toPEM(true); From ea249979fc47ee89925440409ddfdd7fa9182cfc Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Date: Fri, 16 Apr 2021 09:07:52 +0200 Subject: [PATCH 23/25] deleted comment Signed-off-by: Maria Teresa Nieto --- trustid-sdk/src/core/did.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index a0dc9601..7b2af721 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -175,7 +175,7 @@ export class DID { } } public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { - // Only createKey for DID if not already created. + try { await this.unlockAccountTemp(passwordTemp); const pk = this.unlockedKey.toPEM(true); From 72cbf7f61836dbcf8acd766b586f12ddbd6bcb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Teresa=20Nieto?= Date: Fri, 16 Apr 2021 09:18:26 +0200 Subject: [PATCH 24/25] Deleted comment (#37) * initial commit Signed-off-by: Maria Teresa Nieto * added chaincode to repo Signed-off-by: Maria Teresa Nieto * Updated readme Signed-off-by: Maria Teresa Nieto * contributors file Signed-off-by: Maria Teresa Nieto * Migrated private repo (#13) Co-authored-by: Ry Jones * Updated Controllers and contributors (#16) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added contributing file Co-authored-by: adlrocha Co-authored-by: Ry Jones * Getting started (#18) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added new controller management (#14) * Migrated private repo (#13) Co-authored-by: Ry Jones * added create delegated identity Signed-off-by: Maria Teresa Nieto Co-authored-by: Ry Jones Co-authored-by: Maria Teresa Nieto Galan * Added contributing file * Updated getting started * fixed #16. Added getting started and examples Signed-off-by: Alfonso de la Rocha Co-authored-by: adlrocha Co-authored-by: Ry Jones * Mongo driver changed (#21) * Migrating from private repo * Added .gitignore to SDK * Preparing npm package. Fixed README (#7) * Preparing npm package * Preparing npm package Signed-off-by: adlrocha * minor fix (#11) Signed-off-by: Alfonso de la Rocha * added create delegated identity Signed-off-by: Maria Teresa Nieto * Added new controller management (#14) * Migrated private repo (#13) Co-authored-by: Ry Jones * added create delegated identity Signed-off-by: Maria Teresa Nieto Co-authored-by: Ry Jones Co-authored-by: Maria Teresa Nieto Galan * Added contributing file * Updated getting started * fixed #16. Added getting started and examples Signed-off-by: Alfonso de la Rocha * Fixed bugs and changed mongo driver Co-authored-by: adlrocha Co-authored-by: Ry Jones * Bump lodash from 4.17.15 to 4.17.20 in /trustid-sdk (#20) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump bl from 2.2.0 to 2.2.1 in /trustid-sdk (#19) Bumps [bl](https://github.com/rvagg/bl) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v2.2.0...v2.2.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * added update service functionalities, upadate docs, logging and error managing (#27) Signed-off-by: Maria Teresa Nieto * Bump highlight.js from 9.18.1 to 9.18.5 in /trustid-sdk (#22) Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump lodash from 4.17.15 to 4.17.20 in /trustid-sdk (#28) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump axios from 0.19.2 to 0.21.1 in /trustid-sdk (#24) Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump ini from 1.3.5 to 1.3.8 in /trustid-sdk (#23) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump elliptic from 6.5.3 to 6.5.4 in /trustid-sdk (#31) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump y18n from 3.2.1 to 3.2.2 in /trustid-sdk Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) Signed-off-by: dependabot[bot] * added recovery functions Signed-off-by: Maria Teresa Nieto * added recovery functions Signed-off-by: Maria Teresa Nieto * deleted comment Signed-off-by: Maria Teresa Nieto Co-authored-by: Ry Jones Co-authored-by: Alfonso de la Rocha Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- trustid-sdk/package-lock.json | 56 +++++++++++++---------------------- trustid-sdk/src/core/did.ts | 2 -- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/trustid-sdk/package-lock.json b/trustid-sdk/package-lock.json index 94d7820d..88da0e56 100644 --- a/trustid-sdk/package-lock.json +++ b/trustid-sdk/package-lock.json @@ -258,9 +258,9 @@ } }, "@types/node": { - "version": "13.13.49", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.49.tgz", - "integrity": "sha512-v5fPzKjPAZ33/G4X8EXvGlbHFKQClfKAz1bKF/+cKaWss9lAIqrOETfcFNL3xG+DG2VCEev+dK4/lCa+YZaxBA==" + "version": "13.13.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.50.tgz", + "integrity": "sha512-y7kkh+hX/0jZNxMyBR/6asG0QMSaPSzgeVK63dhWHl4QAXCQB8lExXmzLL6SzmOgKHydtawpMnNhlDbv7DXPEA==" }, "@types/node-jose": { "version": "1.1.5", @@ -1755,27 +1755,27 @@ } }, "mongodb": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", - "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz", + "integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==", "requires": { "bl": "^2.2.1", "bson": "^1.1.4", "denque": "^1.4.1", - "require_optional": "^1.0.1", + "optional-require": "^1.0.2", "safe-buffer": "^5.1.2", "saslprep": "^1.0.0" } }, "mongoose": { - "version": "5.12.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.3.tgz", - "integrity": "sha512-frsSR9yeldaRpSUeTegXCSB0Tu5UGq8sHuHBuEV31Jk3COyxlKFQPL7UsdMhxPUCmk74FpOYSmNwxhWBEqgzQg==", + "version": "5.12.4", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.4.tgz", + "integrity": "sha512-iVREPLK/35ylEdaNBCStwTugyUYDv7ZuI7maSW7CdCgAX4dMW4be1CdKvZHJtlexO/ugKphMMFL9/bppcWXQ9Q==", "requires": { "@types/mongodb": "^3.5.27", "bson": "^1.1.4", "kareem": "2.3.2", - "mongodb": "3.6.5", + "mongodb": "3.6.6", "mongoose-legacy-pluralize": "1.0.2", "mpath": "0.8.3", "mquery": "3.2.5", @@ -2006,6 +2006,11 @@ "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" }, + "optional-require": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", + "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" + }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -2352,22 +2357,6 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -2378,11 +2367,6 @@ "path-parse": "^1.0.6" } }, - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -2872,9 +2856,9 @@ } }, "underscore": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.0.tgz", - "integrity": "sha512-sCs4H3pCytsb5K7i072FAEC9YlSYFIbosvM0tAKAlpSSUgD7yC1iXSEGdl5XrDKQ1YUB+p/HDzYrSG2H2Vl36g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.1.tgz", + "integrity": "sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g==", "dev": true }, "universalify": { @@ -3168,4 +3152,4 @@ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" } } -} +} \ No newline at end of file diff --git a/trustid-sdk/src/core/did.ts b/trustid-sdk/src/core/did.ts index b69d32e5..c61ec376 100644 --- a/trustid-sdk/src/core/did.ts +++ b/trustid-sdk/src/core/did.ts @@ -161,7 +161,6 @@ export class DID { } public async generateRecoveryKey(password: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { - // Only createKey for DID if not already created. try { await this.unlockAccount(password); const pk = this.unlockedKey.toPEM(true); @@ -176,7 +175,6 @@ export class DID { } } public async generateRecoveryKeyTemp(passwordTemp: string, shares: number = 1, threshold: number = 1): Promise < Buffer[] > { - // Only createKey for DID if not already created. try { await this.unlockAccountTemp(passwordTemp); const pk = this.unlockedKey.toPEM(true); From b37c503beb94688bb1d7b4d193f63d0671e11ae9 Mon Sep 17 00:00:00 2001 From: Maria Teresa Nieto Date: Wed, 19 May 2021 09:05:42 +0200 Subject: [PATCH 25/25] added readme --- trustid-sdk/README.md | 173 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 173 insertions(+) create mode 100644 trustid-sdk/README.md diff --git a/trustid-sdk/README.md b/trustid-sdk/README.md new file mode 100644 index 00000000..267b3f6f --- /dev/null +++ b/trustid-sdk/README.md @@ -0,0 +1,173 @@ +# TRUSTID SDK + + +This SDK exposes all the functionalities required to interact with +TRUSTID-based DLT networks. + +### Install +* To install this library you need access to the private repo: +``` +$ npm install @hyperledger-labs/trustid-sdk@1.0.0 + +``` + +### Getting started + +To use the sdk it's necessary to read the [Getting started guide](../README.md) + +The SDK to connect with Hyperledger Fabric will need to configure the connection. On one side we need the hyperledger fabric standard [connection profile](./connection-profile.json), on the othe side we will need to complete de following configuration in a JSON object. +```js +{ + stateStore: '', + caURL: '', + caName: '', + caAdmin: '', + caPassword: '', + tlsOptions: { + trustedRoots:"", + verify: false + }, + mspId: '', + walletID: '', + asLocalhost: , + ccp: connection profile commented bellow, + chaincodeName: "name of the identity chaincode deployed", + fcn: "proxy", + channel: "" +} + +``` + +### Example of use +You can find a set of examples using the SDK in the [examples](../examples) directory. + +```js +// Use library +var id = require('trustid-sdk') +import { TrustIdHf, Keystore, FileKeystore } from 'trustid-sdk'; +import {AccessPolicy, PolicyType} from 'trustid-sdk'; + +// Initialize wallet +wal = id.Wallet.Instance; + +// Create Keystore +ks = new FileKeystore(); +// Set keystore in wallet +wal.setKeystore(ks) +// LoadKeystore from file + wal.loadKeystore('file', './keystore') +// Set endpoint of driver and store in variable to use it. +let ccp = JSON.parse(fs.readFileSync(ccpPath, 'utf8')); +let config = { + stateStore: '/tmp/statestore', + caURL: 'https://ca.org1.telefonica.com:7054', + caName: 'ca.org1.telefonica.com', + caAdmin: 'adminCA', + caPassword: 'adminpw', + tlsOptions: { + trustedRoots:"-----BEGIN CERTIFICATE-----MIICTjCCAfSgAwIBAgIRAPz6Z66RGDs2BDghYGuShw4wCgYIKoZIzj0EAwIwcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMB4XDTIwMDUxMjEzMDIwMFoXDTMwMDUxMDEzMDIwMFowcTELMAkGA1UEBhMCRVMxDzANBgNVBAgTBk1hZHJpZDEPMA0GA1UEBxMGTWFkcmlkMRwwGgYDVQQKExNvcmcxLnRlbGVmb25pY2EuY29tMSIwIAYDVQQDExl0bHNjYS5vcmcxLnRlbGVmb25pY2EuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaJraPeAMD+qMba9gNfzwhhfSQNDStqhkvGdPKfxjl+5YoZ+AZkf5qXUPCbSVFh2rlIagZQzcxLnxRmwguEDJjaNtMGswDgYDVR0PAQH/BAQDAgGmMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MCkGA1UdDgQiBCDxTrECkDkA2zbsZ7US807jJKKmZ6E90QYkjC7szbQrQDAKBggqhkjOPQQDAgNIADBFAiEAmFFB79r8Jqu4QEgNRQEWEWrY9g70pEUIL4cwq7Zj//UCIDoOuRhihvbFsLTSNbK31VzmL5lXvZGwzvS60n9xk33B-----END CERTIFICATE-----", + verify: false + }, + mspId: 'org1MSP', + walletID: 'admin', + asLocalhost: true, + ccp: ccp, + chaincodeName: "identitycc", + fcn: "proxy", + channel: "telefonicachannel" +} + +const trustID = new TrustIdHf(config); +wal.addNetwork("hf", trustID); +await wal.networks["hf"].configureDriver(); + +// Use the wallet and the driver +wal.generateDID("RSA") +await wal.networks["hf"].createIdentity(wal.getDID("default")) +await trustID.getIdentity(wal.getDID("default"), wal.getDID("default").id); + +let access: AccessPolicy = {policy: PolicyType.PublicPolicy}; + +await trustID.createService(wal.getDID("default"), `vtn:trustos:service:1`, "chaincode", access, "mychannel"); + +``` + +### Structure +The library has the following modules: + + +* `wallet.ts`: Core module of the library. It wraps all the state and +logic for identity management and interaction with TrustID networks. +To start using the SDK a new wallet needs to be initialized. A wallet +exposes the following methods: + * `public setKeystore(keystore: Keystore): void`: Sets a type of keystore, supported: In memory, filesystem, mongodb + * `public generateDID(type: string, controller: string, passphrase): DID`: Generates an identity + * `public storeDID(did: DID): Promise`: Stores the did in the keystore + * `public updateDID(did: DID): Promise `: Updates info from DID + * `public listDID(): string[]`: Returns dids stored in keystore + * `public recoverKeySSS(id: string, secrets: Buffer[], newPassword: string): Promise`: Recovers the key + * `public updatePassword(id: string, oldPassphrase:,passphrase: string=""): Promise `: Updates the password to unlock the did + * `public updateTempKeyDID(id: string, passphrase:,tempPassphrase: string=""): Promise`: Unlocks the account with a temporal key + * `public addNetwork(id: string, network: TrustID): void`: Adds a new network to interact to. + + +* `class DID`: Has the following structure. + * `public id: string`: Id string that identifies the DID. + * `public pubkey: string`: PublicKey of the DID. + * `public type: string`: Key type (RSA / EC / OKP). + * `public controller: string`: Verifier of the identity + * `public access: number`: Access level. This is the access level to be checked in the service AccessPolicy threshold. + * `private privkey: string`: Private Key of the DID. + + And exposes the following functions: + * `public unlockAccount(passphrase: string = ""): void`: Unlocks private key in order to use the DID. + * `public lockAccount(): any`: Locks the private key for a DID. + * `public sign(payload: object, passphrase: string = ""): string`: Sign a payload with a specific DID. + * `public verify(signature: string, id: string = "default"): any`: Verifies a signature from a DID. + +* `TrustID.ts`: Interface that enables the inteoperation between the drivers and the different functionalities of TrustID. The only component implemented currently is the `trustIDhf.ts` enabling the interaction with Hyperledger Fabric TrustID +networks. + + * `configureDriver(endpoint: string): void`: Sets the network endpoint to interact with the TrustID network. + * `disconnectDriver(endpoint: string): void`: Disconects the network endpoint to interact with the TrustID network. + * `createIdentity(did: DID): Promise`: Create an identity in TrustID. It generates a new DID in the wallet and register it in the network. + * `importIdentity(did: DID, controller?: DID)`: Imports an existing identity to the chaincode + * `verifyIdentity(adminDID: DID, id:string): Promise`: Verifies an identity as an admin. + * `getIdentity(did: DID, id: string): * Promise`: Gets a registered identity from TrustID. + * `revokeIdentity(adminDID: DID, id: string): Promise`: Revokes a registered identity. Only supported by the owner or controller of the DID. + * `createService(did: DID, serviceDID: string, name: string, isPublic: boolean): Promise`: Creates a new service in the TrustID network. + * `updateService(did: DID, serviceDID: string, access: Access, isPublic: boolean): Promise`: Updates the information from a service. + * `updateServiceAccess(did: DID, serviceDID: string, access: AccessPolicy): Promise`: Updates the access from a service. + * `getService(did: DID, serviceDID: string): Promise`: Gets information from a registered service. + * `invoke (did: DID, serviceDID: string, args: string[], channel: string): Promise`: Invokes a function of a registered service in the TrustID network. + * `query(did: DID, serviceDID: string, args: string[], channel: string): Promise`: Queries a function of a registered service in the TrustID network + + * `PolicyType (policy: PolicyType, threshold:?Number, registry:?object)`: It + defined the policyType to be used for a service. There are currently three + types of policyTypes supported (more could be easily added according to + your needs) + * PublicPolicy: Grants public access by any user to your service. + * SameControllerPolicy: Only verified identities whose controller is the + same controller who created the service has access to the service (this + policy comes pretty handy when you want to define "corporate-wide" services). + * FineGrainedPolicy: Grants fine-grained access to users to your service. + In this policy you explicitly define the access of users to the service. + There are two ways of using this policyType, you can define a threshold + so every user with an access level equal or higher than the threshold + is granted access to the service; or you could use fine-grained + access levels defined in the registry, where you would add the following + tuple: `{, }`. Thus, only users in the registry + with an access level over the threshold will be granted access to the + service with `access_role` permissions. + + + +* `keystore.ts`: Interface that enables the implementation of keystore storages. + There are currently two implementations of keystore supported: `FileKeystore.ts` (to store DIDs in file keystore)and `MongoKeystore.ts` (to store DIDs in MongoDB). + + * `abstract getDID(id: string): DID`: Get specific DID from keystore. + * `abstract storeDID(did: DID): boolean`: Store DID in keystore. + * `public storeInMemory(did: DID): boolean`: Store DID inMemory for easy and performant use. + * `public listDID(): string[]`: List DIDs in memory. + * `public setDefault(did: DID): boolean`: Set DID as default identity for the keystore wallet. +