@nexeraid/identity-sdk
Advanced tools
Comparing version 1.1.121 to 1.1.122
@@ -33,2 +33,5 @@ import type { z } from "zod"; | ||
private startCompleted; | ||
private polygonWalletReady; | ||
private did; | ||
private ocvSdkReady; | ||
/** | ||
@@ -35,0 +38,0 @@ * Construct a new IdentityClient object. |
@@ -559,3 +559,8 @@ 'use strict'; | ||
_defineProperty(this, "initDataSent", false); | ||
// Sould this be linked to onSdkReady instead? | ||
_defineProperty(this, "startCompleted", false); | ||
// variables for the different steps of the kyc app setup | ||
_defineProperty(this, "polygonWalletReady", false); | ||
_defineProperty(this, "did", ""); | ||
_defineProperty(this, "ocvSdkReady", false); | ||
/** | ||
@@ -796,4 +801,4 @@ * Callback function to be registered by client to sign personal data. | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks9; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$resol, _this$callbacks7, _this$callbacks$resol2, _this$callbacks8; | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks10; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$sdkIn2, _this$callbacks7, _this$callbacks$resol, _this$callbacks8, _this$callbacks$resol2, _this$callbacks9; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
@@ -824,3 +829,3 @@ while (1) switch (_context4.prev = _context4.next) { | ||
// Start Completed from Identity App | ||
// Start Completed from Identity/KYC App | ||
if (identityMessageData.type === "startCompletedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
@@ -880,13 +885,30 @@ _this.startCompleted = true; | ||
case 27: | ||
// This message lets the identity sdk the polygon id | ||
// wallet has been initialized | ||
if (identityMessageData.type === "polygonIdInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdInitialized", identityMessageData); | ||
_this.polygonIdDID = identityMessageData.data; | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: identityMessageData.data | ||
}); | ||
_this.polygonWalletReady = true; | ||
_this.did = identityMessageData.data; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// This message lets the identity sdk the ocv sdk | ||
// has been initialized | ||
if (identityMessageData.type === "ocvSdkInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("ocvSdkInitialized", identityMessageData); | ||
_this.ocvSdkReady = true; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn2 = (_this$callbacks7 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn2 === void 0 || _this$callbacks$sdkIn2.call(_this$callbacks7, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// process Polygon Id Response | ||
if (identityMessageData.type === "polygonIdResponse" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdResponse", identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks7 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks7, identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks8 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks8, identityMessageData); | ||
_this.callbacks.resolvePolygonIdRequest = undefined; | ||
@@ -897,10 +919,10 @@ } | ||
console.log("isVerifiedResponse", identityMessageData); | ||
(_this$callbacks$resol2 = (_this$callbacks8 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks8, identityMessageData.isVerified); | ||
(_this$callbacks$resol2 = (_this$callbacks9 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks9, identityMessageData.isVerified); | ||
_this.callbacks.resolveIsVerifiedRequest = undefined; | ||
} | ||
// process Is Verified Notification | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks9 = _this.callbacks) !== null && _this$callbacks9 !== void 0 && _this$callbacks9.onVerification) { | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks10 = _this.callbacks) !== null && _this$callbacks10 !== void 0 && _this$callbacks10.onVerification) { | ||
_this.callbacks.onVerification(identityMessageData.isVerified); | ||
} | ||
case 31: | ||
case 32: | ||
case "end": | ||
@@ -907,0 +929,0 @@ return _context4.stop(); |
@@ -559,3 +559,8 @@ 'use strict'; | ||
_defineProperty(this, "initDataSent", false); | ||
// Sould this be linked to onSdkReady instead? | ||
_defineProperty(this, "startCompleted", false); | ||
// variables for the different steps of the kyc app setup | ||
_defineProperty(this, "polygonWalletReady", false); | ||
_defineProperty(this, "did", ""); | ||
_defineProperty(this, "ocvSdkReady", false); | ||
/** | ||
@@ -796,4 +801,4 @@ * Callback function to be registered by client to sign personal data. | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks9; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$resol, _this$callbacks7, _this$callbacks$resol2, _this$callbacks8; | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks10; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$sdkIn2, _this$callbacks7, _this$callbacks$resol, _this$callbacks8, _this$callbacks$resol2, _this$callbacks9; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
@@ -824,3 +829,3 @@ while (1) switch (_context4.prev = _context4.next) { | ||
// Start Completed from Identity App | ||
// Start Completed from Identity/KYC App | ||
if (identityMessageData.type === "startCompletedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
@@ -880,13 +885,30 @@ _this.startCompleted = true; | ||
case 27: | ||
// This message lets the identity sdk the polygon id | ||
// wallet has been initialized | ||
if (identityMessageData.type === "polygonIdInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdInitialized", identityMessageData); | ||
_this.polygonIdDID = identityMessageData.data; | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: identityMessageData.data | ||
}); | ||
_this.polygonWalletReady = true; | ||
_this.did = identityMessageData.data; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// This message lets the identity sdk the ocv sdk | ||
// has been initialized | ||
if (identityMessageData.type === "ocvSdkInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("ocvSdkInitialized", identityMessageData); | ||
_this.ocvSdkReady = true; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn2 = (_this$callbacks7 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn2 === void 0 || _this$callbacks$sdkIn2.call(_this$callbacks7, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// process Polygon Id Response | ||
if (identityMessageData.type === "polygonIdResponse" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdResponse", identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks7 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks7, identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks8 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks8, identityMessageData); | ||
_this.callbacks.resolvePolygonIdRequest = undefined; | ||
@@ -897,10 +919,10 @@ } | ||
console.log("isVerifiedResponse", identityMessageData); | ||
(_this$callbacks$resol2 = (_this$callbacks8 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks8, identityMessageData.isVerified); | ||
(_this$callbacks$resol2 = (_this$callbacks9 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks9, identityMessageData.isVerified); | ||
_this.callbacks.resolveIsVerifiedRequest = undefined; | ||
} | ||
// process Is Verified Notification | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks9 = _this.callbacks) !== null && _this$callbacks9 !== void 0 && _this$callbacks9.onVerification) { | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks10 = _this.callbacks) !== null && _this$callbacks10 !== void 0 && _this$callbacks10.onVerification) { | ||
_this.callbacks.onVerification(identityMessageData.isVerified); | ||
} | ||
case 31: | ||
case 32: | ||
case "end": | ||
@@ -907,0 +929,0 @@ return _context4.stop(); |
@@ -555,3 +555,8 @@ import { fromZodError } from 'zod-validation-error'; | ||
_defineProperty(this, "initDataSent", false); | ||
// Sould this be linked to onSdkReady instead? | ||
_defineProperty(this, "startCompleted", false); | ||
// variables for the different steps of the kyc app setup | ||
_defineProperty(this, "polygonWalletReady", false); | ||
_defineProperty(this, "did", ""); | ||
_defineProperty(this, "ocvSdkReady", false); | ||
/** | ||
@@ -792,4 +797,4 @@ * Callback function to be registered by client to sign personal data. | ||
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() { | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks9; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$resol, _this$callbacks7, _this$callbacks$resol2, _this$callbacks8; | ||
var _this$callbacks, _this$callbacks2, _this$callbacks3, _this$callbacks4, _this$callbacks10; | ||
var identityMessage, identityMessageData, onInitDataMessage, signedMessage, txHash, _this$callbacks5, _this$callbacks$sdkIn, _this$callbacks6, _this$callbacks$sdkIn2, _this$callbacks7, _this$callbacks$resol, _this$callbacks8, _this$callbacks$resol2, _this$callbacks9; | ||
return _regeneratorRuntime().wrap(function _callee4$(_context4) { | ||
@@ -820,3 +825,3 @@ while (1) switch (_context4.prev = _context4.next) { | ||
// Start Completed from Identity App | ||
// Start Completed from Identity/KYC App | ||
if (identityMessageData.type === "startCompletedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
@@ -876,13 +881,30 @@ _this.startCompleted = true; | ||
case 27: | ||
// This message lets the identity sdk the polygon id | ||
// wallet has been initialized | ||
if (identityMessageData.type === "polygonIdInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdInitialized", identityMessageData); | ||
_this.polygonIdDID = identityMessageData.data; | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: identityMessageData.data | ||
}); | ||
_this.polygonWalletReady = true; | ||
_this.did = identityMessageData.data; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn = (_this$callbacks6 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn === void 0 || _this$callbacks$sdkIn.call(_this$callbacks6, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// This message lets the identity sdk the ocv sdk | ||
// has been initialized | ||
if (identityMessageData.type === "ocvSdkInitialized" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("ocvSdkInitialized", identityMessageData); | ||
_this.ocvSdkReady = true; | ||
if (_this.polygonWalletReady && _this.ocvSdkReady) { | ||
(_this$callbacks$sdkIn2 = (_this$callbacks7 = _this.callbacks).sdkInitializedCallback) === null || _this$callbacks$sdkIn2 === void 0 || _this$callbacks$sdkIn2.call(_this$callbacks7, { | ||
did: _this.did | ||
}); | ||
} | ||
} | ||
// process Polygon Id Response | ||
if (identityMessageData.type === "polygonIdResponse" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier)) { | ||
console.log("polygonIdResponse", identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks7 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks7, identityMessageData); | ||
(_this$callbacks$resol = (_this$callbacks8 = _this.callbacks).resolvePolygonIdRequest) === null || _this$callbacks$resol === void 0 || _this$callbacks$resol.call(_this$callbacks8, identityMessageData); | ||
_this.callbacks.resolvePolygonIdRequest = undefined; | ||
@@ -893,10 +915,10 @@ } | ||
console.log("isVerifiedResponse", identityMessageData); | ||
(_this$callbacks$resol2 = (_this$callbacks8 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks8, identityMessageData.isVerified); | ||
(_this$callbacks$resol2 = (_this$callbacks9 = _this.callbacks).resolveIsVerifiedRequest) === null || _this$callbacks$resol2 === void 0 || _this$callbacks$resol2.call(_this$callbacks9, identityMessageData.isVerified); | ||
_this.callbacks.resolveIsVerifiedRequest = undefined; | ||
} | ||
// process Is Verified Notification | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks9 = _this.callbacks) !== null && _this$callbacks9 !== void 0 && _this$callbacks9.onVerification) { | ||
if (identityMessageData.type === "isVerifiedNotification" && identifier === (identityMessageData === null || identityMessageData === void 0 ? void 0 : identityMessageData.identifier) && (_this$callbacks10 = _this.callbacks) !== null && _this$callbacks10 !== void 0 && _this$callbacks10.onVerification) { | ||
_this.callbacks.onVerification(identityMessageData.isVerified); | ||
} | ||
case 31: | ||
case 32: | ||
case "end": | ||
@@ -903,0 +925,0 @@ return _context4.stop(); |
{ | ||
"name": "@nexeraid/identity-sdk", | ||
"version": "1.1.121", | ||
"version": "1.1.122", | ||
"description": "Nexera ID Identity Verification SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/nexeraid-identity-sdk.cjs.js", |
{ | ||
"name": "@nexeraid/identity-sdk", | ||
"version": "1.1.121", | ||
"version": "1.1.122", | ||
"description": "Nexera ID Identity Verification SDK", | ||
@@ -21,3 +21,3 @@ "main": "dist/nexeraid-identity-sdk.cjs.js", | ||
"zod-validation-error": "^1.5.0", | ||
"@nexeraprotocol/nexera-id-schemas": "1.8.76" | ||
"@nexeraprotocol/nexera-id-schemas": "1.8.77" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142568
3075
+ Added@nexeraprotocol/nexera-id-schemas@1.8.77(transitive)
- Removed@nexeraprotocol/nexera-id-schemas@1.8.76(transitive)