@getpara/user-management-client 2.24.0 → 2.26.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/client.js +6 -2
- package/dist/esm/client.js +6 -2
- package/dist/types/client.d.ts +13 -1
- package/package.json +2 -2
package/dist/cjs/client.js
CHANGED
|
@@ -468,6 +468,10 @@ class Client {
|
|
|
468
468
|
});
|
|
469
469
|
return res.data;
|
|
470
470
|
});
|
|
471
|
+
this.requestFaucet = (_0) => __async(this, [_0], function* ({ walletId, chain }) {
|
|
472
|
+
const res = yield this.baseRequest.post("/faucet", { walletId, chain });
|
|
473
|
+
return res.data;
|
|
474
|
+
});
|
|
471
475
|
this.issueJwt = (..._0) => __async(this, [..._0], function* ({ keyIndex = 0 } = {}) {
|
|
472
476
|
const res = yield this.baseRequest.post(`/auth/jwt`, { keyIndex });
|
|
473
477
|
return res.data;
|
|
@@ -555,8 +559,8 @@ class Client {
|
|
|
555
559
|
});
|
|
556
560
|
return res.data;
|
|
557
561
|
});
|
|
558
|
-
this.getPregenShares = (encryptedPayload) => __async(this, null, function* () {
|
|
559
|
-
const res = yield this.baseRequest.post(`/enclave/pregen-shares`, { encryptedPayload });
|
|
562
|
+
this.getPregenShares = (encryptedPayload, walletIds) => __async(this, null, function* () {
|
|
563
|
+
const res = yield this.baseRequest.post(`/enclave/pregen-shares`, { encryptedPayload, walletIds });
|
|
560
564
|
return res.data;
|
|
561
565
|
});
|
|
562
566
|
this.getUserPreferences = (userId) => __async(this, null, function* () {
|
package/dist/esm/client.js
CHANGED
|
@@ -396,6 +396,10 @@ class Client {
|
|
|
396
396
|
});
|
|
397
397
|
return res.data;
|
|
398
398
|
});
|
|
399
|
+
this.requestFaucet = (_0) => __async(this, [_0], function* ({ walletId, chain }) {
|
|
400
|
+
const res = yield this.baseRequest.post("/faucet", { walletId, chain });
|
|
401
|
+
return res.data;
|
|
402
|
+
});
|
|
399
403
|
this.issueJwt = (..._0) => __async(this, [..._0], function* ({ keyIndex = 0 } = {}) {
|
|
400
404
|
const res = yield this.baseRequest.post(`/auth/jwt`, { keyIndex });
|
|
401
405
|
return res.data;
|
|
@@ -483,8 +487,8 @@ class Client {
|
|
|
483
487
|
});
|
|
484
488
|
return res.data;
|
|
485
489
|
});
|
|
486
|
-
this.getPregenShares = (encryptedPayload) => __async(this, null, function* () {
|
|
487
|
-
const res = yield this.baseRequest.post(`/enclave/pregen-shares`, { encryptedPayload });
|
|
490
|
+
this.getPregenShares = (encryptedPayload, walletIds) => __async(this, null, function* () {
|
|
491
|
+
const res = yield this.baseRequest.post(`/enclave/pregen-shares`, { encryptedPayload, walletIds });
|
|
488
492
|
return res.data;
|
|
489
493
|
});
|
|
490
494
|
this.getUserPreferences = (userId) => __async(this, null, function* () {
|
package/dist/types/client.d.ts
CHANGED
|
@@ -89,6 +89,17 @@ interface createWalletRes {
|
|
|
89
89
|
interface GetWalletBalanceRes {
|
|
90
90
|
balance: string;
|
|
91
91
|
}
|
|
92
|
+
interface RequestFaucetBody {
|
|
93
|
+
walletId: string;
|
|
94
|
+
chain?: string;
|
|
95
|
+
}
|
|
96
|
+
interface RequestFaucetRes {
|
|
97
|
+
transactionHash: string;
|
|
98
|
+
amount: string;
|
|
99
|
+
chain: string;
|
|
100
|
+
walletId: string;
|
|
101
|
+
address: string;
|
|
102
|
+
}
|
|
92
103
|
interface createPregenWalletBody {
|
|
93
104
|
pregenIdentifier: string;
|
|
94
105
|
pregenIdentifierType: TPregenIdentifierType;
|
|
@@ -437,6 +448,7 @@ declare class Client {
|
|
|
437
448
|
walletId: string;
|
|
438
449
|
rpcUrl?: string;
|
|
439
450
|
}) => Promise<GetWalletBalanceRes>;
|
|
451
|
+
requestFaucet: ({ walletId, chain }: RequestFaucetBody) => Promise<RequestFaucetRes>;
|
|
440
452
|
issueJwt: ({ keyIndex }?: IssueJwtParams) => Promise<IssueJwtResponse>;
|
|
441
453
|
getProfileBalance: ({ config, wallets, refetch, }: GetProfileBalanceParams) => Promise<{
|
|
442
454
|
balance: ProfileBalance;
|
|
@@ -498,7 +510,7 @@ declare class Client {
|
|
|
498
510
|
deleteEnclaveShares: (encryptedPayload: string) => Promise<{
|
|
499
511
|
payload: any;
|
|
500
512
|
}>;
|
|
501
|
-
getPregenShares: (encryptedPayload: string) => Promise<{
|
|
513
|
+
getPregenShares: (encryptedPayload: string, walletIds?: string[]) => Promise<{
|
|
502
514
|
payload: string;
|
|
503
515
|
}>;
|
|
504
516
|
getUserPreferences: (userId: string) => Promise<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/user-management-client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@getpara/shared": "^1.14.0",
|
|
6
6
|
"axios": "^1.8.4",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist",
|
|
22
22
|
"package.json"
|
|
23
23
|
],
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "02eb43f55b1c5f8bed6685940b6344551610f42a",
|
|
25
25
|
"main": "dist/cjs/index.js",
|
|
26
26
|
"module": "dist/esm/index.js",
|
|
27
27
|
"scripts": {
|