@getpara/user-management-client 2.0.0-alpha.72 → 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 +31 -1
- package/dist/esm/client.js +31 -1
- package/dist/types/client.d.ts +20 -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
|
});
|
|
@@ -539,6 +539,36 @@ class Client {
|
|
|
539
539
|
const res = yield this.baseRequest.patch(`/users/${userId}/preferences`, { preferences });
|
|
540
540
|
return res.data;
|
|
541
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
|
+
});
|
|
542
572
|
const headers = __spreadValues(__spreadValues({}, apiKey && { [import_consts.API_KEY_HEADER_NAME]: apiKey }), partnerId && { [import_consts.PARTNER_ID_HEADER_NAME]: partnerId });
|
|
543
573
|
const axiosConfig = {
|
|
544
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
|
});
|
|
@@ -462,6 +462,36 @@ class Client {
|
|
|
462
462
|
const res = yield this.baseRequest.patch(`/users/${userId}/preferences`, { preferences });
|
|
463
463
|
return res.data;
|
|
464
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
|
+
});
|
|
465
495
|
const headers = __spreadValues(__spreadValues({}, apiKey && { [API_KEY_HEADER_NAME]: apiKey }), partnerId && { [PARTNER_ID_HEADER_NAME]: partnerId });
|
|
466
496
|
const axiosConfig = {
|
|
467
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
|
}
|
|
@@ -485,5 +485,24 @@ declare class Client {
|
|
|
485
485
|
preferences: UserPreferences;
|
|
486
486
|
}>;
|
|
487
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
|
+
}>;
|
|
488
507
|
}
|
|
489
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": {
|