@getpara/server-sdk 1.4.4 → 1.5.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/index.js +19 -3
- package/dist/cjs/index.js.br +0 -0
- package/dist/cjs/index.js.gz +0 -0
- package/dist/esm/index.js +19 -3
- package/dist/esm/index.js.br +0 -0
- package/dist/esm/index.js.gz +0 -0
- package/dist/types/ParaServer.d.ts +16 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -434,7 +434,7 @@ var ServerUtils = class {
|
|
|
434
434
|
return keygen(ctx, userId, type, secretKey, true, sessionCookie, emailProps);
|
|
435
435
|
}
|
|
436
436
|
refresh(_ctx, _sessionCookie, _userId, _walletId, _share, _oldPartnerId, _newPartnerId) {
|
|
437
|
-
throw new Error("not implemented");
|
|
437
|
+
throw new Error("Refresh function is not implemented in the ServerUtils class.");
|
|
438
438
|
}
|
|
439
439
|
preKeygen(ctx, partnerId, pregenIdentifier, pregenIdentifierType, type, secretKey, sessionCookie) {
|
|
440
440
|
return preKeygen(ctx, pregenIdentifier, pregenIdentifierType, type, secretKey, false, partnerId, sessionCookie);
|
|
@@ -449,7 +449,7 @@ var ServerUtils = class {
|
|
|
449
449
|
return sendTransaction(ctx, userId, walletId, share, tx, chainId, sessionCookie, isDKLS);
|
|
450
450
|
}
|
|
451
451
|
signHash(_address, _hash) {
|
|
452
|
-
throw new Error("not implemented");
|
|
452
|
+
throw new Error("SignHash is not implemented in the ServerUtils class.");
|
|
453
453
|
}
|
|
454
454
|
ed25519Keygen(ctx, userId, sessionCookie, emailProps) {
|
|
455
455
|
return ed25519Keygen(ctx, userId, sessionCookie, emailProps);
|
|
@@ -461,7 +461,7 @@ var ServerUtils = class {
|
|
|
461
461
|
return ed25519Sign(ctx, userId, walletId, share, base64Bytes, sessionCookie);
|
|
462
462
|
}
|
|
463
463
|
openPopup(_popupUrl) {
|
|
464
|
-
throw new Error("not implemented");
|
|
464
|
+
throw new Error("OpenPopup is not implemented in the ServerUtils class.");
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
467
|
|
|
@@ -479,6 +479,22 @@ var Para = class extends import_core_sdk3.default {
|
|
|
479
479
|
getPlatformUtils() {
|
|
480
480
|
return new ServerUtils();
|
|
481
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Claims a pregenerated wallet.
|
|
484
|
+
*
|
|
485
|
+
* NOTE: This function is only available on the client side.
|
|
486
|
+
* When called from the server SDK, it throws an error.
|
|
487
|
+
*
|
|
488
|
+
* @param {Object} opts the options object.
|
|
489
|
+
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
490
|
+
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
491
|
+
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
492
|
+
*/
|
|
493
|
+
async claimPregenWallets({} = {}) {
|
|
494
|
+
throw new Error(
|
|
495
|
+
"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."
|
|
496
|
+
);
|
|
497
|
+
}
|
|
482
498
|
};
|
|
483
499
|
|
|
484
500
|
// src/index.ts
|
package/dist/cjs/index.js.br
CHANGED
|
Binary file
|
package/dist/cjs/index.js.gz
CHANGED
|
Binary file
|
package/dist/esm/index.js
CHANGED
|
@@ -399,7 +399,7 @@ var ServerUtils = class {
|
|
|
399
399
|
return keygen(ctx, userId, type, secretKey, true, sessionCookie, emailProps);
|
|
400
400
|
}
|
|
401
401
|
refresh(_ctx, _sessionCookie, _userId, _walletId, _share, _oldPartnerId, _newPartnerId) {
|
|
402
|
-
throw new Error("not implemented");
|
|
402
|
+
throw new Error("Refresh function is not implemented in the ServerUtils class.");
|
|
403
403
|
}
|
|
404
404
|
preKeygen(ctx, partnerId, pregenIdentifier, pregenIdentifierType, type, secretKey, sessionCookie) {
|
|
405
405
|
return preKeygen(ctx, pregenIdentifier, pregenIdentifierType, type, secretKey, false, partnerId, sessionCookie);
|
|
@@ -414,7 +414,7 @@ var ServerUtils = class {
|
|
|
414
414
|
return sendTransaction(ctx, userId, walletId, share, tx, chainId, sessionCookie, isDKLS);
|
|
415
415
|
}
|
|
416
416
|
signHash(_address, _hash) {
|
|
417
|
-
throw new Error("not implemented");
|
|
417
|
+
throw new Error("SignHash is not implemented in the ServerUtils class.");
|
|
418
418
|
}
|
|
419
419
|
ed25519Keygen(ctx, userId, sessionCookie, emailProps) {
|
|
420
420
|
return ed25519Keygen(ctx, userId, sessionCookie, emailProps);
|
|
@@ -426,7 +426,7 @@ var ServerUtils = class {
|
|
|
426
426
|
return ed25519Sign(ctx, userId, walletId, share, base64Bytes, sessionCookie);
|
|
427
427
|
}
|
|
428
428
|
openPopup(_popupUrl) {
|
|
429
|
-
throw new Error("not implemented");
|
|
429
|
+
throw new Error("OpenPopup is not implemented in the ServerUtils class.");
|
|
430
430
|
}
|
|
431
431
|
};
|
|
432
432
|
|
|
@@ -444,6 +444,22 @@ var Para = class extends ParaCore {
|
|
|
444
444
|
getPlatformUtils() {
|
|
445
445
|
return new ServerUtils();
|
|
446
446
|
}
|
|
447
|
+
/**
|
|
448
|
+
* Claims a pregenerated wallet.
|
|
449
|
+
*
|
|
450
|
+
* NOTE: This function is only available on the client side.
|
|
451
|
+
* When called from the server SDK, it throws an error.
|
|
452
|
+
*
|
|
453
|
+
* @param {Object} opts the options object.
|
|
454
|
+
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
455
|
+
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
456
|
+
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
457
|
+
*/
|
|
458
|
+
async claimPregenWallets({} = {}) {
|
|
459
|
+
throw new Error(
|
|
460
|
+
"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."
|
|
461
|
+
);
|
|
462
|
+
}
|
|
447
463
|
};
|
|
448
464
|
|
|
449
465
|
// src/index.ts
|
package/dist/esm/index.js.br
CHANGED
|
Binary file
|
package/dist/esm/index.js.gz
CHANGED
|
Binary file
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import ParaCore, { PlatformUtils, ConstructorOpts, Environment } from '@getpara/core-sdk';
|
|
1
|
+
import ParaCore, { PlatformUtils, ConstructorOpts, Environment, TPregenIdentifierType } from '@getpara/core-sdk';
|
|
2
2
|
export declare class Para extends ParaCore {
|
|
3
3
|
constructor(env: Environment, apiKey?: string, opts?: ConstructorOpts);
|
|
4
4
|
protected getPlatformUtils(): PlatformUtils;
|
|
5
|
+
/**
|
|
6
|
+
* Claims a pregenerated wallet.
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This function is only available on the client side.
|
|
9
|
+
* When called from the server SDK, it throws an error.
|
|
10
|
+
*
|
|
11
|
+
* @param {Object} opts the options object.
|
|
12
|
+
* @param {string} opts.pregenIdentifier - the identifier of the user claiming the wallet.
|
|
13
|
+
* @param {TPregenIdentifierType} opts.pregenIdentifierType - the type of the identifier.
|
|
14
|
+
* @returns {Promise<string | undefined>} A promise that rejects with an error.
|
|
15
|
+
*/
|
|
16
|
+
claimPregenWallets({}?: {
|
|
17
|
+
pregenIdentifier?: string;
|
|
18
|
+
pregenIdentifierType?: TPregenIdentifierType;
|
|
19
|
+
}): Promise<string | undefined>;
|
|
5
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/server-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"wasm_exec.js"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@getpara/core-sdk": "1.
|
|
13
|
-
"@getpara/user-management-client": "1.
|
|
12
|
+
"@getpara/core-sdk": "1.5.0",
|
|
13
|
+
"@getpara/user-management-client": "1.5.0",
|
|
14
14
|
"@sentry/node": "^9.1.0",
|
|
15
15
|
"uuid": "^9.0.1",
|
|
16
16
|
"ws": "^8.14.2"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"dist",
|
|
32
32
|
"package.json"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "0e3c1401b4f1da60b288cdde7695077c9bcbc48f"
|
|
35
35
|
}
|