@bytexbyte/nxtlinq-ai-agent-sdk 1.5.8 → 1.6.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.
@@ -50,7 +50,11 @@ export const PermissionForm = ({ onClose, onOpen }) => {
50
50
  // Check if wallet IDV verification is required based on configuration
51
51
  const requireWalletIDVVerification = props.requireWalletIDVVerification ?? true; // Default to true
52
52
  const isWalletVerified = Boolean(walletInfo?.id);
53
- const shouldShowVerificationPrompt = requireWalletIDVVerification && !isWalletVerified;
53
+ const isWalletVerifiedWithBerifyme = walletInfo?.method === 'berifyme';
54
+ // Show verification prompt if:
55
+ // 1. IDV verification is required AND wallet is not verified, OR
56
+ // 2. IDV verification is required AND wallet is verified but not with Berifyme
57
+ const shouldShowVerificationPrompt = requireWalletIDVVerification && (!isWalletVerified || !isWalletVerifiedWithBerifyme);
54
58
  const handleSave = async () => {
55
59
  setIsSaving(true);
56
60
  try {
@@ -254,7 +258,9 @@ export const PermissionForm = ({ onClose, onOpen }) => {
254
258
  marginBottom: '24px',
255
259
  fontSize: '16px',
256
260
  color: '#666'
257
- }, children: "Please verify your wallet to continue" }), _jsx("button", { onClick: () => onVerifyWallet('berifyme'), style: {
261
+ }, children: isWalletVerified && !isWalletVerifiedWithBerifyme
262
+ ? 'Your wallet is verified with custom method, but Berify.me verification is required to continue.'
263
+ : 'Please verify your wallet with Berify.me to continue' }), _jsx("button", { onClick: () => onVerifyWallet('berifyme'), style: {
258
264
  padding: '12px 24px',
259
265
  backgroundColor: '#007bff',
260
266
  color: 'white',
@@ -1 +1 @@
1
- {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/core/lib/useSpeechToTextFromMic/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAML,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMjD;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,sBAAsB,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,EACxD,QAAQ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAC5C,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAyCtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,gBAAgB,GAAG,SAAS,SAIvE,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;GAyBxE"}
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../src/core/lib/useSpeechToTextFromMic/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAML,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAMjD;;GAEG;AACH,eAAO,MAAM,wBAAwB,GACnC,sBAAsB,QAAQ,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,EACxD,QAAQ;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,KAC5C,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAsCtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,gBAAgB,GAAG,SAAS,SAIvE,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;GAwBxE"}
@@ -17,20 +17,17 @@ export const startSpeechToTextFromMic = async (setSpeechToTextArray, config) =>
17
17
  const conversationHistory = [];
18
18
  let index = 0;
19
19
  recognizer.recognizing = (_s, e) => {
20
- console.log(`RECOGNIZING: Text=${e.result.text}`);
21
20
  conversationHistory[index] = e.result.text;
22
21
  setSpeechToTextArray([...conversationHistory]);
23
22
  };
24
23
  recognizer.recognized = (_s, e) => {
25
24
  if (e.result.reason === ResultReason.RecognizedSpeech) {
26
- console.log(`RECOGNIZED: Text=${e.result.text}`);
27
25
  conversationHistory[index] = e.result.text;
28
26
  setSpeechToTextArray([...conversationHistory]);
29
27
  index += 1;
30
28
  }
31
29
  };
32
30
  recognizer.canceled = (_s, e) => {
33
- console.log(`CANCELED: Reason=${e.reason}`);
34
31
  if (e.reason === CancellationReason.Error) {
35
32
  console.error(`CANCELED: ErrorCode=${e.errorCode}`);
36
33
  console.error(`CANCELED: ErrorDetails=${e.errorDetails}`);
@@ -66,7 +63,6 @@ export async function getTokenOrRefresh(apiKey, apiSecret) {
66
63
  }
67
64
  catch (e) {
68
65
  const err = e;
69
- console.log(err.response.data);
70
66
  return { authToken: null, error: err.response.data };
71
67
  }
72
68
  }
@@ -12,7 +12,7 @@ export function useSpeechToTextFromMic({ apiKey, apiSecret }) {
12
12
  try {
13
13
  wakelock.current = await navigator.wakeLock.request('screen');
14
14
  wakelock.current.addEventListener('release', () => {
15
- console.log('Wake lock released');
15
+ // Wake lock was released by the system
16
16
  });
17
17
  }
18
18
  catch (err) {
@@ -1 +1 @@
1
- {"version":3,"file":"metakeepClient.d.ts","sourceRoot":"","sources":["../../src/core/metakeepClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,QAAA,MAAM,cAAc,UAQlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"metakeepClient.d.ts","sourceRoot":"","sources":["../../src/core/metakeepClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,QAAA,MAAM,cAAc,UAOlB,CAAC;AAEH,eAAe,cAAc,CAAC"}
@@ -4,7 +4,6 @@ const metakeepClient = new MetaKeep({
4
4
  chainId: 80002,
5
5
  /* RPC node urls map */
6
6
  rpcNodeUrls: {
7
- // Update with your node API key
8
7
  80002: 'https://rpc-amoy.polygon.technology'
9
8
  }
10
9
  });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * BerifyMe React Instance Fix
3
+ *
4
+ * This utility ensures that BerifyMe SDK uses the same React instance
5
+ * as our SDK, preventing the __SECRET_INTERNALS error.
6
+ */
7
+ export declare function fixBerifyMeReactInstance(): void;
8
+ //# sourceMappingURL=berifyMeReactFix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"berifyMeReactFix.d.ts","sourceRoot":"","sources":["../../../src/core/utils/berifyMeReactFix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,wBAAgB,wBAAwB,IAAI,IAAI,CA4E/C"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * BerifyMe React Instance Fix
3
+ *
4
+ * This utility ensures that BerifyMe SDK uses the same React instance
5
+ * as our SDK, preventing the __SECRET_INTERNALS error.
6
+ */
7
+ export function fixBerifyMeReactInstance() {
8
+ try {
9
+ // Wait for BerifyMe SDK to load
10
+ const checkBerifyMe = () => {
11
+ if (window.BerifyMeSDK) {
12
+ console.log('[BerifyMe React Fix] BerifyMe SDK detected, applying React instance fix...');
13
+ // Method 1: Try to set React instance if the method exists
14
+ if (window.BerifyMeSDK.setReactInstance) {
15
+ try {
16
+ const React = require('react');
17
+ const createRoot = require('react-dom/client').createRoot;
18
+ window.BerifyMeSDK.setReactInstance(React, createRoot);
19
+ console.log('[BerifyMe React Fix] ✅ React instance set successfully');
20
+ return;
21
+ }
22
+ catch (e) {
23
+ console.warn('[BerifyMe React Fix] Failed to set React instance via setReactInstance:', e);
24
+ }
25
+ }
26
+ // Method 2: Monkey patch React globals
27
+ try {
28
+ const React = require('react');
29
+ const ReactDOM = require('react-dom');
30
+ const createRoot = require('react-dom/client').createRoot;
31
+ // Store original globals
32
+ const originalReact = window.React;
33
+ const originalReactDOM = window.ReactDOM;
34
+ // Set our React instance as global
35
+ window.React = React;
36
+ window.ReactDOM = ReactDOM;
37
+ window.ReactDOMClient = { createRoot };
38
+ console.log('[BerifyMe React Fix] ✅ React globals patched successfully');
39
+ // Restore original globals after a delay
40
+ setTimeout(() => {
41
+ if (originalReact)
42
+ window.React = originalReact;
43
+ if (originalReactDOM)
44
+ window.ReactDOM = originalReactDOM;
45
+ console.log('[BerifyMe React Fix] Original React globals restored');
46
+ }, 1000);
47
+ }
48
+ catch (e) {
49
+ console.warn('[BerifyMe React Fix] Failed to patch React globals:', e);
50
+ }
51
+ // Method 3: Try to patch the BerifyMe modal component
52
+ try {
53
+ if (window.BerifyMeSDK.modal) {
54
+ const originalModal = window.BerifyMeSDK.modal;
55
+ const React = require('react');
56
+ // Create a wrapper that uses our React instance
57
+ window.BerifyMeSDK.modal = (props) => {
58
+ return React.createElement(originalModal, props);
59
+ };
60
+ console.log('[BerifyMe React Fix] ✅ BerifyMe modal component patched');
61
+ }
62
+ }
63
+ catch (e) {
64
+ console.warn('[BerifyMe React Fix] Failed to patch BerifyMe modal:', e);
65
+ }
66
+ }
67
+ else {
68
+ // Retry after a short delay
69
+ setTimeout(checkBerifyMe, 100);
70
+ }
71
+ };
72
+ checkBerifyMe();
73
+ }
74
+ catch (error) {
75
+ console.error('[BerifyMe React Fix] Error applying React instance fix:', error);
76
+ }
77
+ }
78
+ // Auto-apply the fix when this module is loaded
79
+ if (typeof window !== 'undefined') {
80
+ fixBerifyMeReactInstance();
81
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * React Instance Check Utility
3
+ *
4
+ * This utility helps prevent React version conflicts by ensuring
5
+ * the SDK uses the same React instance as the host application.
6
+ */
7
+ export declare function checkReactInstance(): void;
8
+ export declare function ensureReactCompatibility(): void;
9
+ //# sourceMappingURL=reactInstanceCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactInstanceCheck.d.ts","sourceRoot":"","sources":["../../../src/core/utils/reactInstanceCheck.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,wBAAgB,kBAAkB,IAAI,IAAI,CAoCzC;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * React Instance Check Utility
3
+ *
4
+ * This utility helps prevent React version conflicts by ensuring
5
+ * the SDK uses the same React instance as the host application.
6
+ */
7
+ let reactInstanceCheckPerformed = false;
8
+ export function checkReactInstance() {
9
+ if (reactInstanceCheckPerformed) {
10
+ return;
11
+ }
12
+ try {
13
+ // Check if React is available globally
14
+ const globalReact = window.React;
15
+ const globalReactDOM = window.ReactDOM;
16
+ if (globalReact && globalReactDOM) {
17
+ console.log('[NxtlinqAIAgent] Using global React instance from host application');
18
+ return;
19
+ }
20
+ // Check if we're in a module environment
21
+ if (typeof require !== 'undefined') {
22
+ try {
23
+ const react = require('react');
24
+ const reactDOM = require('react-dom');
25
+ if (react && reactDOM) {
26
+ console.log('[NxtlinqAIAgent] Using React instance from module system');
27
+ return;
28
+ }
29
+ }
30
+ catch (e) {
31
+ // Module system not available or React not found
32
+ }
33
+ }
34
+ console.warn('[NxtlinqAIAgent] React instance check completed - using bundled React');
35
+ }
36
+ catch (error) {
37
+ console.error('[NxtlinqAIAgent] React instance check failed:', error);
38
+ }
39
+ finally {
40
+ reactInstanceCheckPerformed = true;
41
+ }
42
+ }
43
+ export function ensureReactCompatibility() {
44
+ // This function can be extended to perform more compatibility checks
45
+ checkReactInstance();
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytexbyte/nxtlinq-ai-agent-sdk",
3
- "version": "1.5.8",
3
+ "version": "1.6.0",
4
4
  "description": "Nxtlinq AI Agent SDK - Proprietary Software with enhanced async operation handling",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",