@pooflabs/web 0.0.73 → 0.0.74
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/auth/index.d.ts +4 -5
- package/dist/auth/providers/mock-auth-provider.d.ts +3 -3
- package/dist/auth/providers/privy-expo-provider.d.ts +105 -0
- package/dist/{index-BFJJZKXQ.js → index-BVfqY0fJ.js} +2761 -7
- package/dist/index-BVfqY0fJ.js.map +1 -0
- package/dist/index-Bdcc5821.js +2375 -0
- package/dist/index-Bdcc5821.js.map +1 -0
- package/dist/{index-TfCOBCez.esm.js → index-ByH7PSr3.esm.js} +2756 -2
- package/dist/index-ByH7PSr3.esm.js.map +1 -0
- package/dist/index-CVK4iKo4.js +21508 -0
- package/dist/index-CVK4iKo4.js.map +1 -0
- package/dist/index-CrOVJFX9.esm.js +2373 -0
- package/dist/index-CrOVJFX9.esm.js.map +1 -0
- package/dist/index-ORXorrQK.esm.js +18291 -0
- package/dist/index-ORXorrQK.esm.js.map +1 -0
- package/dist/index-QqlKSXH4.js +18332 -0
- package/dist/index-QqlKSXH4.js.map +1 -0
- package/dist/index-tYJgJQDc.esm.js +21430 -0
- package/dist/index-tYJgJQDc.esm.js.map +1 -0
- package/dist/index.browser-B8vmX-tI.js +1471 -0
- package/dist/index.browser-B8vmX-tI.js.map +1 -0
- package/dist/{index.browser-ChrwVq76.esm.js → index.browser-C2K1wE09.esm.js} +2 -3
- package/dist/{index.browser-ChrwVq76.esm.js.map → index.browser-C2K1wE09.esm.js.map} +1 -1
- package/dist/index.browser-D63nJFKg.esm.js +1468 -0
- package/dist/index.browser-D63nJFKg.esm.js.map +1 -0
- package/dist/{index.browser-BuIgwfvv.esm.js → index.browser-DTId19-8.esm.js} +2 -3
- package/dist/{index.browser-BuIgwfvv.esm.js.map → index.browser-DTId19-8.esm.js.map} +1 -1
- package/dist/{index.browser-wsb8xknL.js → index.browser-De6JT7NR.js} +2 -3
- package/dist/{index.browser-wsb8xknL.js.map → index.browser-De6JT7NR.js.map} +1 -1
- package/dist/{index.browser-BO1XxDi0.js → index.browser-GM5fUBfQ.js} +2 -3
- package/dist/{index.browser-BO1XxDi0.js.map → index.browser-GM5fUBfQ.js.map} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +1 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.native-CzfZTw_J.esm.js +13211 -0
- package/dist/index.native-CzfZTw_J.esm.js.map +1 -0
- package/dist/index.native-muw49g7i.js +13290 -0
- package/dist/index.native-muw49g7i.js.map +1 -0
- package/dist/index.native.d.ts +24 -0
- package/dist/index.native.esm.js +6 -0
- package/dist/index.native.esm.js.map +1 -0
- package/dist/index.native.js +59 -0
- package/dist/index.native.js.map +1 -0
- package/dist/phantom-wallet-provider-CeNZvRZY.js +1328 -0
- package/dist/phantom-wallet-provider-CeNZvRZY.js.map +1 -0
- package/dist/phantom-wallet-provider-Di3Z8vOA.esm.js +1307 -0
- package/dist/phantom-wallet-provider-Di3Z8vOA.esm.js.map +1 -0
- package/dist/platform.d.ts +68 -0
- package/dist/privy-wallet-provider-Cfws3b3x.esm.js +3921 -0
- package/dist/privy-wallet-provider-Cfws3b3x.esm.js.map +1 -0
- package/dist/privy-wallet-provider-lbg2fDVg.js +3942 -0
- package/dist/privy-wallet-provider-lbg2fDVg.js.map +1 -0
- package/dist/solana-mobile-wallet-provider-BZMvp9Qy.esm.js +558 -0
- package/dist/solana-mobile-wallet-provider-BZMvp9Qy.esm.js.map +1 -0
- package/dist/solana-mobile-wallet-provider-DDqwl25J.js +579 -0
- package/dist/solana-mobile-wallet-provider-DDqwl25J.js.map +1 -0
- package/package.json +19 -3
- package/dist/index-BFJJZKXQ.js.map +0 -1
- package/dist/index-BV8MOXXy.js +0 -36033
- package/dist/index-BV8MOXXy.js.map +0 -1
- package/dist/index-D0yz-P8G.esm.js +0 -35962
- package/dist/index-D0yz-P8G.esm.js.map +0 -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform abstraction layer for React Native compatibility.
|
|
3
|
+
*
|
|
4
|
+
* This module provides interfaces and default (web) implementations for
|
|
5
|
+
* browser-specific APIs that are unavailable in React Native:
|
|
6
|
+
* - Storage (localStorage / sessionStorage)
|
|
7
|
+
* - TextEncoder
|
|
8
|
+
* - Base-64 (btoa / atob)
|
|
9
|
+
* - SubtleCrypto (crypto.subtle.digest)
|
|
10
|
+
* - DOM helpers (document.*, requestAnimationFrame)
|
|
11
|
+
* - Location (window.location.origin)
|
|
12
|
+
* - UserAgent (navigator.userAgent)
|
|
13
|
+
*
|
|
14
|
+
* React Native consumers call `setPlatform(adapter)` once at startup to
|
|
15
|
+
* supply their own implementations (e.g. AsyncStorage-backed storage,
|
|
16
|
+
* expo-crypto, react-native-get-random-values, etc.).
|
|
17
|
+
*
|
|
18
|
+
* Web consumers don't need to do anything — the defaults use the browser APIs.
|
|
19
|
+
*/
|
|
20
|
+
export interface StorageAdapter {
|
|
21
|
+
getItem(key: string): string | null;
|
|
22
|
+
setItem(key: string, value: string): void;
|
|
23
|
+
removeItem(key: string): void;
|
|
24
|
+
}
|
|
25
|
+
export interface PlatformAdapter {
|
|
26
|
+
/** Persistent storage (replaces localStorage). */
|
|
27
|
+
storage: StorageAdapter;
|
|
28
|
+
/** Session-scoped storage (replaces sessionStorage). */
|
|
29
|
+
sessionStorage: StorageAdapter;
|
|
30
|
+
/** UTF-8 text → bytes. */
|
|
31
|
+
textEncode(input: string): Uint8Array;
|
|
32
|
+
/** Base-64 decode → string of char codes. */
|
|
33
|
+
atob(input: string): string;
|
|
34
|
+
/** String of char codes → base-64. */
|
|
35
|
+
btoa(input: string): string;
|
|
36
|
+
/** SHA-256 hash, returns ArrayBuffer. */
|
|
37
|
+
sha256(data: Uint8Array): Promise<ArrayBuffer>;
|
|
38
|
+
/** navigator.userAgent equivalent (empty string if unavailable). */
|
|
39
|
+
getUserAgent(): string;
|
|
40
|
+
/** window.location.origin equivalent (undefined if unavailable). */
|
|
41
|
+
getLocationOrigin(): string | undefined;
|
|
42
|
+
/** Whether the runtime has a DOM (i.e. we're in a browser, not RN). */
|
|
43
|
+
hasDOM: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Override the platform adapter (call once at app startup in React Native).
|
|
47
|
+
*
|
|
48
|
+
* Must be called **before** `init()`. Can only be called once — subsequent
|
|
49
|
+
* calls throw to prevent accidental mid-session storage swaps.
|
|
50
|
+
*
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { setPlatform } from '@pooflabs/web';
|
|
53
|
+
* import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
54
|
+
*
|
|
55
|
+
* // Create a synchronous wrapper around AsyncStorage for the adapter
|
|
56
|
+
* // (see docs for a full example).
|
|
57
|
+
* setPlatform({ storage: myStorage, ... });
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export declare function setPlatform(adapter: Partial<PlatformAdapter>): void;
|
|
61
|
+
/** Get the current platform adapter. */
|
|
62
|
+
export declare function getPlatform(): PlatformAdapter;
|
|
63
|
+
/**
|
|
64
|
+
* Reset the platform to web defaults and clear the configured flag.
|
|
65
|
+
* **For testing only** — not exported from the public API.
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare function _resetPlatformForTesting(): void;
|