@agnostack/verifyd 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/CODE_OF_CONDUCT.md +132 -0
- package/LICENSE +21 -0
- package/README.md +93 -0
- package/SECURITY.md +18 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +20 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/types.d.ts +1 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/dist/lib/types.js +1 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utils/errors.d.ts +6 -0
- package/dist/lib/utils/errors.d.ts.map +1 -0
- package/dist/lib/utils/errors.js +26 -0
- package/dist/lib/utils/errors.js.map +1 -0
- package/dist/lib/utils/index.d.ts +3 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +19 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/rawbody.d.ts +2 -0
- package/dist/lib/utils/rawbody.d.ts.map +1 -0
- package/dist/lib/utils/rawbody.js +60 -0
- package/dist/lib/utils/rawbody.js.map +1 -0
- package/dist/lib/verification.d.ts +10 -0
- package/dist/lib/verification.d.ts.map +1 -0
- package/dist/lib/verification.js +84 -0
- package/dist/lib/verification.js.map +1 -0
- package/dist/react/hooks/index.d.ts +2 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/index.js +18 -0
- package/dist/react/hooks/index.js.map +1 -0
- package/dist/react/hooks/useVerification.d.ts +8 -0
- package/dist/react/hooks/useVerification.d.ts.map +1 -0
- package/dist/react/hooks/useVerification.js +52 -0
- package/dist/react/hooks/useVerification.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +19 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/types.d.ts +1 -0
- package/dist/react/types.d.ts.map +1 -0
- package/dist/react/types.js +1 -0
- package/dist/react/types.js.map +1 -0
- package/dist/shared/WebCrypto.d.ts +55 -0
- package/dist/shared/WebCrypto.d.ts.map +1 -0
- package/dist/shared/WebCrypto.js +342 -0
- package/dist/shared/WebCrypto.js.map +1 -0
- package/dist/shared/datetime.d.ts +96 -0
- package/dist/shared/datetime.d.ts.map +1 -0
- package/dist/shared/datetime.js +295 -0
- package/dist/shared/datetime.js.map +1 -0
- package/dist/shared/display.d.ts +100 -0
- package/dist/shared/display.d.ts.map +1 -0
- package/dist/shared/display.js +481 -0
- package/dist/shared/display.js.map +1 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +28 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/request.d.ts +16 -0
- package/dist/shared/request.d.ts.map +1 -0
- package/dist/shared/request.js +60 -0
- package/dist/shared/request.js.map +1 -0
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +1 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/verification.d.ts +31 -0
- package/dist/shared/verification.d.ts.map +1 -0
- package/dist/shared/verification.js +91 -0
- package/dist/shared/verification.js.map +1 -0
- package/dist/umd/lib/index.js +2204 -0
- package/dist/umd/lib/index.js.map +1 -0
- package/dist/umd/lib/lib/index.d.ts +4 -0
- package/dist/umd/lib/lib/index.d.ts.map +1 -0
- package/dist/umd/lib/lib/types.d.ts +1 -0
- package/dist/umd/lib/lib/types.d.ts.map +1 -0
- package/dist/umd/lib/lib/utils/errors.d.ts +6 -0
- package/dist/umd/lib/lib/utils/errors.d.ts.map +1 -0
- package/dist/umd/lib/lib/utils/index.d.ts +3 -0
- package/dist/umd/lib/lib/utils/index.d.ts.map +1 -0
- package/dist/umd/lib/lib/utils/rawbody.d.ts +2 -0
- package/dist/umd/lib/lib/utils/rawbody.d.ts.map +1 -0
- package/dist/umd/lib/lib/verification.d.ts +10 -0
- package/dist/umd/lib/lib/verification.d.ts.map +1 -0
- package/dist/umd/lib/react/hooks/index.d.ts +2 -0
- package/dist/umd/lib/react/hooks/index.d.ts.map +1 -0
- package/dist/umd/lib/react/hooks/useVerification.d.ts +8 -0
- package/dist/umd/lib/react/hooks/useVerification.d.ts.map +1 -0
- package/dist/umd/lib/react/index.d.ts +3 -0
- package/dist/umd/lib/react/index.d.ts.map +1 -0
- package/dist/umd/lib/react/types.d.ts +1 -0
- package/dist/umd/lib/react/types.d.ts.map +1 -0
- package/dist/umd/lib/shared/WebCrypto.d.ts +55 -0
- package/dist/umd/lib/shared/WebCrypto.d.ts.map +1 -0
- package/dist/umd/lib/shared/datetime.d.ts +96 -0
- package/dist/umd/lib/shared/datetime.d.ts.map +1 -0
- package/dist/umd/lib/shared/display.d.ts +100 -0
- package/dist/umd/lib/shared/display.d.ts.map +1 -0
- package/dist/umd/lib/shared/index.d.ts +6 -0
- package/dist/umd/lib/shared/index.d.ts.map +1 -0
- package/dist/umd/lib/shared/request.d.ts +16 -0
- package/dist/umd/lib/shared/request.d.ts.map +1 -0
- package/dist/umd/lib/shared/types.d.ts +1 -0
- package/dist/umd/lib/shared/types.d.ts.map +1 -0
- package/dist/umd/lib/shared/verification.d.ts +31 -0
- package/dist/umd/lib/shared/verification.d.ts.map +1 -0
- package/node_modules/browser-monads-ts/LICENSE +21 -0
- package/node_modules/browser-monads-ts/README.md +46 -0
- package/node_modules/browser-monads-ts/dist/browser-monads-ts.cjs.js +2 -0
- package/node_modules/browser-monads-ts/dist/browser-monads-ts.cjs.js.map +1 -0
- package/node_modules/browser-monads-ts/dist/browser-monads-ts.es.js +12 -0
- package/node_modules/browser-monads-ts/dist/browser-monads-ts.es.js.map +1 -0
- package/node_modules/browser-monads-ts/dist/index.d.ts +5 -0
- package/node_modules/browser-monads-ts/dist/index.d.ts.map +1 -0
- package/node_modules/browser-monads-ts/package.json +79 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/http-errors/HISTORY.md +180 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +289 -0
- package/node_modules/http-errors/package.json +50 -0
- package/node_modules/iconv-lite/Changelog.md +162 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +156 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/node_modules/iconv-lite/encodings/index.js +22 -0
- package/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/node_modules/iconv-lite/lib/index.js +153 -0
- package/node_modules/iconv-lite/lib/streams.js +121 -0
- package/node_modules/iconv-lite/package.json +46 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/nothing-mock/LICENSE +21 -0
- package/node_modules/nothing-mock/README.md +266 -0
- package/node_modules/nothing-mock/dist/nothing-mock.es.js +2 -0
- package/node_modules/nothing-mock/dist/nothing-mock.es.js.map +1 -0
- package/node_modules/nothing-mock/dist/nothing-mock.js +2 -0
- package/node_modules/nothing-mock/dist/nothing-mock.js.map +1 -0
- package/node_modules/nothing-mock/dist/nothing-mock.modern.js +2 -0
- package/node_modules/nothing-mock/dist/nothing-mock.modern.js.map +1 -0
- package/node_modules/nothing-mock/dist/nothing-mock.umd.js +2 -0
- package/node_modules/nothing-mock/dist/nothing-mock.umd.js.map +1 -0
- package/node_modules/nothing-mock/index.d.ts +6 -0
- package/node_modules/nothing-mock/package.json +29 -0
- package/node_modules/nothing-mock/src/index.js +15 -0
- package/node_modules/raw-body/HISTORY.md +308 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +49 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/statuses/HISTORY.md +82 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +136 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/package.json +127 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.useVerification = void 0;
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
const verification_1 = require("../../shared/verification");
|
|
26
|
+
const useVerification = (_a = {}) => {
|
|
27
|
+
var { publicKey, disableRecryption } = _a, params = __rest(_a, ["publicKey", "disableRecryption"]);
|
|
28
|
+
const [keysData, setKeysData] = (0, react_1.useState)();
|
|
29
|
+
const ensureKeysData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
30
|
+
const _keysData = keysData !== null && keysData !== void 0 ? keysData : (yield (0, verification_1.getKeysData)(publicKey, params));
|
|
31
|
+
if (_keysData && !keysData) {
|
|
32
|
+
setKeysData(_keysData);
|
|
33
|
+
}
|
|
34
|
+
return _keysData;
|
|
35
|
+
});
|
|
36
|
+
const prepareVerification = (requestPath, requestOptions) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
|
+
const _keysData = yield ensureKeysData();
|
|
38
|
+
const _prepareVerification = (0, verification_1.prepareVerificationRequest)({ disableRecryption, keysData: _keysData });
|
|
39
|
+
return _prepareVerification(requestPath, requestOptions);
|
|
40
|
+
});
|
|
41
|
+
const processResponse = (encryptedResponse, derivedSecretKey) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
|
+
const _keysData = yield ensureKeysData();
|
|
43
|
+
const _processResponse = (0, verification_1.processVerificationResponse)({ disableRecryption, keysData: _keysData });
|
|
44
|
+
return _processResponse(encryptedResponse, derivedSecretKey);
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
prepareVerification,
|
|
48
|
+
processResponse,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.useVerification = useVerification;
|
|
52
|
+
//# sourceMappingURL=useVerification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useVerification.js","sourceRoot":"","sources":["../../../src/react/hooks/useVerification.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAgC;AAEhC,4DAIkC;AAE3B,MAAM,eAAe,GAAG,CAAC,KAA8C,EAAE,EAAE,EAAE;QAApD,EAAE,SAAS,EAAE,iBAAiB,OAAkB,EAAb,MAAM,cAAzC,kCAA2C,CAAF;IACvE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,GAAE,CAAA;IAE1C,MAAM,cAAc,GAAG,GAAS,EAAE;QAChC,MAAM,SAAS,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,CAAC,MAAM,IAAA,0BAAW,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAA;QACpE,IAAI,SAAS,IAAI,CAAC,QAAQ,EAAE;YAC1B,WAAW,CAAC,SAAS,CAAC,CAAA;SACvB;QAED,OAAO,SAAS,CAAA;IAClB,CAAC,CAAA,CAAA;IAED,MAAM,mBAAmB,GAAG,CAAO,WAAW,EAAE,cAAc,EAAE,EAAE;QAChE,MAAM,SAAS,GAAG,MAAM,cAAc,EAAE,CAAA;QACxC,MAAM,oBAAoB,GAAG,IAAA,yCAA0B,EAAC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;QAEnG,OAAO,oBAAoB,CAAC,WAAW,EAAE,cAAc,CAAC,CAAA;IAC1D,CAAC,CAAA,CAAA;IAED,MAAM,eAAe,GAAG,CAAO,iBAAiB,EAAE,gBAAgB,EAAE,EAAE;QACpE,MAAM,SAAS,GAAG,MAAM,cAAc,EAAE,CAAA;QACxC,MAAM,gBAAgB,GAAG,IAAA,0CAA2B,EAAC,EAAE,iBAAiB,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAA;QAEhG,OAAO,gBAAgB,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,CAAA;IAC9D,CAAC,CAAA,CAAA;IAED,OAAO;QACL,mBAAmB;QACnB,eAAe;KAChB,CAAA;AACH,CAAC,CAAA;AA9BY,QAAA,eAAe,mBA8B3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../shared"), exports);
|
|
18
|
+
__exportStar(require("./hooks"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,0CAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/react/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/react/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export default WebCrypto;
|
|
2
|
+
declare class WebCrypto {
|
|
3
|
+
constructor({ crypto: _crypto, util: _util }?: {
|
|
4
|
+
crypto: any;
|
|
5
|
+
util: any;
|
|
6
|
+
});
|
|
7
|
+
_crypto: any;
|
|
8
|
+
_util: any;
|
|
9
|
+
get subtle(): any;
|
|
10
|
+
getWebCrypto(): Promise<any>;
|
|
11
|
+
getTextDecoder(): Promise<any>;
|
|
12
|
+
getTextEncoder(): Promise<any>;
|
|
13
|
+
timingSafeEqual(value1: any, value2: any): boolean;
|
|
14
|
+
stringToHex(stringValue: any): string;
|
|
15
|
+
hexToString(hexValue: any): string;
|
|
16
|
+
arrayBufferToString(arrayBuffer: any): Promise<any>;
|
|
17
|
+
arrayToArrayBuffer(array: any): any;
|
|
18
|
+
ensureArrayBuffer(arrayOrArrayBuffer: any): any;
|
|
19
|
+
generateKeyPair(): Promise<any>;
|
|
20
|
+
getKeyOperations(keyType: any): string[];
|
|
21
|
+
getKeyAlgorythm(keyType: any): {
|
|
22
|
+
name: string;
|
|
23
|
+
namedCurve?: undefined;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
namedCurve: string;
|
|
27
|
+
};
|
|
28
|
+
generateHMAC(message: any, derivedKey: any): Promise<string | undefined>;
|
|
29
|
+
verifyHMAC(message: any, derivedKey: any, verifiableHMAC: any): Promise<boolean>;
|
|
30
|
+
getStorableKey(key: any): Promise<string>;
|
|
31
|
+
restoreStorableKey(keyType: any, storableHex: any): Promise<any>;
|
|
32
|
+
getStorableKeyPair(keyPair: any): Promise<{}>;
|
|
33
|
+
restoreStorableKeyPair(keyPair: any): Promise<{}>;
|
|
34
|
+
deriveSharedKey({ publicKey, privateKey }: {
|
|
35
|
+
publicKey: any;
|
|
36
|
+
privateKey: any;
|
|
37
|
+
}): Promise<any>;
|
|
38
|
+
deriveHMACKey({ publicKey, privateKey }: {
|
|
39
|
+
publicKey: any;
|
|
40
|
+
privateKey: any;
|
|
41
|
+
}): Promise<any>;
|
|
42
|
+
getVerificationKeys({ publicKey, privateKey }: {
|
|
43
|
+
publicKey: any;
|
|
44
|
+
privateKey: any;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
derivedSecretKey?: undefined;
|
|
47
|
+
derivedHMACKey?: undefined;
|
|
48
|
+
} | {
|
|
49
|
+
derivedSecretKey: any;
|
|
50
|
+
derivedHMACKey: any;
|
|
51
|
+
}>;
|
|
52
|
+
encryptMessage(decryptedMessage: any, derivedKey: any): Promise<number[] | undefined>;
|
|
53
|
+
decryptMessage(encryptedMessage: any, derivedKey: any): Promise<any>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=WebCrypto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebCrypto.d.ts","sourceRoot":"","sources":["../../src/shared/WebCrypto.js"],"names":[],"mappings":";AAIA;IACE;;;OAGC;IAFC,aAA4B;IAC5B,WAAwB;IAG1B,kBAEC;IAED,6BAqBC;IAED,+BAkBC;IAED,+BAkBC;IAED,mDAiBC;IAED,sCAMC;IAED,mCAQC;IAED,oDAIC;IAED,oCAMC;IAED,gDAMC;IAED,gCAYC;IAED,yCAiBC;IAED;;;;;;MAmBC;IAED,yEAiBC;IAED,iFAIC;IAED,0CAKC;IAED,iEAkBC;IAED,8CAUC;IAED,kDAUC;IAED;;;qBAoBC;IAED;;;qBAqBC;IAED;;;;;;;;;OAaC;IAED,sFAuBC;IAED,qEAuBC;CACF"}
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const browser_monads_ts_1 = require("browser-monads-ts");
|
|
36
|
+
const display_1 = require("./display");
|
|
37
|
+
class WebCrypto {
|
|
38
|
+
constructor({ crypto: _crypto, util: _util } = {}) {
|
|
39
|
+
this._crypto = _crypto !== null && _crypto !== void 0 ? _crypto : {};
|
|
40
|
+
this._util = _util !== null && _util !== void 0 ? _util : {};
|
|
41
|
+
}
|
|
42
|
+
get subtle() {
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = this._crypto) === null || _a === void 0 ? void 0 : _a.subtle;
|
|
45
|
+
}
|
|
46
|
+
getWebCrypto() {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
if (!((_a = this._crypto) === null || _a === void 0 ? void 0 : _a.subtle)) {
|
|
50
|
+
try {
|
|
51
|
+
this._crypto = (yield Promise.resolve().then(() => __importStar(require('isomorphic-webcrypto')))).default;
|
|
52
|
+
}
|
|
53
|
+
catch (_ignore) {
|
|
54
|
+
console.info('Failed to import isomorphic-webcrypto, retrying w/ node crypto');
|
|
55
|
+
try {
|
|
56
|
+
this._crypto = (yield Promise.resolve().then(() => __importStar(require('crypto')))).default;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
// eslint-disable-next-line max-len
|
|
60
|
+
console.error(`Failed to import node crypto, ensure 'isomorphic-webcrypto' (or node 'crypto') is installed and/or pass in implementation via 'new WebCrypto({ crypto })'`);
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!((_b = this._crypto) === null || _b === void 0 ? void 0 : _b.subtle)) {
|
|
66
|
+
throw new Error('Invalid crypto, missing subtle');
|
|
67
|
+
}
|
|
68
|
+
return this._crypto;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
getTextDecoder() {
|
|
72
|
+
var _a;
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if ((_a = this._util) === null || _a === void 0 ? void 0 : _a.TextDecoder) {
|
|
75
|
+
return this._util.TextDecoder;
|
|
76
|
+
}
|
|
77
|
+
if ((0, browser_monads_ts_1.exists)(browser_monads_ts_1.window) && typeof (browser_monads_ts_1.window === null || browser_monads_ts_1.window === void 0 ? void 0 : browser_monads_ts_1.window.TextDecoder) === 'function') {
|
|
78
|
+
return browser_monads_ts_1.window.TextDecoder;
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
const TextDecoder = (yield Promise.resolve().then(() => __importStar(require('util')))).TextDecoder;
|
|
82
|
+
this._util.TextDecoder = TextDecoder;
|
|
83
|
+
return TextDecoder;
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
console.error(`Failed to import 'utils.TextDecoder', ensure 'util' is available and/or pass in implementation via 'new WebCrypto({ util })'`);
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getTextEncoder() {
|
|
92
|
+
var _a;
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
if ((_a = this._util) === null || _a === void 0 ? void 0 : _a.TextEncoder) {
|
|
95
|
+
return this._util.TextEncoder;
|
|
96
|
+
}
|
|
97
|
+
if ((0, browser_monads_ts_1.exists)(browser_monads_ts_1.window) && typeof (browser_monads_ts_1.window === null || browser_monads_ts_1.window === void 0 ? void 0 : browser_monads_ts_1.window.TextEncoder) === 'function') {
|
|
98
|
+
return browser_monads_ts_1.window.TextEncoder;
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
const TextEncoder = (yield Promise.resolve().then(() => __importStar(require('util')))).TextEncoder;
|
|
102
|
+
this._util.TextEncoder = TextEncoder;
|
|
103
|
+
return TextEncoder;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.error(`Failed to import 'utils.TextEncoder', ensure 'util' is available and/or pass in implementation via 'new WebCrypto({ util })'`);
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
timingSafeEqual(value1, value2) {
|
|
112
|
+
if ((value1 == undefined) ||
|
|
113
|
+
(value2 == undefined) ||
|
|
114
|
+
(value1.length !== value2.length)) {
|
|
115
|
+
return false;
|
|
116
|
+
}
|
|
117
|
+
let result = 0;
|
|
118
|
+
// eslint-disable-next-line no-plusplus
|
|
119
|
+
for (let i = 0; i < value1.length; i++) {
|
|
120
|
+
// eslint-disable-next-line no-bitwise
|
|
121
|
+
result |= value1[i] ^ value2[i];
|
|
122
|
+
}
|
|
123
|
+
return (result === 0);
|
|
124
|
+
}
|
|
125
|
+
stringToHex(stringValue) {
|
|
126
|
+
return (Array.from((0, display_1.ensureString)(stringValue), (char) => (char.charCodeAt(0).toString(16).padStart(2, '0'))).join(''));
|
|
127
|
+
}
|
|
128
|
+
hexToString(hexValue) {
|
|
129
|
+
return ((0, display_1.ensureArray)((0, display_1.ensureString)(hexValue).match(/.{1,2}/g))
|
|
130
|
+
.map((byte) => String.fromCharCode(parseInt(byte, 16)))
|
|
131
|
+
.join(''));
|
|
132
|
+
}
|
|
133
|
+
arrayBufferToString(arrayBuffer) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const uint8Array = new Uint8Array(arrayBuffer);
|
|
136
|
+
const Decoder = yield this.getTextDecoder();
|
|
137
|
+
return new Decoder().decode(uint8Array);
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
arrayToArrayBuffer(array) {
|
|
141
|
+
return ((ArrayBuffer.from != undefined)
|
|
142
|
+
? ArrayBuffer.from(array)
|
|
143
|
+
: new Uint8Array(array).buffer);
|
|
144
|
+
}
|
|
145
|
+
ensureArrayBuffer(arrayOrArrayBuffer) {
|
|
146
|
+
return ((arrayOrArrayBuffer instanceof ArrayBuffer)
|
|
147
|
+
? arrayOrArrayBuffer
|
|
148
|
+
: this.arrayToArrayBuffer(arrayOrArrayBuffer));
|
|
149
|
+
}
|
|
150
|
+
generateKeyPair() {
|
|
151
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
const crypto = yield this.getWebCrypto();
|
|
153
|
+
const keyPair = yield crypto.subtle.generateKey({
|
|
154
|
+
name: 'ECDH',
|
|
155
|
+
namedCurve: 'P-256',
|
|
156
|
+
}, true, ['deriveKey']);
|
|
157
|
+
return keyPair;
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
getKeyOperations(keyType) {
|
|
161
|
+
switch (keyType) {
|
|
162
|
+
case 'private':
|
|
163
|
+
case 'privateKey': {
|
|
164
|
+
return ['deriveKey'];
|
|
165
|
+
}
|
|
166
|
+
case 'secret':
|
|
167
|
+
case 'secretKey':
|
|
168
|
+
case 'sharedSecret': {
|
|
169
|
+
return ['encrypt', 'decrypt'];
|
|
170
|
+
}
|
|
171
|
+
default: {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
getKeyAlgorythm(keyType) {
|
|
177
|
+
switch (keyType) {
|
|
178
|
+
case 'derivedKey':
|
|
179
|
+
case 'derived':
|
|
180
|
+
case 'secret':
|
|
181
|
+
case 'secretKey':
|
|
182
|
+
case 'sharedSecret': {
|
|
183
|
+
return {
|
|
184
|
+
name: 'AES-GCM',
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
default: {
|
|
188
|
+
return {
|
|
189
|
+
name: 'ECDH',
|
|
190
|
+
namedCurve: 'P-256',
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
generateHMAC(message, derivedKey) {
|
|
196
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
197
|
+
if (!message || !derivedKey) {
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
const crypto = yield this.getWebCrypto();
|
|
201
|
+
const Encoder = yield this.getTextEncoder();
|
|
202
|
+
const signature = yield crypto.subtle.sign('HMAC', derivedKey, new Encoder().encode(message));
|
|
203
|
+
return this.stringToHex(this.arrayBufferToString(signature));
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
verifyHMAC(message, derivedKey, verifiableHMAC) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const calculatedHMAC = yield this.generateHMAC(message, derivedKey);
|
|
209
|
+
return this.timingSafeEqual(calculatedHMAC, verifiableHMAC);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
getStorableKey(key) {
|
|
213
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
214
|
+
const crypto = yield this.getWebCrypto();
|
|
215
|
+
const exportedJWK = yield crypto.subtle.exportKey('jwk', key);
|
|
216
|
+
return this.stringToHex(JSON.stringify(exportedJWK));
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
restoreStorableKey(keyType, storableHex) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
if (!storableHex) {
|
|
222
|
+
return undefined;
|
|
223
|
+
}
|
|
224
|
+
const crypto = yield this.getWebCrypto();
|
|
225
|
+
const exportedJWK = JSON.parse(this.hexToString(storableHex) || '{}');
|
|
226
|
+
if ((0, display_1.objectEmpty)(exportedJWK)) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
return crypto.subtle.importKey('jwk', exportedJWK, this.getKeyAlgorythm(keyType), true, this.getKeyOperations(keyType));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
getStorableKeyPair(keyPair) {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
const storableKeys = {};
|
|
235
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
236
|
+
for (const [keyType, key] of Object.entries(keyPair)) {
|
|
237
|
+
// eslint-disable-next-line no-await-in-loop
|
|
238
|
+
storableKeys[keyType] = yield this.getStorableKey(key);
|
|
239
|
+
}
|
|
240
|
+
return storableKeys;
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
restoreStorableKeyPair(keyPair) {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
const restoredKeys = {};
|
|
246
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
247
|
+
for (const [keyType, key] of Object.entries(keyPair)) {
|
|
248
|
+
// eslint-disable-next-line no-await-in-loop
|
|
249
|
+
restoredKeys[keyType] = yield this.restoreStorableKey(keyType, key);
|
|
250
|
+
}
|
|
251
|
+
return restoredKeys;
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
deriveSharedKey({ publicKey, privateKey }) {
|
|
255
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
256
|
+
if (!publicKey || !privateKey) {
|
|
257
|
+
return undefined;
|
|
258
|
+
}
|
|
259
|
+
const crypto = yield this.getWebCrypto();
|
|
260
|
+
const derivedKey = yield crypto.subtle.deriveKey({
|
|
261
|
+
name: 'ECDH',
|
|
262
|
+
public: publicKey,
|
|
263
|
+
}, privateKey, {
|
|
264
|
+
name: 'AES-GCM',
|
|
265
|
+
length: 256,
|
|
266
|
+
}, true, ['encrypt', 'decrypt']);
|
|
267
|
+
return derivedKey;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
deriveHMACKey({ publicKey, privateKey }) {
|
|
271
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
+
if (!publicKey || !privateKey) {
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
const crypto = yield this.getWebCrypto();
|
|
276
|
+
const derivedKey = yield crypto.subtle.deriveKey({
|
|
277
|
+
name: 'ECDH',
|
|
278
|
+
public: publicKey,
|
|
279
|
+
}, privateKey, {
|
|
280
|
+
name: 'HMAC',
|
|
281
|
+
hash: { name: 'SHA-256' },
|
|
282
|
+
length: 256, // Adjusted key length, e.g., 128 bits
|
|
283
|
+
}, true, ['sign', 'verify']);
|
|
284
|
+
return derivedKey;
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
getVerificationKeys({ publicKey, privateKey }) {
|
|
288
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
289
|
+
if (!publicKey || !privateKey) {
|
|
290
|
+
return {};
|
|
291
|
+
}
|
|
292
|
+
const sharedKeyPair = yield this.restoreStorableKeyPair({ publicKey, privateKey });
|
|
293
|
+
const derivedHMACKey = yield this.deriveHMACKey(sharedKeyPair);
|
|
294
|
+
const derivedSecretKey = yield this.deriveSharedKey(sharedKeyPair);
|
|
295
|
+
return {
|
|
296
|
+
derivedSecretKey,
|
|
297
|
+
derivedHMACKey,
|
|
298
|
+
};
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
encryptMessage(decryptedMessage, derivedKey) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
if (!decryptedMessage || !derivedKey) {
|
|
304
|
+
return undefined;
|
|
305
|
+
}
|
|
306
|
+
const crypto = yield this.getWebCrypto();
|
|
307
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
308
|
+
const Encoder = yield this.getTextEncoder();
|
|
309
|
+
const encodedMessage = new Encoder().encode(decryptedMessage);
|
|
310
|
+
const ciphertext = yield crypto.subtle.encrypt({
|
|
311
|
+
name: 'AES-GCM',
|
|
312
|
+
iv,
|
|
313
|
+
}, derivedKey, encodedMessage);
|
|
314
|
+
const encryptedMessage = new Uint8Array([
|
|
315
|
+
...iv,
|
|
316
|
+
...new Uint8Array(ciphertext)
|
|
317
|
+
]);
|
|
318
|
+
return Array.from(encryptedMessage);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
decryptMessage(encryptedMessage, derivedKey) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
if (!encryptedMessage || !derivedKey) {
|
|
324
|
+
return undefined;
|
|
325
|
+
}
|
|
326
|
+
const crypto = yield this.getWebCrypto();
|
|
327
|
+
// NOTE: this presumed an array or arrayBuffer coming in as encryptedMessage (will fail w/ IV error if its a string)
|
|
328
|
+
const encryptedArrayBuffer = this.ensureArrayBuffer(encryptedMessage);
|
|
329
|
+
const iv = encryptedArrayBuffer.slice(0, 12);
|
|
330
|
+
const ciphertext = encryptedArrayBuffer.slice(12);
|
|
331
|
+
const decryptedArrayBuffer = yield crypto.subtle.decrypt({
|
|
332
|
+
name: 'AES-GCM',
|
|
333
|
+
iv,
|
|
334
|
+
}, derivedKey, ciphertext);
|
|
335
|
+
const Decoder = yield this.getTextDecoder();
|
|
336
|
+
const decryptedMessage = new Decoder().decode(decryptedArrayBuffer);
|
|
337
|
+
return decryptedMessage;
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
exports.default = WebCrypto;
|
|
342
|
+
//# sourceMappingURL=WebCrypto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebCrypto.js","sourceRoot":"","sources":["../../src/shared/WebCrypto.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAkD;AAElD,uCAAkE;AAElE,MAAM,SAAS;IACb,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,CAAA;QAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAA;IAC1B,CAAC;IAED,IAAI,MAAM;;QACR,OAAO,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,CAAA;IAC7B,CAAC;IAEK,YAAY;;;YAChB,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,MAAM,CAAA,EAAE;gBACzB,IAAI;oBACF,IAAI,CAAC,OAAO,GAAG,CAAC,wDAAa,sBAAsB,GAAC,CAAC,CAAC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
+
export const DATE_FORMAT_TRACKING: "MMddyyyy";
|
|
6
|
+
export const DATE_FORMAT_ORGANIZED: "yyyy-MM-dd";
|
|
7
|
+
export namespace CUSTOM_FORMATS {
|
|
8
|
+
const UTC: string;
|
|
9
|
+
const ISO: string;
|
|
10
|
+
const UNIX: string;
|
|
11
|
+
}
|
|
12
|
+
export namespace LOCALE_FORMATS {
|
|
13
|
+
export { DATE_MINI };
|
|
14
|
+
export { DATE_SHORT };
|
|
15
|
+
export { DATE_MED };
|
|
16
|
+
export { DATE_FULL };
|
|
17
|
+
export { DATE_HUGE };
|
|
18
|
+
export { DATETIME_MINI };
|
|
19
|
+
export { DATETIME_SHORT };
|
|
20
|
+
export { DATETIME_MED };
|
|
21
|
+
export { DATETIME_MED_WITH_SECONDS };
|
|
22
|
+
export { DATETIME_FULL_NO_ZONE };
|
|
23
|
+
export { DATETIME_HUGE_NO_ZONE };
|
|
24
|
+
export { TIME_SIMPLE };
|
|
25
|
+
}
|
|
26
|
+
export function getDaysInMonth(year: any, month: any): number;
|
|
27
|
+
export function setDateTimeLocale(locale: any): void;
|
|
28
|
+
export function setDateTimeZone(zone: any): void;
|
|
29
|
+
export function getDateTimeFormat({ locale, mappings }?: {
|
|
30
|
+
locale: any;
|
|
31
|
+
mappings?: {
|
|
32
|
+
day: string;
|
|
33
|
+
month: string;
|
|
34
|
+
year: string;
|
|
35
|
+
} | undefined;
|
|
36
|
+
}): any;
|
|
37
|
+
export function getDateTimeFromString({ format, value, ...options }?: {
|
|
38
|
+
format: any;
|
|
39
|
+
value: any;
|
|
40
|
+
}): any;
|
|
41
|
+
export function convertDateTime(value: any, { shouldThrow, shouldLog, ...options }?: {
|
|
42
|
+
shouldThrow?: boolean | undefined;
|
|
43
|
+
shouldLog?: any;
|
|
44
|
+
}): any;
|
|
45
|
+
export function convertDuration(value: any, { shouldThrow, ...options }?: {
|
|
46
|
+
shouldThrow?: boolean | undefined;
|
|
47
|
+
}): any;
|
|
48
|
+
export function getDuration(dt1: any, dt2: any): any;
|
|
49
|
+
export function getCurrentDateTime(): any;
|
|
50
|
+
export function getDaysBetween(dt1: any, dt2: any): number;
|
|
51
|
+
export function getWeeksBetween(dt1: any, dt2: any): number;
|
|
52
|
+
export function isSameHour(dt1: any, dt2: any): boolean;
|
|
53
|
+
export function isSameDay(dt1: any, dt2: any): boolean;
|
|
54
|
+
export function ensureDateTime(value: any, options: any): any;
|
|
55
|
+
export function formatTimestamps(timestamps: any, defaultValue: any): {};
|
|
56
|
+
export function formatRequiredTimestamps({ created_at, updated_at, ...timestamps }?: {
|
|
57
|
+
created_at: any;
|
|
58
|
+
updated_at: any;
|
|
59
|
+
}): {
|
|
60
|
+
created_at: string;
|
|
61
|
+
updated_at: string;
|
|
62
|
+
};
|
|
63
|
+
export function toJSDate(value: any, options: any): any;
|
|
64
|
+
export function toUnixInteger(value: any, options: any): any;
|
|
65
|
+
export function toUnixString(value: any, options: any): string;
|
|
66
|
+
export function toISOString(value: any, options: any): any;
|
|
67
|
+
export function toUTCString(value: any, options: any): any;
|
|
68
|
+
export function toFormatted({ format, value, zone, ...options }?: {
|
|
69
|
+
format: any;
|
|
70
|
+
value: any;
|
|
71
|
+
zone: any;
|
|
72
|
+
}): any;
|
|
73
|
+
export function convertFormatted({ value, to: { format: toFormat, ...toOptions }, from: { format: fromFormat, ...fromOptions }, }?: {
|
|
74
|
+
value: any;
|
|
75
|
+
to?: {
|
|
76
|
+
format: any;
|
|
77
|
+
} | undefined;
|
|
78
|
+
from?: {
|
|
79
|
+
format: any;
|
|
80
|
+
} | undefined;
|
|
81
|
+
}): any;
|
|
82
|
+
export function compareDate(date1: any, date2: any): number;
|
|
83
|
+
declare const DATE_MINI: any;
|
|
84
|
+
declare const DATE_SHORT: any;
|
|
85
|
+
declare const DATE_MED: any;
|
|
86
|
+
declare const DATE_FULL: any;
|
|
87
|
+
declare const DATE_HUGE: any;
|
|
88
|
+
declare const DATETIME_MINI: any;
|
|
89
|
+
declare const DATETIME_SHORT: any;
|
|
90
|
+
declare const DATETIME_MED: any;
|
|
91
|
+
declare const DATETIME_MED_WITH_SECONDS: any;
|
|
92
|
+
declare const DATETIME_FULL_NO_ZONE: any;
|
|
93
|
+
declare const DATETIME_HUGE_NO_ZONE: any;
|
|
94
|
+
declare const TIME_SIMPLE: any;
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=datetime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/shared/datetime.js"],"names":[],"mappings":"AAcA,uCAAuC;AACvC,wCAAwC;AAExC,yCAAyC;AACzC,4CAA4C;AAC5C,8CAA8C;AAC9C,iDAAiD;;;;;;;;;;;;;;;;;;;;AAqE1C,8DAEN;AAEM,qDAIN;AAEM,iDAIN;AAEM;;;;;;;QAUN;AAEM;;;QA4BN;AAEM;;;QA4CN;AAEM;;QAwDN;AAEM,qDAEN;AAEM,0CAEN;AAMM,2DAEN;AAEM,4DAEN;AAOM,wDAEN;AAEM,uDAEN;AAEM,8DAEN;AAEM,yEAKN;AAEM;;;;;;EAON;AAEM,wDAEN;AAEM,6DAEN;AAGM,+DAEN;AAGM,2DAEN;AAGM,2DAEN;AAGM;;;;QAqCN;AAEM;;;;;;;;QAkBN;AAEM,4DAEN;AAlWD,6BAGC;;;;;AAED,iCAGC"}
|