@getpara/server-sdk 2.11.0 → 2.13.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.
- package/dist/cjs/ParaServer.js +18 -20
- package/dist/cjs/ServerUtils.js +12 -0
- package/dist/esm/ParaServer.js +18 -18
- package/dist/esm/ServerUtils.js +12 -0
- package/dist/types/ParaServer.d.ts +3 -3
- package/dist/types/ServerUtils.d.ts +4 -0
- package/package.json +4 -4
package/dist/cjs/ParaServer.js
CHANGED
|
@@ -55,10 +55,26 @@ var import_ServerUtils = require("./ServerUtils.js");
|
|
|
55
55
|
class Para extends import_core_sdk.default {
|
|
56
56
|
constructor(envOrApiKey, apiKeyOrOpts, opts) {
|
|
57
57
|
super(envOrApiKey, apiKeyOrOpts, opts);
|
|
58
|
+
/**
|
|
59
|
+
* Claims a pregenerated wallet.
|
|
60
|
+
*
|
|
61
|
+
* NOTE: This function is only available on the client side.
|
|
62
|
+
* When called from the server SDK, it throws an error.
|
|
63
|
+
*
|
|
64
|
+
* @param {Object} opts the options object.
|
|
65
|
+
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
66
|
+
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
67
|
+
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
68
|
+
*/
|
|
69
|
+
this.claimPregenWallets = (_) => __async(this, null, function* () {
|
|
70
|
+
throw new Error(
|
|
71
|
+
"claimPregenWallets is not available in the server SDK. This function is only supported on the client side. Please ensure you are using the client SDK to call this method."
|
|
72
|
+
);
|
|
73
|
+
});
|
|
58
74
|
}
|
|
59
|
-
|
|
75
|
+
setup() {
|
|
60
76
|
return __async(this, null, function* () {
|
|
61
|
-
this.
|
|
77
|
+
this.isSetup = true;
|
|
62
78
|
});
|
|
63
79
|
}
|
|
64
80
|
getPlatformUtils() {
|
|
@@ -69,24 +85,6 @@ class Para extends import_core_sdk.default {
|
|
|
69
85
|
return false;
|
|
70
86
|
});
|
|
71
87
|
}
|
|
72
|
-
/**
|
|
73
|
-
* Claims a pregenerated wallet.
|
|
74
|
-
*
|
|
75
|
-
* NOTE: This function is only available on the client side.
|
|
76
|
-
* When called from the server SDK, it throws an error.
|
|
77
|
-
*
|
|
78
|
-
* @param {Object} opts the options object.
|
|
79
|
-
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
80
|
-
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
81
|
-
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
82
|
-
*/
|
|
83
|
-
claimPregenWallets(_) {
|
|
84
|
-
return __async(this, null, function* () {
|
|
85
|
-
throw new Error(
|
|
86
|
-
"claimPregenWallets is not available in the server SDK. This function is only supported on the client side. Please ensure you are using the client SDK to call this method."
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
88
|
}
|
|
91
89
|
// Annotate the CommonJS export names for ESM import in node:
|
|
92
90
|
0 && (module.exports = {
|
package/dist/cjs/ServerUtils.js
CHANGED
|
@@ -97,6 +97,18 @@ class ServerUtils {
|
|
|
97
97
|
return (0, import_keygen.initializeWorker)(ctx);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
+
addEventListener() {
|
|
101
|
+
throw new Error("AddEventListener is not implemented in the ServerUtils class.");
|
|
102
|
+
}
|
|
103
|
+
removeEventListener() {
|
|
104
|
+
throw new Error("RemoveEventListener is not implemented in the ServerUtils class.");
|
|
105
|
+
}
|
|
106
|
+
postMessage() {
|
|
107
|
+
throw new Error("PostMessage is not implemented in the ServerUtils class.");
|
|
108
|
+
}
|
|
109
|
+
emitEvent() {
|
|
110
|
+
throw new Error("EmitEvent is not implemented in the ServerUtils class.");
|
|
111
|
+
}
|
|
100
112
|
}
|
|
101
113
|
// Annotate the CommonJS export names for ESM import in node:
|
|
102
114
|
0 && (module.exports = {
|
package/dist/esm/ParaServer.js
CHANGED
|
@@ -4,9 +4,25 @@ import { ServerUtils } from "./ServerUtils.js";
|
|
|
4
4
|
class Para extends ParaCore {
|
|
5
5
|
constructor(envOrApiKey, apiKeyOrOpts, opts) {
|
|
6
6
|
super(envOrApiKey, apiKeyOrOpts, opts);
|
|
7
|
+
/**
|
|
8
|
+
* Claims a pregenerated wallet.
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This function is only available on the client side.
|
|
11
|
+
* When called from the server SDK, it throws an error.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} opts the options object.
|
|
14
|
+
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
15
|
+
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
16
|
+
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
17
|
+
*/
|
|
18
|
+
this.claimPregenWallets = async (_) => {
|
|
19
|
+
throw new Error(
|
|
20
|
+
"claimPregenWallets is not available in the server SDK. This function is only supported on the client side. Please ensure you are using the client SDK to call this method."
|
|
21
|
+
);
|
|
22
|
+
};
|
|
7
23
|
}
|
|
8
|
-
async
|
|
9
|
-
this.
|
|
24
|
+
async setup() {
|
|
25
|
+
this.isSetup = true;
|
|
10
26
|
}
|
|
11
27
|
getPlatformUtils() {
|
|
12
28
|
return new ServerUtils();
|
|
@@ -14,22 +30,6 @@ class Para extends ParaCore {
|
|
|
14
30
|
async isPasskeySupported() {
|
|
15
31
|
return false;
|
|
16
32
|
}
|
|
17
|
-
/**
|
|
18
|
-
* Claims a pregenerated wallet.
|
|
19
|
-
*
|
|
20
|
-
* NOTE: This function is only available on the client side.
|
|
21
|
-
* When called from the server SDK, it throws an error.
|
|
22
|
-
*
|
|
23
|
-
* @param {Object} opts the options object.
|
|
24
|
-
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
25
|
-
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
26
|
-
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
27
|
-
*/
|
|
28
|
-
async claimPregenWallets(_) {
|
|
29
|
-
throw new Error(
|
|
30
|
-
"claimPregenWallets is not available in the server SDK. This function is only supported on the client side. Please ensure you are using the client SDK to call this method."
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
33
|
}
|
|
34
34
|
export {
|
|
35
35
|
Para
|
package/dist/esm/ServerUtils.js
CHANGED
|
@@ -52,6 +52,18 @@ class ServerUtils {
|
|
|
52
52
|
async initializeWorker(ctx) {
|
|
53
53
|
return initializeWorker(ctx);
|
|
54
54
|
}
|
|
55
|
+
addEventListener() {
|
|
56
|
+
throw new Error("AddEventListener is not implemented in the ServerUtils class.");
|
|
57
|
+
}
|
|
58
|
+
removeEventListener() {
|
|
59
|
+
throw new Error("RemoveEventListener is not implemented in the ServerUtils class.");
|
|
60
|
+
}
|
|
61
|
+
postMessage() {
|
|
62
|
+
throw new Error("PostMessage is not implemented in the ServerUtils class.");
|
|
63
|
+
}
|
|
64
|
+
emitEvent() {
|
|
65
|
+
throw new Error("EmitEvent is not implemented in the ServerUtils class.");
|
|
66
|
+
}
|
|
55
67
|
}
|
|
56
68
|
export {
|
|
57
69
|
ServerUtils
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ParaCore, { PlatformUtils, ConstructorOpts, Environment,
|
|
1
|
+
import ParaCore, { PlatformUtils, ConstructorOpts, Environment, ClaimPregenWalletsMethod } from '@getpara/core-sdk';
|
|
2
2
|
export declare class Para extends ParaCore {
|
|
3
3
|
constructor(env: Environment | undefined, apiKey: string, opts?: ConstructorOpts);
|
|
4
4
|
constructor(apiKey: string, opts?: ConstructorOpts);
|
|
5
|
-
|
|
5
|
+
setup(): Promise<void>;
|
|
6
6
|
protected getPlatformUtils(): PlatformUtils;
|
|
7
7
|
isPasskeySupported(): Promise<boolean>;
|
|
8
8
|
/**
|
|
@@ -16,5 +16,5 @@ export declare class Para extends ParaCore {
|
|
|
16
16
|
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
17
17
|
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
18
18
|
*/
|
|
19
|
-
claimPregenWallets
|
|
19
|
+
claimPregenWallets: ClaimPregenWalletsMethod;
|
|
20
20
|
}
|
|
@@ -41,4 +41,8 @@ export declare class ServerUtils implements PlatformUtils {
|
|
|
41
41
|
disableProviderModal: boolean;
|
|
42
42
|
openPopup(_popupUrl: string): Promise<Window>;
|
|
43
43
|
initializeWorker(ctx: Ctx): Promise<void>;
|
|
44
|
+
addEventListener(): void;
|
|
45
|
+
removeEventListener(): void;
|
|
46
|
+
postMessage(): void;
|
|
47
|
+
emitEvent(): void;
|
|
44
48
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/server-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "2.
|
|
6
|
-
"@getpara/user-management-client": "2.
|
|
5
|
+
"@getpara/core-sdk": "2.13.0",
|
|
6
|
+
"@getpara/user-management-client": "2.13.0",
|
|
7
7
|
"uuid": "^11.1.0",
|
|
8
8
|
"ws": "^8.14.2"
|
|
9
9
|
},
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist",
|
|
16
16
|
"package.json"
|
|
17
17
|
],
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "75ac5d1ebe87366c23bb4e485481deb1b593e299",
|
|
19
19
|
"main": "dist/cjs/index.js",
|
|
20
20
|
"module": "dist/esm/index.js",
|
|
21
21
|
"scripts": {
|