@getpara/user-management-client 2.0.0-alpha.71 → 2.0.0-alpha.73
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 +37 -1
- package/dist/esm/client.js +37 -1
- package/dist/types/client.d.ts +23 -1
- package/package.json +3 -3
package/dist/cjs/client.js
CHANGED
|
@@ -469,7 +469,7 @@ class Client {
|
|
|
469
469
|
refetch
|
|
470
470
|
}) {
|
|
471
471
|
const res = yield this.baseRequest.post(`/assets/balances`, {
|
|
472
|
-
config,
|
|
472
|
+
config: __spreadProps(__spreadValues({}, config != null ? config : { displayType: "AGGREGATED" }), { isComprehensive: true }),
|
|
473
473
|
wallets,
|
|
474
474
|
refetch
|
|
475
475
|
});
|
|
@@ -525,6 +525,12 @@ class Client {
|
|
|
525
525
|
const res = yield this.baseRequest.post(`/enclave/jwt/refresh`, { encryptedPayload });
|
|
526
526
|
return res.data;
|
|
527
527
|
});
|
|
528
|
+
this.deleteEnclaveShares = (encryptedPayload) => __async(this, null, function* () {
|
|
529
|
+
const res = yield this.baseRequest.delete(`/enclave/key-shares`, {
|
|
530
|
+
data: { encryptedPayload }
|
|
531
|
+
});
|
|
532
|
+
return res.data;
|
|
533
|
+
});
|
|
528
534
|
this.getUserPreferences = (userId) => __async(this, null, function* () {
|
|
529
535
|
const res = yield this.baseRequest.get(`/users/${userId}/preferences`);
|
|
530
536
|
return res.data;
|
|
@@ -533,6 +539,36 @@ class Client {
|
|
|
533
539
|
const res = yield this.baseRequest.patch(`/users/${userId}/preferences`, { preferences });
|
|
534
540
|
return res.data;
|
|
535
541
|
});
|
|
542
|
+
this.estimateSendTransaction = (_0) => __async(this, [_0], function* ({
|
|
543
|
+
userId,
|
|
544
|
+
walletId,
|
|
545
|
+
opts
|
|
546
|
+
}) {
|
|
547
|
+
const res = yield this.baseRequest.post(
|
|
548
|
+
`/users/${userId}/wallets/${walletId}/transactions/estimate`,
|
|
549
|
+
opts
|
|
550
|
+
);
|
|
551
|
+
return res.data;
|
|
552
|
+
});
|
|
553
|
+
this.broadcastSendTransaction = (_0) => __async(this, [_0], function* ({
|
|
554
|
+
userId,
|
|
555
|
+
walletId,
|
|
556
|
+
opts
|
|
557
|
+
}) {
|
|
558
|
+
const res = yield this.baseRequest.post(
|
|
559
|
+
`/users/${userId}/wallets/${walletId}/transactions/broadcast`,
|
|
560
|
+
opts
|
|
561
|
+
);
|
|
562
|
+
return res.data;
|
|
563
|
+
});
|
|
564
|
+
this.trackExternalWalletConnections = (_0) => __async(this, [_0], function* ({
|
|
565
|
+
wallets
|
|
566
|
+
}) {
|
|
567
|
+
const res = yield this.baseRequest.post("/users/external-wallets/track-connections", {
|
|
568
|
+
wallets
|
|
569
|
+
});
|
|
570
|
+
return { success: res.data.success };
|
|
571
|
+
});
|
|
536
572
|
const headers = __spreadValues(__spreadValues({}, apiKey && { [import_consts.API_KEY_HEADER_NAME]: apiKey }), partnerId && { [import_consts.PARTNER_ID_HEADER_NAME]: partnerId });
|
|
537
573
|
const axiosConfig = {
|
|
538
574
|
baseURL: userManagementHost,
|
package/dist/esm/client.js
CHANGED
|
@@ -392,7 +392,7 @@ class Client {
|
|
|
392
392
|
refetch
|
|
393
393
|
}) {
|
|
394
394
|
const res = yield this.baseRequest.post(`/assets/balances`, {
|
|
395
|
-
config,
|
|
395
|
+
config: __spreadProps(__spreadValues({}, config != null ? config : { displayType: "AGGREGATED" }), { isComprehensive: true }),
|
|
396
396
|
wallets,
|
|
397
397
|
refetch
|
|
398
398
|
});
|
|
@@ -448,6 +448,12 @@ class Client {
|
|
|
448
448
|
const res = yield this.baseRequest.post(`/enclave/jwt/refresh`, { encryptedPayload });
|
|
449
449
|
return res.data;
|
|
450
450
|
});
|
|
451
|
+
this.deleteEnclaveShares = (encryptedPayload) => __async(this, null, function* () {
|
|
452
|
+
const res = yield this.baseRequest.delete(`/enclave/key-shares`, {
|
|
453
|
+
data: { encryptedPayload }
|
|
454
|
+
});
|
|
455
|
+
return res.data;
|
|
456
|
+
});
|
|
451
457
|
this.getUserPreferences = (userId) => __async(this, null, function* () {
|
|
452
458
|
const res = yield this.baseRequest.get(`/users/${userId}/preferences`);
|
|
453
459
|
return res.data;
|
|
@@ -456,6 +462,36 @@ class Client {
|
|
|
456
462
|
const res = yield this.baseRequest.patch(`/users/${userId}/preferences`, { preferences });
|
|
457
463
|
return res.data;
|
|
458
464
|
});
|
|
465
|
+
this.estimateSendTransaction = (_0) => __async(this, [_0], function* ({
|
|
466
|
+
userId,
|
|
467
|
+
walletId,
|
|
468
|
+
opts
|
|
469
|
+
}) {
|
|
470
|
+
const res = yield this.baseRequest.post(
|
|
471
|
+
`/users/${userId}/wallets/${walletId}/transactions/estimate`,
|
|
472
|
+
opts
|
|
473
|
+
);
|
|
474
|
+
return res.data;
|
|
475
|
+
});
|
|
476
|
+
this.broadcastSendTransaction = (_0) => __async(this, [_0], function* ({
|
|
477
|
+
userId,
|
|
478
|
+
walletId,
|
|
479
|
+
opts
|
|
480
|
+
}) {
|
|
481
|
+
const res = yield this.baseRequest.post(
|
|
482
|
+
`/users/${userId}/wallets/${walletId}/transactions/broadcast`,
|
|
483
|
+
opts
|
|
484
|
+
);
|
|
485
|
+
return res.data;
|
|
486
|
+
});
|
|
487
|
+
this.trackExternalWalletConnections = (_0) => __async(this, [_0], function* ({
|
|
488
|
+
wallets
|
|
489
|
+
}) {
|
|
490
|
+
const res = yield this.baseRequest.post("/users/external-wallets/track-connections", {
|
|
491
|
+
wallets
|
|
492
|
+
});
|
|
493
|
+
return { success: res.data.success };
|
|
494
|
+
});
|
|
459
495
|
const headers = __spreadValues(__spreadValues({}, apiKey && { [API_KEY_HEADER_NAME]: apiKey }), partnerId && { [PARTNER_ID_HEADER_NAME]: partnerId });
|
|
460
496
|
const axiosConfig = {
|
|
461
497
|
baseURL: userManagementHost,
|
package/dist/types/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
|
-
import { AccountMetadata, Auth, AuthIdentifier, AuthMethod, BackupKitEmailProps, BiometricLocationHint, Chain, CurrentWalletIds, EncryptedKeyShare, EncryptorType, ExternalWalletInfo, LoginExternalWalletResponse, KeyShareType, Network, OnRampAsset, OnRampConfig, OnRampProvider, OnRampPurchase, OnRampPurchaseCreateParams, OnRampPurchaseUpdateParams, AuthMethodStatus, PregenIds, PrimaryAuth, PublicKeyType, ServerAuthStateSignup, SessionInfo, Setup2faResponse, SignUpOrLogInResponse, TelegramAuthResponse, TPregenIdentifierType, VerificationEmailProps, VerifiedAuth, VerifyFarcasterResponse, VerifyTelegramResponse, VerifyThirdPartyAuth, WalletEntity, WalletParams, TWalletScheme, TWalletType, VerifyExternalWalletParams, IssueJwtParams, IssueJwtResponse, LinkAccountParams, LinkedAccounts, ResendVerificationCodeParams, AssetMetadataIndexed, GetProfileBalanceParams, ProfileBalance, LegacyAuthMethod, PrimaryAuthInfo, ServerAuthStateLogin, ServerAuthStateDone, UserPreferences } from '@getpara/shared';
|
|
2
|
+
import { AccountMetadata, Auth, AuthIdentifier, AuthMethod, BackupKitEmailProps, BiometricLocationHint, Chain, CurrentWalletIds, EncryptedKeyShare, EncryptorType, ExternalWalletInfo, LoginExternalWalletResponse, KeyShareType, Network, OnRampAsset, OnRampConfig, OnRampProvider, OnRampPurchase, OnRampPurchaseCreateParams, OnRampPurchaseUpdateParams, AuthMethodStatus, PregenIds, PrimaryAuth, PublicKeyType, ServerAuthStateSignup, SessionInfo, Setup2faResponse, SignUpOrLogInResponse, TelegramAuthResponse, TPregenIdentifierType, VerificationEmailProps, VerifiedAuth, VerifyFarcasterResponse, VerifyTelegramResponse, VerifyThirdPartyAuth, WalletEntity, WalletParams, TWalletScheme, TWalletType, VerifyExternalWalletParams, IssueJwtParams, IssueJwtResponse, LinkAccountParams, LinkedAccounts, ResendVerificationCodeParams, AssetMetadataIndexed, GetProfileBalanceParams, ProfileBalance, LegacyAuthMethod, PrimaryAuthInfo, ServerAuthStateLogin, ServerAuthStateDone, UserPreferences, EstimateTransactionOpts, EstimateTransactionResult, BroadcastTransactionOpts, BroadcastTransactionResult, TExternalWalletType } from '@getpara/shared';
|
|
3
3
|
interface ConfigOpts {
|
|
4
4
|
useFetchAdapter?: boolean;
|
|
5
5
|
}
|
|
@@ -478,9 +478,31 @@ declare class Client {
|
|
|
478
478
|
refreshEnclaveJwt: (encryptedPayload: string) => Promise<{
|
|
479
479
|
payload: string;
|
|
480
480
|
}>;
|
|
481
|
+
deleteEnclaveShares: (encryptedPayload: string) => Promise<{
|
|
482
|
+
payload: any;
|
|
483
|
+
}>;
|
|
481
484
|
getUserPreferences: (userId: string) => Promise<{
|
|
482
485
|
preferences: UserPreferences;
|
|
483
486
|
}>;
|
|
484
487
|
updateUserPreferences: (userId: string, preferences: Partial<UserPreferences>) => Promise<UserPreferences>;
|
|
488
|
+
estimateSendTransaction: ({ userId, walletId, opts, }: {
|
|
489
|
+
userId: string;
|
|
490
|
+
walletId: string;
|
|
491
|
+
opts: EstimateTransactionOpts;
|
|
492
|
+
}) => Promise<EstimateTransactionResult>;
|
|
493
|
+
broadcastSendTransaction: ({ userId, walletId, opts, }: {
|
|
494
|
+
userId: string;
|
|
495
|
+
walletId: string;
|
|
496
|
+
opts: BroadcastTransactionOpts;
|
|
497
|
+
}) => Promise<BroadcastTransactionResult>;
|
|
498
|
+
trackExternalWalletConnections: ({ wallets, }: {
|
|
499
|
+
wallets: {
|
|
500
|
+
address: string;
|
|
501
|
+
type: TExternalWalletType;
|
|
502
|
+
provider?: string;
|
|
503
|
+
}[];
|
|
504
|
+
}) => Promise<{
|
|
505
|
+
success: boolean;
|
|
506
|
+
}>;
|
|
485
507
|
}
|
|
486
508
|
export default Client;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/user-management-client",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.73",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@getpara/shared": "1.
|
|
5
|
+
"@getpara/shared": "1.8.0",
|
|
6
6
|
"axios": "^1.8.4",
|
|
7
7
|
"libphonenumber-js": "^1.11.7"
|
|
8
8
|
},
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist",
|
|
21
21
|
"package.json"
|
|
22
22
|
],
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "52a9fc31810d56e792e23f68b73e1d4efbf6b96b",
|
|
24
24
|
"main": "dist/cjs/index.js",
|
|
25
25
|
"module": "dist/esm/index.js",
|
|
26
26
|
"scripts": {
|