@explorins/pers-sdk-react-native 2.2.0-alpha.7 → 2.2.0-alpha.9

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/dist/index.js CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  'use strict';
6
6
 
7
+ require('react-native-url-polyfill/auto');
7
8
  var reactNative = require('react-native');
8
9
  var jsxRuntime = require('react/jsx-runtime');
9
10
  var react = require('react');
@@ -2417,6 +2418,8 @@ setupWeb3InstanceofPolyfill();
2417
2418
 
2418
2419
  // React Native polyfills for crypto and Web3 functionality
2419
2420
  // Consolidated "batteries included" approach for React Native SDK
2421
+ // CRITICAL: URL polyfill must be imported FIRST before any other code
2422
+ // This provides full URLSearchParams support for React Native
2420
2423
  // Initialize React Native polyfills
2421
2424
  const initializeReactNativePolyfills = () => {
2422
2425
  try {
@@ -2452,22 +2455,7 @@ const initializeReactNativePolyfills = () => {
2452
2455
  }
2453
2456
  };
2454
2457
  }
2455
- // Add URL polyfill for Web3 compatibility
2456
- if (typeof global !== 'undefined' && !global.URL) {
2457
- try {
2458
- // Try to use react-native-url-polyfill if available
2459
- require('react-native-url-polyfill/auto');
2460
- }
2461
- catch {
2462
- // Fallback to basic URL implementation
2463
- global.URL = class URL {
2464
- constructor(href) {
2465
- this.href = href;
2466
- }
2467
- toString() { return this.href; }
2468
- };
2469
- }
2470
- }
2458
+ // URL polyfill is handled by react-native-url-polyfill/auto import at top
2471
2459
  // Add btoa/atob polyfills for Web3 compatibility
2472
2460
  if (typeof global !== 'undefined') {
2473
2461
  if (!global.btoa) {
@@ -4564,25 +4552,20 @@ class UserApi {
4564
4552
  */
4565
4553
  async getAllUsersPublicProfiles(filter = null, options) {
4566
4554
  let url = `${this.basePath}/public`;
4567
- // Use object-based params instead of URLSearchParams for React Native compatibility
4568
- const params = {};
4555
+ const params = new URLSearchParams();
4569
4556
  if (filter) {
4570
4557
  // Same parameter pattern for compatibility
4571
- params['filterKey'] = filter.key;
4572
- params['filterValue'] = filter.value;
4558
+ params.set('filterKey', filter.key);
4559
+ params.set('filterValue', filter.value);
4573
4560
  }
4574
4561
  // Add pagination parameters
4575
4562
  if (options) {
4576
4563
  Object.entries(buildPaginationParams(options)).forEach(([key, value]) => {
4577
- params[key] = value;
4564
+ params.set(key, value);
4578
4565
  });
4579
4566
  }
4580
- // Build query string manually for RN compatibility
4581
- const queryString = Object.entries(params)
4582
- .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
4583
- .join('&');
4584
- if (queryString) {
4585
- url += `?${queryString}`;
4567
+ if (params.toString()) {
4568
+ url += `?${params.toString()}`;
4586
4569
  }
4587
4570
  const response = await this.apiClient.get(url);
4588
4571
  return normalizeToPaginated(response);
@@ -10356,7 +10339,7 @@ class DefaultAuthProvider {
10356
10339
  /** SDK package name */
10357
10340
  const SDK_NAME = "@explorins/pers-sdk";
10358
10341
  /** SDK version - injected from package.json at build time */
10359
- const SDK_VERSION = "2.1.33-alpha.0";
10342
+ const SDK_VERSION = "2.1.32";
10360
10343
  /** Full SDK identifier for headers */
10361
10344
  const SDK_USER_AGENT = `${SDK_NAME}/${SDK_VERSION}`;
10362
10345