@getpara/web-sdk 2.0.0-alpha.66 → 2.0.0-alpha.68
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/README.md +20 -0
- package/dist/utils/isMobile.js +12 -4
- package/package.json +4 -4
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
https://www.npmjs.com/package/@getpara/web-sdk
|
|
2
|
+
|
|
3
|
+
The `@getpara/web-sdk` is Para's core Web SDK for browser environments. It provides direct access to Para's wallet infrastructure without React-specific components.
|
|
4
|
+
|
|
5
|
+
###Key Features
|
|
6
|
+
|
|
7
|
+
- Authentication: Email, phone, and OAuth login methods
|
|
8
|
+
- Wallet Management: Create and manage EVM, Solana, and Cosmos wallets
|
|
9
|
+
- Transaction Signing: Sign messages and transactions across multiple chains
|
|
10
|
+
- Session Management: Handle user sessions and JWT tokens
|
|
11
|
+
|
|
12
|
+
###Prerequisites
|
|
13
|
+
|
|
14
|
+
To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration.
|
|
15
|
+
|
|
16
|
+
Don't have an API key yet? Request access to the [Developer Portal](https://developer.getpara.com/) to create API keys, manage billing, teams, and more.
|
|
17
|
+
|
|
18
|
+
###Learn more
|
|
19
|
+
|
|
20
|
+
For more information on Para’s Web SDK visit the [Para Docs](https://docs.getpara.com/v2/react/examples#para-web-examples)
|
package/dist/utils/isMobile.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../chunk-YJOFEY2L.js";
|
|
3
3
|
function isAndroid() {
|
|
4
|
-
|
|
4
|
+
if (typeof navigator === "undefined") return false;
|
|
5
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
6
|
+
return /android/i.test(userAgent) || /linux.*mobile/i.test(userAgent) || navigator.platform && navigator.platform.toLowerCase().includes("android");
|
|
5
7
|
}
|
|
6
8
|
function isSmallIOS() {
|
|
7
9
|
return typeof navigator !== "undefined" && /iPhone|iPod/.test(navigator.userAgent);
|
|
@@ -10,9 +12,15 @@ function isLargeIOS() {
|
|
|
10
12
|
return typeof navigator !== "undefined" && (/iPad/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
11
13
|
}
|
|
12
14
|
function isTablet() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)
|
|
15
|
+
if (typeof navigator === "undefined") return false;
|
|
16
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
17
|
+
if (/ipad/.test(userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
if (/android/.test(userAgent)) {
|
|
21
|
+
return /tablet/.test(userAgent) || /android/.test(userAgent) && !/mobile/.test(userAgent) && typeof screen !== "undefined" && screen.width >= 768;
|
|
22
|
+
}
|
|
23
|
+
return /(tablet|kindle|playbook|silk)/.test(userAgent);
|
|
16
24
|
}
|
|
17
25
|
function isIOS() {
|
|
18
26
|
return isSmallIOS() || isLargeIOS();
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/web-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.68",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "2.0.0-alpha.
|
|
6
|
-
"@getpara/user-management-client": "2.0.0-alpha.
|
|
5
|
+
"@getpara/core-sdk": "2.0.0-alpha.68",
|
|
6
|
+
"@getpara/user-management-client": "2.0.0-alpha.68",
|
|
7
7
|
"base64url": "^3.0.1",
|
|
8
8
|
"buffer": "6.0.3",
|
|
9
9
|
"cbor-web": "^9.0.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dist",
|
|
29
29
|
"package.json"
|
|
30
30
|
],
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "98955203281606201609bb4674f5984acb63d3bf",
|
|
32
32
|
"main": "dist/index.js",
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|