@getpara/server-sdk 3.0.0 → 3.1.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.
|
@@ -256,7 +256,7 @@ function preKeygen(ctx, partnerId, pregenIdentifier, pregenIdentifierType, type,
|
|
|
256
256
|
function signMessage(ctx, share, walletId, userId, message) {
|
|
257
257
|
return __async(this, null, function* () {
|
|
258
258
|
const protocolId = uuid.v4();
|
|
259
|
-
const preSignMessageRes = ctx.client.preSignMessage(userId, walletId, message, null, null, protocolId);
|
|
259
|
+
const preSignMessageRes = ctx.client.preSignMessage(userId, walletId, message, null, null, protocolId, true);
|
|
260
260
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
261
261
|
return signMessageRequest(ctx, userId, walletId, protocolId, message, share);
|
|
262
262
|
}
|
|
@@ -288,7 +288,12 @@ function signMessage(ctx, share, walletId, userId, message) {
|
|
|
288
288
|
function signTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
289
289
|
return __async(this, null, function* () {
|
|
290
290
|
const protocolId = uuid.v4();
|
|
291
|
-
const signTransactionRes = ctx.client.signTransaction(userId, walletId, {
|
|
291
|
+
const signTransactionRes = ctx.client.signTransaction(userId, walletId, {
|
|
292
|
+
transaction: tx,
|
|
293
|
+
chainId,
|
|
294
|
+
protocolId,
|
|
295
|
+
useNewOT: true
|
|
296
|
+
});
|
|
292
297
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
293
298
|
return sendTransactionRequest(ctx, userId, walletId, protocolId, tx, share, chainId);
|
|
294
299
|
}
|
|
@@ -322,7 +327,12 @@ function signTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
|
322
327
|
function sendTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
323
328
|
return __async(this, null, function* () {
|
|
324
329
|
const protocolId = uuid.v4();
|
|
325
|
-
const sendTransactionRes = ctx.client.sendTransaction(userId, walletId, {
|
|
330
|
+
const sendTransactionRes = ctx.client.sendTransaction(userId, walletId, {
|
|
331
|
+
transaction: tx,
|
|
332
|
+
chainId,
|
|
333
|
+
protocolId,
|
|
334
|
+
useNewOT: true
|
|
335
|
+
});
|
|
326
336
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
327
337
|
return sendTransactionRequest(ctx, userId, walletId, protocolId, tx, share, chainId);
|
|
328
338
|
}
|
|
@@ -357,7 +367,7 @@ function refresh(ctx, share, walletId, userId) {
|
|
|
357
367
|
return __async(this, null, function* () {
|
|
358
368
|
const {
|
|
359
369
|
data: { protocolId }
|
|
360
|
-
} = yield ctx.client.refreshKeys(userId, walletId);
|
|
370
|
+
} = yield ctx.client.refreshKeys(userId, walletId, void 0, void 0, void 0, true);
|
|
361
371
|
const serverUrl = (0, import_core_sdk.getBaseMPCNetworkUrl)(ctx.env, !ctx.disableWebSockets);
|
|
362
372
|
const refreshFn = ctx.useDKLS ? global.dklsRefresh : global.refresh;
|
|
363
373
|
try {
|
|
@@ -176,7 +176,7 @@ async function preKeygen(ctx, partnerId, pregenIdentifier, pregenIdentifierType,
|
|
|
176
176
|
}
|
|
177
177
|
async function signMessage(ctx, share, walletId, userId, message) {
|
|
178
178
|
const protocolId = uuid.v4();
|
|
179
|
-
const preSignMessageRes = ctx.client.preSignMessage(userId, walletId, message, null, null, protocolId);
|
|
179
|
+
const preSignMessageRes = ctx.client.preSignMessage(userId, walletId, message, null, null, protocolId, true);
|
|
180
180
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
181
181
|
return signMessageRequest(ctx, userId, walletId, protocolId, message, share);
|
|
182
182
|
}
|
|
@@ -204,7 +204,12 @@ async function signMessage(ctx, share, walletId, userId, message) {
|
|
|
204
204
|
}
|
|
205
205
|
async function signTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
206
206
|
const protocolId = uuid.v4();
|
|
207
|
-
const signTransactionRes = ctx.client.signTransaction(userId, walletId, {
|
|
207
|
+
const signTransactionRes = ctx.client.signTransaction(userId, walletId, {
|
|
208
|
+
transaction: tx,
|
|
209
|
+
chainId,
|
|
210
|
+
protocolId,
|
|
211
|
+
useNewOT: true
|
|
212
|
+
});
|
|
208
213
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
209
214
|
return sendTransactionRequest(ctx, userId, walletId, protocolId, tx, share, chainId);
|
|
210
215
|
}
|
|
@@ -234,7 +239,12 @@ async function signTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
|
234
239
|
}
|
|
235
240
|
async function sendTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
236
241
|
const protocolId = uuid.v4();
|
|
237
|
-
const sendTransactionRes = ctx.client.sendTransaction(userId, walletId, {
|
|
242
|
+
const sendTransactionRes = ctx.client.sendTransaction(userId, walletId, {
|
|
243
|
+
transaction: tx,
|
|
244
|
+
chainId,
|
|
245
|
+
protocolId,
|
|
246
|
+
useNewOT: true
|
|
247
|
+
});
|
|
238
248
|
if (ctx.offloadMPCComputationURL && !ctx.useDKLS) {
|
|
239
249
|
return sendTransactionRequest(ctx, userId, walletId, protocolId, tx, share, chainId);
|
|
240
250
|
}
|
|
@@ -265,7 +275,7 @@ async function sendTransaction(ctx, share, walletId, userId, tx, chainId) {
|
|
|
265
275
|
async function refresh(ctx, share, walletId, userId) {
|
|
266
276
|
const {
|
|
267
277
|
data: { protocolId }
|
|
268
|
-
} = await ctx.client.refreshKeys(userId, walletId);
|
|
278
|
+
} = await ctx.client.refreshKeys(userId, walletId, void 0, void 0, void 0, true);
|
|
269
279
|
const serverUrl = getBaseMPCNetworkUrl(ctx.env, !ctx.disableWebSockets);
|
|
270
280
|
const refreshFn = ctx.useDKLS ? global.dklsRefresh : global.refresh;
|
|
271
281
|
try {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/server-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/core-sdk": "3.
|
|
6
|
-
"@getpara/user-management-client": "3.
|
|
7
|
-
"@getpara/viem-v2-integration": "3.
|
|
5
|
+
"@getpara/core-sdk": "3.1.0",
|
|
6
|
+
"@getpara/user-management-client": "3.1.0",
|
|
7
|
+
"@getpara/viem-v2-integration": "3.1.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": "
|
|
19
|
+
"gitHead": "e73f17cd7960fdfe62ff68a972b3461e47b21eb0",
|
|
20
20
|
"main": "dist/cjs/index.js",
|
|
21
21
|
"module": "dist/esm/index.js",
|
|
22
22
|
"scripts": {
|