@getpara/server-sdk 3.3.0 → 3.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.
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
  var __async = (__this, __arguments, generator) => {
19
29
  return new Promise((resolve, reject) => {
@@ -40,11 +50,15 @@ __export(ServerUtils_exports, {
40
50
  ServerUtils: () => ServerUtils
41
51
  });
42
52
  module.exports = __toCommonJS(ServerUtils_exports);
53
+ var import_node_http = __toESM(require("node:http"));
54
+ var import_node_https = __toESM(require("node:https"));
43
55
  var import_ServerLocalStorage = require("./ServerLocalStorage.js");
44
56
  var import_ServerSessionStorage = require("./ServerSessionStorage.js");
45
57
  var import_keygen = require("./wallet/keygen.js");
46
58
  var import_signing = require("./wallet/signing.js");
47
59
  var import_privateKey = require("./wallet/privateKey.js");
60
+ const keepAliveHttpAgent = new import_node_http.default.Agent({ keepAlive: true });
61
+ const keepAliveHttpsAgent = new import_node_https.default.Agent({ keepAlive: true });
48
62
  class ServerUtils {
49
63
  constructor() {
50
64
  this.sdkType = "SERVER";
@@ -54,6 +68,9 @@ class ServerUtils {
54
68
  this.isSyncStorage = true;
55
69
  this.disableProviderModal = true;
56
70
  }
71
+ getRequestAgents() {
72
+ return { httpAgent: keepAliveHttpAgent, httpsAgent: keepAliveHttpsAgent };
73
+ }
57
74
  getPrivateKey(ctx, userId, walletId, share, sessionCookie) {
58
75
  return (0, import_privateKey.getPrivateKey)(ctx, userId, walletId, share, sessionCookie);
59
76
  }
@@ -1,9 +1,13 @@
1
1
  import "./chunk-FTA5RKYX.js";
2
+ import http from "node:http";
3
+ import https from "node:https";
2
4
  import { ServerLocalStorage } from "./ServerLocalStorage.js";
3
5
  import { ServerSessionStorage } from "./ServerSessionStorage.js";
4
6
  import { keygen, preKeygen, ed25519Keygen, ed25519PreKeygen, initializeWorker } from "./wallet/keygen.js";
5
7
  import { signMessage, sendTransaction, signTransaction, ed25519Sign } from "./wallet/signing.js";
6
8
  import { getPrivateKey, getED25519PrivateKey } from "./wallet/privateKey.js";
9
+ const keepAliveHttpAgent = new http.Agent({ keepAlive: true });
10
+ const keepAliveHttpsAgent = new https.Agent({ keepAlive: true });
7
11
  class ServerUtils {
8
12
  constructor() {
9
13
  this.sdkType = "SERVER";
@@ -13,6 +17,9 @@ class ServerUtils {
13
17
  this.isSyncStorage = true;
14
18
  this.disableProviderModal = true;
15
19
  }
20
+ getRequestAgents() {
21
+ return { httpAgent: keepAliveHttpAgent, httpsAgent: keepAliveHttpsAgent };
22
+ }
16
23
  getPrivateKey(ctx, userId, walletId, share, sessionCookie) {
17
24
  return getPrivateKey(ctx, userId, walletId, share, sessionCookie);
18
25
  }
@@ -1,9 +1,15 @@
1
+ import http from 'node:http';
2
+ import https from 'node:https';
1
3
  import type { Ctx, SignatureRes, PlatformUtils, TPregenIdentifierType, TWalletType } from '@getpara/core-sdk';
2
4
  import { BackupKitEmailProps, SDKType } from '@getpara/user-management-client';
3
5
  import { ServerLocalStorage } from './ServerLocalStorage.js';
4
6
  import { ServerSessionStorage } from './ServerSessionStorage.js';
5
7
  export declare class ServerUtils implements PlatformUtils {
6
8
  sdkType: SDKType;
9
+ getRequestAgents(): {
10
+ httpAgent: http.Agent;
11
+ httpsAgent: https.Agent;
12
+ };
7
13
  getPrivateKey(ctx: Ctx, userId: string, walletId: string, share: string, sessionCookie: string): Promise<string>;
8
14
  getED25519PrivateKey(ctx: Ctx, userId: string, walletId: string, share: string, sessionCookie: string): Promise<string>;
9
15
  keygen(ctx: Ctx, userId: string, type: Exclude<TWalletType, 'SOLANA'>, secretKey: string | null, sessionCookie: string, emailProps?: BackupKitEmailProps): Promise<{
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@getpara/server-sdk",
3
- "version": "3.3.0",
3
+ "version": "3.5.0",
4
4
  "dependencies": {
5
- "@getpara/core-sdk": "3.3.0",
6
- "@getpara/user-management-client": "3.3.0",
7
- "@getpara/viem-v2-integration": "3.3.0",
5
+ "@getpara/core-sdk": "3.5.0",
6
+ "@getpara/user-management-client": "3.5.0",
7
+ "@getpara/viem-v2-integration": "3.5.0",
8
8
  "uuid": "^11.1.0",
9
9
  "ws": "^8.14.2"
10
10
  },
@@ -16,7 +16,7 @@
16
16
  "dist",
17
17
  "package.json"
18
18
  ],
19
- "gitHead": "d9b54921d4187e2dd25f314b62ed99988e9b5b1c",
19
+ "gitHead": "2e70485f8f206ff50f58b339ebf0922fd259858f",
20
20
  "main": "dist/cjs/index.js",
21
21
  "module": "dist/esm/index.js",
22
22
  "scripts": {