@column-org/wallet-sdk 1.1.5 → 1.1.7

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
@@ -5,9 +5,15 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
8
14
  var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
15
+ for (var name2 in all)
16
+ __defProp(target, name2, { get: all[name2], enumerable: true });
11
17
  };
12
18
  var __copyProps = (to, from, except, desc) => {
13
19
  if (from && typeof from === "object" || typeof from === "function") {
@@ -27,10 +33,967 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
33
  ));
28
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
35
 
36
+ // ../node_modules/expo-modules-core/src/NativeModulesProxy.ts
37
+ var NativeModulesProxy_default;
38
+ var init_NativeModulesProxy = __esm({
39
+ "../node_modules/expo-modules-core/src/NativeModulesProxy.ts"() {
40
+ "use strict";
41
+ NativeModulesProxy_default = {};
42
+ }
43
+ });
44
+
45
+ // ../node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts
46
+ function createTurboModuleToExpoProxy(turboModule, name2) {
47
+ return null;
48
+ }
49
+ var init_TurboModuleToExpoModuleProxy = __esm({
50
+ "../node_modules/expo-modules-core/src/TurboModuleToExpoModuleProxy.ts"() {
51
+ "use strict";
52
+ }
53
+ });
54
+
55
+ // ../node_modules/expo-modules-core/src/ensureNativeModulesAreInstalled.ts
56
+ function ensureNativeModulesAreInstalled() {
57
+ }
58
+ var init_ensureNativeModulesAreInstalled = __esm({
59
+ "../node_modules/expo-modules-core/src/ensureNativeModulesAreInstalled.ts"() {
60
+ "use strict";
61
+ }
62
+ });
63
+
64
+ // ../node_modules/expo-modules-core/src/requireNativeModule.ts
65
+ function requireNativeModule(moduleName) {
66
+ const nativeModule = requireOptionalNativeModule(moduleName);
67
+ if (!nativeModule) {
68
+ throw new Error(`Cannot find native module '${moduleName}'`);
69
+ }
70
+ return nativeModule;
71
+ }
72
+ function requireOptionalNativeModule(moduleName) {
73
+ ensureNativeModulesAreInstalled();
74
+ try {
75
+ return globalThis.expo?.modules?.[moduleName] ?? NativeModulesProxy_default[moduleName] ?? createTurboModuleToExpoProxy(import_react_native.TurboModuleRegistry.get(moduleName), moduleName) ?? null;
76
+ } catch (e) {
77
+ const error = e;
78
+ console.warn(`An error occurred while requiring the '${moduleName}' module: ${error.message}`);
79
+ return null;
80
+ }
81
+ }
82
+ var import_react_native;
83
+ var init_requireNativeModule = __esm({
84
+ "../node_modules/expo-modules-core/src/requireNativeModule.ts"() {
85
+ "use strict";
86
+ import_react_native = require("react-native");
87
+ init_NativeModulesProxy();
88
+ init_TurboModuleToExpoModuleProxy();
89
+ init_ensureNativeModulesAreInstalled();
90
+ }
91
+ });
92
+
93
+ // ../node_modules/expo-modules-core/src/sweet/NativeJSLogger.ts
94
+ var NativeJSLogger_default;
95
+ var init_NativeJSLogger = __esm({
96
+ "../node_modules/expo-modules-core/src/sweet/NativeJSLogger.ts"() {
97
+ "use strict";
98
+ init_requireNativeModule();
99
+ NativeJSLogger_default = requireOptionalNativeModule("ExpoModulesCoreJSLogger");
100
+ }
101
+ });
102
+
103
+ // ../node_modules/expo-modules-core/src/environment/browser.ts
104
+ var isDOMAvailable, canUseEventListeners, canUseViewport, isAsyncDebugging;
105
+ var init_browser = __esm({
106
+ "../node_modules/expo-modules-core/src/environment/browser.ts"() {
107
+ "use strict";
108
+ isDOMAvailable = false;
109
+ canUseEventListeners = false;
110
+ canUseViewport = false;
111
+ isAsyncDebugging = false;
112
+ if (__DEV__) {
113
+ isAsyncDebugging = !global.nativeExtensions && !global.nativeCallSyncHook && !global.RN$Bridgeless;
114
+ }
115
+ }
116
+ });
117
+
118
+ // ../node_modules/expo-modules-core/src/Platform.ts
119
+ var import_react_native2, nativeSelect, Platform, Platform_default;
120
+ var init_Platform = __esm({
121
+ "../node_modules/expo-modules-core/src/Platform.ts"() {
122
+ "use strict";
123
+ import_react_native2 = require("react-native");
124
+ init_browser();
125
+ if (__DEV__ && typeof process.env.EXPO_OS === "undefined") {
126
+ console.warn(
127
+ `The global process.env.EXPO_OS is not defined. This should be inlined by babel-preset-expo during transformation.`
128
+ );
129
+ }
130
+ nativeSelect = typeof window !== "undefined" ? import_react_native2.Platform.select : (
131
+ // process.env.EXPO_OS is injected by `babel-preset-expo` and available in both client and `react-server` environments.
132
+ // Opt to use the env var when possible, and fallback to the React Native Platform module when it's not (arbitrary bundlers and transformers).
133
+ function select(specifics) {
134
+ if (!process.env.EXPO_OS) return void 0;
135
+ if (specifics.hasOwnProperty(process.env.EXPO_OS)) {
136
+ return specifics[process.env.EXPO_OS];
137
+ } else if (process.env.EXPO_OS !== "web" && specifics.hasOwnProperty("native")) {
138
+ return specifics.native;
139
+ } else if (specifics.hasOwnProperty("default")) {
140
+ return specifics.default;
141
+ }
142
+ return void 0;
143
+ }
144
+ );
145
+ Platform = {
146
+ /**
147
+ * Denotes the currently running platform.
148
+ * Can be one of ios, android, web.
149
+ */
150
+ OS: process.env.EXPO_OS || import_react_native2.Platform.OS,
151
+ /**
152
+ * Returns the value with the matching platform.
153
+ * Object keys can be any of ios, android, native, web, default.
154
+ *
155
+ * @ios ios, native, default
156
+ * @android android, native, default
157
+ * @web web, default
158
+ */
159
+ select: nativeSelect,
160
+ /**
161
+ * Denotes if the DOM API is available in the current environment.
162
+ * The DOM is not available in native React runtimes and Node.js.
163
+ */
164
+ isDOMAvailable,
165
+ /**
166
+ * Denotes if the current environment can attach event listeners
167
+ * to the window. This will return false in native React
168
+ * runtimes and Node.js.
169
+ */
170
+ canUseEventListeners,
171
+ /**
172
+ * Denotes if the current environment can inspect properties of the
173
+ * screen on which the current window is being rendered. This will
174
+ * return false in native React runtimes and Node.js.
175
+ */
176
+ canUseViewport,
177
+ /**
178
+ * If the JavaScript is being executed in a remote JavaScript environment.
179
+ * When `true`, synchronous native invocations cannot be executed.
180
+ */
181
+ isAsyncDebugging
182
+ };
183
+ Platform_default = Platform;
184
+ }
185
+ });
186
+
187
+ // ../node_modules/expo-modules-core/src/errors/CodedError.ts
188
+ var CodedError;
189
+ var init_CodedError = __esm({
190
+ "../node_modules/expo-modules-core/src/errors/CodedError.ts"() {
191
+ "use strict";
192
+ CodedError = class extends Error {
193
+ code;
194
+ info;
195
+ constructor(code, message) {
196
+ super(message);
197
+ this.code = code;
198
+ }
199
+ };
200
+ }
201
+ });
202
+
203
+ // ../node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts
204
+ var init_setUpJsLogger_fx = __esm({
205
+ "../node_modules/expo-modules-core/src/sweet/setUpJsLogger.fx.ts"() {
206
+ "use strict";
207
+ init_NativeJSLogger();
208
+ init_Platform();
209
+ init_CodedError();
210
+ if (__DEV__ && (Platform_default.OS === "android" || Platform_default.OS === "ios") && NativeJSLogger_default) {
211
+ const onNewException = {
212
+ eventName: "ExpoModulesCoreJSLogger.onNewError",
213
+ action: console.error
214
+ };
215
+ const onNewWarning = {
216
+ eventName: "ExpoModulesCoreJSLogger.onNewWarning",
217
+ action: console.warn
218
+ };
219
+ const onNewDebug = {
220
+ eventName: "ExpoModulesCoreJSLogger.onNewDebug",
221
+ action: console.debug
222
+ };
223
+ const onNewInfo = {
224
+ eventName: "ExpoModulesCoreJSLogger.onNewInfo",
225
+ action: console.info
226
+ };
227
+ const onNewTrace = {
228
+ eventName: "ExpoModulesCoreJSLogger.onNewTrace",
229
+ action: console.trace
230
+ };
231
+ const listeners = [
232
+ onNewException,
233
+ onNewWarning,
234
+ onNewDebug,
235
+ onNewInfo,
236
+ onNewTrace
237
+ ];
238
+ for (const listener of listeners) {
239
+ NativeJSLogger_default.addListener(listener.eventName, ({ message }) => {
240
+ listener.action(message);
241
+ });
242
+ }
243
+ }
244
+ globalThis.ExpoModulesCore_CodedError = CodedError;
245
+ }
246
+ });
247
+
248
+ // ../node_modules/expo-modules-core/src/errors/UnavailabilityError.ts
249
+ var UnavailabilityError;
250
+ var init_UnavailabilityError = __esm({
251
+ "../node_modules/expo-modules-core/src/errors/UnavailabilityError.ts"() {
252
+ "use strict";
253
+ init_CodedError();
254
+ init_Platform();
255
+ UnavailabilityError = class extends CodedError {
256
+ constructor(moduleName, propertyName) {
257
+ super(
258
+ "ERR_UNAVAILABLE",
259
+ `The method or property ${moduleName}.${propertyName} is not available on ${Platform_default.OS}, are you sure you've linked all the native dependencies properly?`
260
+ );
261
+ }
262
+ };
263
+ }
264
+ });
265
+
266
+ // ../node_modules/expo-modules-core/src/registerWebModule.ts
267
+ var init_registerWebModule = __esm({
268
+ "../node_modules/expo-modules-core/src/registerWebModule.ts"() {
269
+ "use strict";
270
+ }
271
+ });
272
+
273
+ // ../node_modules/expo-modules-core/src/TypedArrays.types.ts
274
+ var init_TypedArrays_types = __esm({
275
+ "../node_modules/expo-modules-core/src/TypedArrays.types.ts"() {
276
+ "use strict";
277
+ }
278
+ });
279
+
280
+ // ../node_modules/expo-modules-core/src/PermissionsInterface.ts
281
+ var init_PermissionsInterface = __esm({
282
+ "../node_modules/expo-modules-core/src/PermissionsInterface.ts"() {
283
+ "use strict";
284
+ }
285
+ });
286
+
287
+ // ../node_modules/expo-modules-core/src/PermissionsHook.ts
288
+ var import_react;
289
+ var init_PermissionsHook = __esm({
290
+ "../node_modules/expo-modules-core/src/PermissionsHook.ts"() {
291
+ "use strict";
292
+ "use client";
293
+ import_react = require("react");
294
+ }
295
+ });
296
+
297
+ // ../node_modules/expo-modules-core/src/Refs.ts
298
+ var import_react2;
299
+ var init_Refs = __esm({
300
+ "../node_modules/expo-modules-core/src/Refs.ts"() {
301
+ "use strict";
302
+ import_react2 = require("react");
303
+ }
304
+ });
305
+
306
+ // ../node_modules/expo-modules-core/src/hooks/useReleasingSharedObject.ts
307
+ var import_react3;
308
+ var init_useReleasingSharedObject = __esm({
309
+ "../node_modules/expo-modules-core/src/hooks/useReleasingSharedObject.ts"() {
310
+ "use strict";
311
+ "use client";
312
+ import_react3 = require("react");
313
+ }
314
+ });
315
+
316
+ // ../node_modules/expo-modules-core/src/reload.ts
317
+ var init_reload = __esm({
318
+ "../node_modules/expo-modules-core/src/reload.ts"() {
319
+ "use strict";
320
+ }
321
+ });
322
+
323
+ // ../node_modules/invariant/invariant.js
324
+ var require_invariant = __commonJS({
325
+ "../node_modules/invariant/invariant.js"(exports2, module2) {
326
+ "use strict";
327
+ var NODE_ENV = process.env.NODE_ENV;
328
+ var invariant2 = function(condition, format, a, b, c, d, e, f) {
329
+ if (NODE_ENV !== "production") {
330
+ if (format === void 0) {
331
+ throw new Error("invariant requires an error message argument");
332
+ }
333
+ }
334
+ if (!condition) {
335
+ var error;
336
+ if (format === void 0) {
337
+ error = new Error(
338
+ "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
339
+ );
340
+ } else {
341
+ var args = [a, b, c, d, e, f];
342
+ var argIndex = 0;
343
+ error = new Error(
344
+ format.replace(/%s/g, function() {
345
+ return args[argIndex++];
346
+ })
347
+ );
348
+ error.name = "Invariant Violation";
349
+ }
350
+ error.framesToPop = 1;
351
+ throw error;
352
+ }
353
+ };
354
+ module2.exports = invariant2;
355
+ }
356
+ });
357
+
358
+ // ../node_modules/expo-modules-core/src/index.ts
359
+ var init_src = __esm({
360
+ "../node_modules/expo-modules-core/src/index.ts"() {
361
+ "use strict";
362
+ init_setUpJsLogger_fx();
363
+ init_Platform();
364
+ init_requireNativeModule();
365
+ init_registerWebModule();
366
+ init_TypedArrays_types();
367
+ init_PermissionsInterface();
368
+ init_PermissionsHook();
369
+ init_Refs();
370
+ init_useReleasingSharedObject();
371
+ init_reload();
372
+ init_CodedError();
373
+ init_UnavailabilityError();
374
+ }
375
+ });
376
+
377
+ // ../node_modules/expo-constants/build/Constants.types.js
378
+ var AppOwnership, ExecutionEnvironment, UserInterfaceIdiom;
379
+ var init_Constants_types = __esm({
380
+ "../node_modules/expo-constants/build/Constants.types.js"() {
381
+ "use strict";
382
+ (function(AppOwnership2) {
383
+ AppOwnership2["Expo"] = "expo";
384
+ })(AppOwnership || (AppOwnership = {}));
385
+ (function(ExecutionEnvironment2) {
386
+ ExecutionEnvironment2["Bare"] = "bare";
387
+ ExecutionEnvironment2["Standalone"] = "standalone";
388
+ ExecutionEnvironment2["StoreClient"] = "storeClient";
389
+ })(ExecutionEnvironment || (ExecutionEnvironment = {}));
390
+ (function(UserInterfaceIdiom2) {
391
+ UserInterfaceIdiom2["Handset"] = "handset";
392
+ UserInterfaceIdiom2["Tablet"] = "tablet";
393
+ UserInterfaceIdiom2["Desktop"] = "desktop";
394
+ UserInterfaceIdiom2["TV"] = "tv";
395
+ UserInterfaceIdiom2["Unsupported"] = "unsupported";
396
+ })(UserInterfaceIdiom || (UserInterfaceIdiom = {}));
397
+ }
398
+ });
399
+
400
+ // ../node_modules/expo-constants/build/ExponentConstants.js
401
+ var ExponentConstants_default;
402
+ var init_ExponentConstants = __esm({
403
+ "../node_modules/expo-constants/build/ExponentConstants.js"() {
404
+ "use strict";
405
+ init_src();
406
+ ExponentConstants_default = requireOptionalNativeModule("ExponentConstants");
407
+ }
408
+ });
409
+
410
+ // ../node_modules/expo-constants/build/Constants.js
411
+ var Constants_exports = {};
412
+ __export(Constants_exports, {
413
+ AppOwnership: () => AppOwnership,
414
+ ExecutionEnvironment: () => ExecutionEnvironment,
415
+ UserInterfaceIdiom: () => UserInterfaceIdiom,
416
+ default: () => Constants_default
417
+ });
418
+ function isEmbeddedManifest(manifest) {
419
+ return !isExpoUpdatesManifest(manifest);
420
+ }
421
+ function isExpoUpdatesManifest(manifest) {
422
+ return "metadata" in manifest;
423
+ }
424
+ function getManifest(suppressWarning = false) {
425
+ if (!rawManifest) {
426
+ const invalidManifestType = rawManifest === null ? "null" : "undefined";
427
+ if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare && import_react_native3.Platform.OS !== "web") {
428
+ if (!suppressWarning) {
429
+ console.warn(`Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`);
430
+ }
431
+ } else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {
432
+ throw new CodedError("ERR_CONSTANTS_MANIFEST_UNAVAILABLE", `Constants.manifest is ${invalidManifestType}, must be an object.`);
433
+ }
434
+ }
435
+ return rawManifest;
436
+ }
437
+ var import_react_native3, ExpoUpdates, rawUpdatesManifest, rawDevLauncherManifest, rawAppConfig, rawManifest, name, appOwnership, nativeConstants, constants, Constants_default;
438
+ var init_Constants = __esm({
439
+ "../node_modules/expo-constants/build/Constants.js"() {
440
+ "use strict";
441
+ init_src();
442
+ import_react_native3 = require("react-native");
443
+ init_Constants_types();
444
+ init_ExponentConstants();
445
+ if (!ExponentConstants_default) {
446
+ console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");
447
+ }
448
+ ExpoUpdates = requireOptionalNativeModule("ExpoUpdates");
449
+ rawUpdatesManifest = null;
450
+ if (ExpoUpdates) {
451
+ let updatesManifest;
452
+ if (ExpoUpdates.manifest) {
453
+ updatesManifest = ExpoUpdates.manifest;
454
+ } else if (ExpoUpdates.manifestString) {
455
+ updatesManifest = JSON.parse(ExpoUpdates.manifestString);
456
+ }
457
+ if (updatesManifest && Object.keys(updatesManifest).length > 0) {
458
+ rawUpdatesManifest = updatesManifest;
459
+ }
460
+ }
461
+ rawDevLauncherManifest = null;
462
+ if (import_react_native3.NativeModules.EXDevLauncher) {
463
+ let devLauncherManifest;
464
+ if (import_react_native3.NativeModules.EXDevLauncher.manifestString) {
465
+ devLauncherManifest = JSON.parse(import_react_native3.NativeModules.EXDevLauncher.manifestString);
466
+ }
467
+ if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {
468
+ rawDevLauncherManifest = devLauncherManifest;
469
+ }
470
+ }
471
+ rawAppConfig = null;
472
+ if (ExponentConstants_default && ExponentConstants_default.manifest) {
473
+ const appConfig = ExponentConstants_default.manifest;
474
+ if (typeof appConfig === "string") {
475
+ rawAppConfig = JSON.parse(appConfig);
476
+ } else {
477
+ rawAppConfig = appConfig;
478
+ }
479
+ }
480
+ rawManifest = rawUpdatesManifest ?? rawDevLauncherManifest ?? rawAppConfig;
481
+ ({ name, appOwnership, ...nativeConstants } = ExponentConstants_default || {});
482
+ constants = {
483
+ ...nativeConstants,
484
+ // Ensure this is null in bare workflow
485
+ appOwnership: appOwnership ?? null
486
+ };
487
+ Object.defineProperties(constants, {
488
+ /**
489
+ * Use `manifest` property by default.
490
+ * This property is only used for internal purposes.
491
+ * It behaves similarly to the original one, but suppresses warning upon no manifest available.
492
+ * `expo-asset` uses it to prevent users from seeing mentioned warning.
493
+ */
494
+ __unsafeNoWarnManifest: {
495
+ get() {
496
+ const maybeManifest = getManifest(true);
497
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
498
+ return null;
499
+ }
500
+ return maybeManifest;
501
+ },
502
+ enumerable: false
503
+ },
504
+ __unsafeNoWarnManifest2: {
505
+ get() {
506
+ const maybeManifest = getManifest(true);
507
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
508
+ return null;
509
+ }
510
+ return maybeManifest;
511
+ },
512
+ enumerable: false
513
+ },
514
+ manifest: {
515
+ get() {
516
+ const maybeManifest = getManifest();
517
+ if (!maybeManifest || !isEmbeddedManifest(maybeManifest)) {
518
+ return null;
519
+ }
520
+ return maybeManifest;
521
+ },
522
+ enumerable: true
523
+ },
524
+ manifest2: {
525
+ get() {
526
+ const maybeManifest = getManifest();
527
+ if (!maybeManifest || !isExpoUpdatesManifest(maybeManifest)) {
528
+ return null;
529
+ }
530
+ return maybeManifest;
531
+ },
532
+ enumerable: true
533
+ },
534
+ expoConfig: {
535
+ get() {
536
+ const maybeManifest = getManifest(true);
537
+ if (!maybeManifest) {
538
+ return null;
539
+ }
540
+ if (ExpoUpdates && ExpoUpdates.isEmbeddedLaunch) {
541
+ return rawAppConfig;
542
+ }
543
+ if (isExpoUpdatesManifest(maybeManifest)) {
544
+ return maybeManifest.extra?.expoClient ?? null;
545
+ } else if (isEmbeddedManifest(maybeManifest)) {
546
+ return maybeManifest;
547
+ }
548
+ return null;
549
+ },
550
+ enumerable: true
551
+ },
552
+ expoGoConfig: {
553
+ get() {
554
+ const maybeManifest = getManifest(true);
555
+ if (!maybeManifest) {
556
+ return null;
557
+ }
558
+ if (isExpoUpdatesManifest(maybeManifest)) {
559
+ return maybeManifest.extra?.expoGo ?? null;
560
+ } else if (isEmbeddedManifest(maybeManifest)) {
561
+ return maybeManifest;
562
+ }
563
+ return null;
564
+ },
565
+ enumerable: true
566
+ },
567
+ easConfig: {
568
+ get() {
569
+ const maybeManifest = getManifest(true);
570
+ if (!maybeManifest) {
571
+ return null;
572
+ }
573
+ if (isExpoUpdatesManifest(maybeManifest)) {
574
+ return maybeManifest.extra?.eas ?? null;
575
+ } else if (isEmbeddedManifest(maybeManifest)) {
576
+ return maybeManifest;
577
+ }
578
+ return null;
579
+ },
580
+ enumerable: true
581
+ },
582
+ __rawManifest_TEST: {
583
+ get() {
584
+ return rawManifest;
585
+ },
586
+ set(value) {
587
+ rawManifest = value;
588
+ },
589
+ enumerable: false
590
+ }
591
+ });
592
+ Constants_default = constants;
593
+ }
594
+ });
595
+
596
+ // ../node_modules/expo-linking/build/ExpoLinking.js
597
+ var ExpoLinking, ExpoLinking_default;
598
+ var init_ExpoLinking = __esm({
599
+ "../node_modules/expo-linking/build/ExpoLinking.js"() {
600
+ "use strict";
601
+ init_src();
602
+ ExpoLinking = requireNativeModule("ExpoLinking");
603
+ ExpoLinking_default = ExpoLinking;
604
+ }
605
+ });
606
+
607
+ // ../node_modules/expo-linking/build/RNLinking.js
608
+ var import_react_native4, RNLinking_default;
609
+ var init_RNLinking = __esm({
610
+ "../node_modules/expo-linking/build/RNLinking.js"() {
611
+ "use strict";
612
+ import_react_native4 = require("react-native");
613
+ RNLinking_default = import_react_native4.Linking;
614
+ }
615
+ });
616
+
617
+ // ../node_modules/expo-linking/build/Schemes.js
618
+ function hasCustomScheme() {
619
+ if (Constants_default.executionEnvironment === ExecutionEnvironment.Bare) {
620
+ return true;
621
+ } else if (Constants_default.executionEnvironment === ExecutionEnvironment.Standalone) {
622
+ const manifestSchemes = collectManifestSchemes();
623
+ return !!manifestSchemes.length;
624
+ }
625
+ return false;
626
+ }
627
+ function getSchemes(config) {
628
+ if (config) {
629
+ if (Array.isArray(config.scheme)) {
630
+ const validate = (value) => {
631
+ return typeof value === "string";
632
+ };
633
+ return config.scheme.filter(validate);
634
+ } else if (typeof config.scheme === "string") {
635
+ return [config.scheme];
636
+ }
637
+ }
638
+ return [];
639
+ }
640
+ function collectManifestSchemes() {
641
+ const platformManifest = Platform_default.select({
642
+ ios: Constants_default.expoConfig?.ios,
643
+ android: Constants_default.expoConfig?.android
644
+ }) ?? {};
645
+ return getSchemes(Constants_default.expoConfig).concat(getSchemes(platformManifest));
646
+ }
647
+ function getNativeAppIdScheme() {
648
+ return Platform_default.select({
649
+ ios: Constants_default.expoConfig?.ios?.bundleIdentifier,
650
+ // TODO: This may change to android.applicationId in the future.
651
+ android: Constants_default.expoConfig?.android?.package
652
+ }) ?? null;
653
+ }
654
+ function hasConstantsManifest() {
655
+ return !!Object.keys(Constants_default.expoConfig ?? {}).length;
656
+ }
657
+ function resolveScheme(options) {
658
+ if (Constants_default.executionEnvironment !== ExecutionEnvironment.StoreClient && !hasConstantsManifest()) {
659
+ throw new Error(`expo-linking needs access to the expo-constants manifest (app.json or app.config.js) to determine what URI scheme to use. Setup the manifest and rebuild: https://github.com/expo/expo/blob/main/packages/expo-constants/README.md`);
660
+ }
661
+ const manifestSchemes = collectManifestSchemes();
662
+ const nativeAppId = getNativeAppIdScheme();
663
+ if (!manifestSchemes.length) {
664
+ if (__DEV__ && !options.isSilent) {
665
+ console.warn(`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for production apps, if it's left blank, your app may crash. The scheme does not apply to development in the Expo client but you should add it as soon as you start working with Linking to avoid creating a broken build. Learn more: ${LINKING_GUIDE_URL}`);
666
+ } else if (!__DEV__ || Constants_default.executionEnvironment !== ExecutionEnvironment.StoreClient) {
667
+ throw new Error("Cannot make a deep link into a standalone app with no custom scheme defined");
668
+ }
669
+ }
670
+ if (Constants_default.executionEnvironment === ExecutionEnvironment.StoreClient) {
671
+ if (options.scheme) {
672
+ if (EXPO_CLIENT_SCHEMES?.includes(options.scheme)) {
673
+ return options.scheme;
674
+ }
675
+ }
676
+ return "exp";
677
+ }
678
+ const schemes = [...manifestSchemes, nativeAppId].filter(Boolean);
679
+ if (options.scheme) {
680
+ if (__DEV__) {
681
+ if (!schemes.includes(options.scheme) && !options.isSilent) {
682
+ console.warn(`The provided Linking scheme '${options.scheme}' does not appear in the list of possible URI schemes in your Expo config. Expected one of: ${schemes.map((scheme2) => `'${scheme2}'`).join(", ")}`);
683
+ }
684
+ }
685
+ return options.scheme;
686
+ }
687
+ if (!!nativeAppId && !manifestSchemes.length && !options.isSilent) {
688
+ console.warn(`Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this warning. Using native app identifier as the scheme '${nativeAppId}'. Learn more: ${LINKING_GUIDE_URL}`);
689
+ return nativeAppId;
690
+ }
691
+ const [scheme, ...extraSchemes] = manifestSchemes;
692
+ if (!scheme) {
693
+ const errorMessage = `Linking requires a build-time setting \`scheme\` in the project's Expo config (app.config.js or app.json) for bare or production apps. Manually providing a \`scheme\` property can circumvent this error. Learn more: ${LINKING_GUIDE_URL}`;
694
+ throw new Error(errorMessage);
695
+ }
696
+ if (extraSchemes.length && !options.isSilent) {
697
+ console.warn(`Linking found multiple possible URI schemes in your Expo config.
698
+ Using '${scheme}'. Ignoring: ${[
699
+ ...extraSchemes,
700
+ nativeAppId
701
+ ].filter(Boolean).join(", ")}.
702
+ Provide the preferred URI scheme to the Linking API.`);
703
+ }
704
+ return scheme;
705
+ }
706
+ var LINKING_GUIDE_URL, EXPO_CLIENT_SCHEMES;
707
+ var init_Schemes = __esm({
708
+ "../node_modules/expo-linking/build/Schemes.js"() {
709
+ "use strict";
710
+ init_Constants();
711
+ init_src();
712
+ LINKING_GUIDE_URL = `https://docs.expo.dev/guides/linking/`;
713
+ EXPO_CLIENT_SCHEMES = Platform_default.select({
714
+ // Results from `npx uri-scheme list --info-path ios/Exponent/Supporting/Info.plist`
715
+ ios: [
716
+ "exp",
717
+ "exps",
718
+ "fb1696089354000816",
719
+ "host.exp.exponent",
720
+ "com.googleusercontent.apps.603386649315-vp4revvrcgrcjme51ebuhbkbspl048l9"
721
+ ],
722
+ // Collected manually
723
+ android: ["exp", "exps"]
724
+ });
725
+ }
726
+ });
727
+
728
+ // ../node_modules/expo-linking/build/validateURL.js
729
+ function validateURL(url) {
730
+ (0, import_invariant.default)(typeof url === "string", "Invalid URL: should be a string. Was: " + url);
731
+ (0, import_invariant.default)(url, "Invalid URL: cannot be empty");
732
+ }
733
+ var import_invariant;
734
+ var init_validateURL = __esm({
735
+ "../node_modules/expo-linking/build/validateURL.js"() {
736
+ "use strict";
737
+ import_invariant = __toESM(require_invariant());
738
+ }
739
+ });
740
+
741
+ // ../node_modules/expo-linking/build/createURL.js
742
+ function getHostUri() {
743
+ if (Constants_default.expoConfig?.hostUri) {
744
+ return Constants_default.expoConfig.hostUri;
745
+ } else if (!hasCustomScheme()) {
746
+ return removeScheme(Constants_default.linkingUri).replace(/\/--($|\/.*$)/, "");
747
+ } else {
748
+ return null;
749
+ }
750
+ }
751
+ function isExpoHosted() {
752
+ const hostUri = getHostUri();
753
+ return !!(hostUri && (/^(.*\.)?(expo\.io|exp\.host|exp\.direct|expo\.test|expo\.dev)(:.*)?(\/.*)?$/.test(hostUri) || Constants_default.expoGoConfig?.developer));
754
+ }
755
+ function removeScheme(url) {
756
+ return url.replace(/^[a-zA-Z0-9+.-]+:\/\//, "");
757
+ }
758
+ function removePort(url) {
759
+ return url.replace(/(?=([a-zA-Z0-9+.-]+:\/\/)?[^/]):\d+/, "");
760
+ }
761
+ function removeLeadingSlash(url) {
762
+ return url.replace(/^\//, "");
763
+ }
764
+ function removeTrailingSlashAndQueryString(url) {
765
+ return url.replace(/\/?\?.*$/, "");
766
+ }
767
+ function ensureLeadingSlash(input, shouldAppend) {
768
+ const hasSlash = input.startsWith("/");
769
+ if (hasSlash && !shouldAppend) {
770
+ return input.substring(1);
771
+ } else if (!hasSlash && shouldAppend) {
772
+ return `/${input}`;
773
+ }
774
+ return input;
775
+ }
776
+ function createURL(path, { scheme, queryParams = {}, isTripleSlashed = false } = {}) {
777
+ const resolvedScheme = resolveScheme({ scheme });
778
+ let hostUri = getHostUri() || "";
779
+ if (hasCustomScheme() && isExpoHosted()) {
780
+ hostUri = "";
781
+ }
782
+ if (path) {
783
+ if (isExpoHosted() && hostUri) {
784
+ path = `/--/${removeLeadingSlash(path)}`;
785
+ }
786
+ if (isTripleSlashed && !path.startsWith("/")) {
787
+ path = `/${path}`;
788
+ }
789
+ } else {
790
+ path = "";
791
+ }
792
+ let queryString = "";
793
+ const queryStringMatchResult = hostUri.match(/(.*)\?(.+)/);
794
+ if (queryStringMatchResult) {
795
+ hostUri = queryStringMatchResult[1];
796
+ queryString = queryStringMatchResult[2];
797
+ let paramsFromHostUri = {};
798
+ try {
799
+ paramsFromHostUri = Object.fromEntries(
800
+ // @ts-ignore: [Symbol.iterator] is indeed, available on every platform.
801
+ new URLSearchParams(queryString)
802
+ );
803
+ } catch {
804
+ }
805
+ queryParams = {
806
+ ...queryParams,
807
+ ...paramsFromHostUri
808
+ };
809
+ }
810
+ queryString = new URLSearchParams(
811
+ // For legacy purposes, we'll strip out the nullish values before creating the URL.
812
+ Object.fromEntries(Object.entries(queryParams).filter(([, value]) => value != null))
813
+ ).toString();
814
+ if (queryString) {
815
+ queryString = `?${queryString}`;
816
+ }
817
+ hostUri = ensureLeadingSlash(hostUri, !isTripleSlashed);
818
+ const encodedURI = encodeURI(`${resolvedScheme}:${isTripleSlashed ? "/" : ""}/${hostUri}${path}`);
819
+ return `${encodedURI}${queryString}`;
820
+ }
821
+ function parse(url) {
822
+ validateURL(url);
823
+ const queryParams = {};
824
+ let path = null;
825
+ let hostname = null;
826
+ let scheme = null;
827
+ try {
828
+ const parsed = new URL(url);
829
+ parsed.searchParams.forEach((value, key) => {
830
+ queryParams[key] = decodeURIComponent(value);
831
+ });
832
+ path = parsed.pathname || null;
833
+ hostname = parsed.hostname || null;
834
+ scheme = parsed.protocol || null;
835
+ } catch {
836
+ path = url;
837
+ }
838
+ const hostUri = getHostUri() || "";
839
+ const hostUriStripped = removePort(removeTrailingSlashAndQueryString(hostUri));
840
+ if (scheme) {
841
+ scheme = scheme.substring(0, scheme.length - 1);
842
+ }
843
+ if (path) {
844
+ path = removeLeadingSlash(path);
845
+ let expoPrefix = null;
846
+ if (hostUriStripped) {
847
+ const parts = hostUriStripped.split("/");
848
+ expoPrefix = parts.slice(1).concat(["--/"]).join("/");
849
+ }
850
+ if (isExpoHosted() && !hasCustomScheme() && expoPrefix && path.startsWith(expoPrefix)) {
851
+ path = path.substring(expoPrefix.length);
852
+ hostname = null;
853
+ } else if (path.indexOf("+") > -1) {
854
+ path = path.substring(path.indexOf("+") + 1);
855
+ }
856
+ }
857
+ return {
858
+ hostname,
859
+ path,
860
+ queryParams,
861
+ scheme
862
+ };
863
+ }
864
+ var init_createURL = __esm({
865
+ "../node_modules/expo-linking/build/createURL.js"() {
866
+ "use strict";
867
+ init_Constants();
868
+ init_Schemes();
869
+ init_validateURL();
870
+ }
871
+ });
872
+
873
+ // ../node_modules/expo-linking/build/Linking.types.js
874
+ var init_Linking_types = __esm({
875
+ "../node_modules/expo-linking/build/Linking.types.js"() {
876
+ "use strict";
877
+ }
878
+ });
879
+
880
+ // ../node_modules/expo-linking/build/Linking.js
881
+ var Linking_exports = {};
882
+ __export(Linking_exports, {
883
+ addEventListener: () => addEventListener,
884
+ canOpenURL: () => canOpenURL,
885
+ collectManifestSchemes: () => collectManifestSchemes,
886
+ createURL: () => createURL,
887
+ getInitialURL: () => getInitialURL,
888
+ getLinkingURL: () => getLinkingURL,
889
+ hasConstantsManifest: () => hasConstantsManifest,
890
+ hasCustomScheme: () => hasCustomScheme,
891
+ openSettings: () => openSettings,
892
+ openURL: () => openURL,
893
+ parse: () => parse,
894
+ parseInitialURLAsync: () => parseInitialURLAsync,
895
+ resolveScheme: () => resolveScheme,
896
+ sendIntent: () => sendIntent,
897
+ useLinkingURL: () => useLinkingURL,
898
+ useURL: () => useURL
899
+ });
900
+ function addEventListener(type, handler) {
901
+ return RNLinking_default.addEventListener(type, handler);
902
+ }
903
+ async function parseInitialURLAsync() {
904
+ const initialUrl = await RNLinking_default.getInitialURL();
905
+ if (!initialUrl) {
906
+ return {
907
+ scheme: null,
908
+ hostname: null,
909
+ path: null,
910
+ queryParams: null
911
+ };
912
+ }
913
+ return parse(initialUrl);
914
+ }
915
+ async function sendIntent(action, extras) {
916
+ if (import_react_native5.Platform.OS === "android") {
917
+ return await RNLinking_default.sendIntent(action, extras);
918
+ }
919
+ throw new UnavailabilityError("Linking", "sendIntent");
920
+ }
921
+ async function openSettings() {
922
+ if (import_react_native5.Platform.OS === "web") {
923
+ throw new UnavailabilityError("Linking", "openSettings");
924
+ }
925
+ if (RNLinking_default.openSettings) {
926
+ return await RNLinking_default.openSettings();
927
+ }
928
+ await openURL("app-settings:");
929
+ }
930
+ async function getInitialURL() {
931
+ return await RNLinking_default.getInitialURL() ?? null;
932
+ }
933
+ function getLinkingURL() {
934
+ return ExpoLinking_default.getLinkingURL();
935
+ }
936
+ async function openURL(url) {
937
+ validateURL(url);
938
+ return await RNLinking_default.openURL(url);
939
+ }
940
+ async function canOpenURL(url) {
941
+ validateURL(url);
942
+ return await RNLinking_default.canOpenURL(url);
943
+ }
944
+ function useURL() {
945
+ const [url, setLink] = (0, import_react4.useState)(null);
946
+ function onChange(event) {
947
+ setLink(event.url);
948
+ }
949
+ (0, import_react4.useEffect)(() => {
950
+ getInitialURL().then((url2) => setLink(url2));
951
+ const subscription = addEventListener("url", onChange);
952
+ return () => subscription.remove();
953
+ }, []);
954
+ return url;
955
+ }
956
+ function useLinkingURL() {
957
+ const [url, setLink] = (0, import_react4.useState)(ExpoLinking_default.getLinkingURL);
958
+ function onChange(event) {
959
+ setLink(event.url);
960
+ }
961
+ (0, import_react4.useEffect)(() => {
962
+ const subscription = ExpoLinking_default.addListener("onURLReceived", onChange);
963
+ return () => subscription.remove();
964
+ }, []);
965
+ return url ?? null;
966
+ }
967
+ var import_react4, import_react_native5;
968
+ var init_Linking = __esm({
969
+ "../node_modules/expo-linking/build/Linking.js"() {
970
+ "use strict";
971
+ init_src();
972
+ import_react4 = require("react");
973
+ import_react_native5 = require("react-native");
974
+ init_ExpoLinking();
975
+ init_RNLinking();
976
+ init_createURL();
977
+ init_validateURL();
978
+ init_Linking_types();
979
+ init_Schemes();
980
+ init_createURL();
981
+ }
982
+ });
983
+
984
+ // src/assets/Column.png
985
+ var require_Column = __commonJS({
986
+ "src/assets/Column.png"(exports2, module2) {
987
+ module2.exports = "./Column-LINBKAMV.png";
988
+ }
989
+ });
990
+
30
991
  // src/index.ts
31
992
  var index_exports = {};
32
993
  __export(index_exports, {
33
994
  ColumnCrypto: () => ColumnCrypto,
995
+ ColumnWalletModal: () => ColumnWalletModal,
996
+ ColumnWalletNative: () => ColumnWalletNative,
34
997
  ColumnWalletSDK: () => ColumnWalletSDK,
35
998
  ColumnWalletWeb: () => ColumnWalletWeb
36
999
  });
@@ -482,9 +1445,165 @@ var ColumnWalletWeb = class _ColumnWalletWeb extends ColumnWalletSDK {
482
1445
  this.modal.open();
483
1446
  }
484
1447
  };
1448
+
1449
+ // src/ui/native/ColumnWalletNative.ts
1450
+ var ColumnWalletNative = class _ColumnWalletNative extends ColumnWalletSDK {
1451
+ constructor(config) {
1452
+ const detectedConfig = _ColumnWalletNative.autoDetectMetadata(config);
1453
+ super(detectedConfig);
1454
+ }
1455
+ static autoDetectMetadata(config) {
1456
+ const detectedConfig = { ...config };
1457
+ try {
1458
+ const Constants = (init_Constants(), __toCommonJS(Constants_exports)).default;
1459
+ const expoConfig = Constants.expoConfig || Constants.manifest;
1460
+ if (!detectedConfig.appName && expoConfig?.name) {
1461
+ detectedConfig.appName = expoConfig.name;
1462
+ }
1463
+ if (!detectedConfig.appDescription && expoConfig?.description) {
1464
+ detectedConfig.appDescription = expoConfig.description;
1465
+ }
1466
+ } catch (e) {
1467
+ }
1468
+ try {
1469
+ if (!detectedConfig.redirectLink) {
1470
+ const Linking3 = (init_Linking(), __toCommonJS(Linking_exports));
1471
+ detectedConfig.redirectLink = Linking3.createURL("");
1472
+ }
1473
+ } catch (e) {
1474
+ }
1475
+ return detectedConfig;
1476
+ }
1477
+ };
1478
+
1479
+ // src/ui/native/ColumnWalletModal.tsx
1480
+ var import_react5 = __toESM(require("react"));
1481
+ var import_react_native6 = require("react-native");
1482
+ function ColumnWalletModal({ visible, onClose, onConnect, sdk }) {
1483
+ const handleConnect = async () => {
1484
+ try {
1485
+ const url = sdk.connect();
1486
+ console.log("\u{1F517} Modal: Attempting to connect with URL:", url);
1487
+ try {
1488
+ const supported = await import_react_native6.Linking.canOpenURL(url);
1489
+ if (supported) {
1490
+ await import_react_native6.Linking.openURL(url);
1491
+ onConnect();
1492
+ onClose();
1493
+ return;
1494
+ }
1495
+ } catch (e) {
1496
+ }
1497
+ await import_react_native6.Linking.openURL(url).catch(() => {
1498
+ });
1499
+ onConnect();
1500
+ onClose();
1501
+ } catch (error) {
1502
+ console.error("Deep link error:", error);
1503
+ }
1504
+ };
1505
+ return /* @__PURE__ */ import_react5.default.createElement(
1506
+ import_react_native6.Modal,
1507
+ {
1508
+ animationType: "slide",
1509
+ transparent: true,
1510
+ visible,
1511
+ onRequestClose: onClose
1512
+ },
1513
+ /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.centeredView }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.TouchableOpacity, { style: styles.overlay, onPress: onClose, activeOpacity: 1 }), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.modalView }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: styles.modalTitle }, "Connect Wallet"), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.TouchableOpacity, { style: styles.walletOption, onPress: handleConnect }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.walletIconContainer }, /* @__PURE__ */ import_react5.default.createElement(
1514
+ import_react_native6.Image,
1515
+ {
1516
+ source: require_Column(),
1517
+ style: styles.walletIconImage
1518
+ }
1519
+ )), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.View, { style: styles.walletInfo }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: styles.walletName }, "Column Wallet"), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: styles.walletTag }, "Recommended"))), /* @__PURE__ */ import_react5.default.createElement(import_react_native6.TouchableOpacity, { style: styles.closeButton, onPress: onClose }, /* @__PURE__ */ import_react5.default.createElement(import_react_native6.Text, { style: styles.closeButtonText }, "Cancel"))))
1520
+ );
1521
+ }
1522
+ var styles = import_react_native6.StyleSheet.create({
1523
+ centeredView: {
1524
+ flex: 1,
1525
+ justifyContent: "flex-end",
1526
+ alignItems: "center"
1527
+ },
1528
+ overlay: {
1529
+ ...import_react_native6.StyleSheet.absoluteFillObject,
1530
+ // Setting background to transparent as requested
1531
+ backgroundColor: "transparent"
1532
+ },
1533
+ modalView: {
1534
+ width: "100%",
1535
+ backgroundColor: "#1C1F2E",
1536
+ borderTopLeftRadius: 20,
1537
+ borderTopRightRadius: 20,
1538
+ padding: 24,
1539
+ paddingBottom: 40,
1540
+ shadowColor: "#000",
1541
+ shadowOffset: {
1542
+ width: 0,
1543
+ height: -2
1544
+ },
1545
+ shadowOpacity: 0.25,
1546
+ shadowRadius: 4,
1547
+ elevation: 5
1548
+ },
1549
+ modalTitle: {
1550
+ fontSize: 20,
1551
+ fontWeight: "600",
1552
+ color: "white",
1553
+ marginBottom: 20,
1554
+ textAlign: "center"
1555
+ },
1556
+ walletOption: {
1557
+ flexDirection: "row",
1558
+ alignItems: "center",
1559
+ backgroundColor: "#252938",
1560
+ padding: 16,
1561
+ borderRadius: 16,
1562
+ marginBottom: 16,
1563
+ borderWidth: 1,
1564
+ borderColor: "rgba(255,255,255,0.1)"
1565
+ },
1566
+ walletIconContainer: {
1567
+ width: 40,
1568
+ height: 40,
1569
+ borderRadius: 10,
1570
+ backgroundColor: "#ffda34",
1571
+ justifyContent: "center",
1572
+ alignItems: "center",
1573
+ marginRight: 16
1574
+ },
1575
+ walletIconImage: {
1576
+ width: 24,
1577
+ height: 24,
1578
+ resizeMode: "contain"
1579
+ },
1580
+ walletInfo: {
1581
+ flex: 1
1582
+ },
1583
+ walletName: {
1584
+ color: "white",
1585
+ fontSize: 16,
1586
+ fontWeight: "600"
1587
+ },
1588
+ walletTag: {
1589
+ color: "#8B98A5",
1590
+ fontSize: 12
1591
+ },
1592
+ closeButton: {
1593
+ marginTop: 8,
1594
+ alignItems: "center",
1595
+ padding: 12
1596
+ },
1597
+ closeButtonText: {
1598
+ color: "#8B98A5",
1599
+ fontSize: 16
1600
+ }
1601
+ });
485
1602
  // Annotate the CommonJS export names for ESM import in node:
486
1603
  0 && (module.exports = {
487
1604
  ColumnCrypto,
1605
+ ColumnWalletModal,
1606
+ ColumnWalletNative,
488
1607
  ColumnWalletSDK,
489
1608
  ColumnWalletWeb
490
1609
  });