@getpara/user-management-client 2.0.0-alpha.17 → 2.0.0-alpha.19
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 +2 -2
- package/dist/esm/client.js +2 -2
- package/dist/types/client.d.ts +22 -4
- package/dist/types/types/auth.d.ts +1 -0
- package/package.json +2 -2
package/dist/cjs/client.js
CHANGED
|
@@ -334,8 +334,8 @@ class Client {
|
|
|
334
334
|
const res = yield this.baseRequest.post("/recovery", body);
|
|
335
335
|
return res;
|
|
336
336
|
});
|
|
337
|
-
this.preSignMessage = (userId, walletId, message, scheme, cosmosSignDoc) => __async(this, null, function* () {
|
|
338
|
-
const body = { message, scheme, cosmosSignDoc };
|
|
337
|
+
this.preSignMessage = (userId, walletId, message, scheme, cosmosSignDoc, protocolId) => __async(this, null, function* () {
|
|
338
|
+
const body = { message, scheme, cosmosSignDoc, protocolId };
|
|
339
339
|
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}/messages/sign`, body);
|
|
340
340
|
return res.data;
|
|
341
341
|
});
|
package/dist/esm/client.js
CHANGED
|
@@ -257,8 +257,8 @@ class Client {
|
|
|
257
257
|
const res = yield this.baseRequest.post("/recovery", body);
|
|
258
258
|
return res;
|
|
259
259
|
});
|
|
260
|
-
this.preSignMessage = (userId, walletId, message, scheme, cosmosSignDoc) => __async(this, null, function* () {
|
|
261
|
-
const body = { message, scheme, cosmosSignDoc };
|
|
260
|
+
this.preSignMessage = (userId, walletId, message, scheme, cosmosSignDoc, protocolId) => __async(this, null, function* () {
|
|
261
|
+
const body = { message, scheme, cosmosSignDoc, protocolId };
|
|
262
262
|
const res = yield this.baseRequest.post(`/users/${userId}/wallets/${walletId}/messages/sign`, body);
|
|
263
263
|
return res.data;
|
|
264
264
|
});
|
package/dist/types/client.d.ts
CHANGED
|
@@ -99,11 +99,13 @@ interface claimPreGenWalletsBody {
|
|
|
99
99
|
interface signTransactionBody {
|
|
100
100
|
transaction: string;
|
|
101
101
|
chainId: string;
|
|
102
|
+
protocolId?: string;
|
|
102
103
|
}
|
|
103
104
|
interface sendTransactionBody {
|
|
104
105
|
transaction: string;
|
|
105
106
|
chain?: Chain;
|
|
106
107
|
chainId?: string;
|
|
108
|
+
protocolId?: string;
|
|
107
109
|
}
|
|
108
110
|
interface AcceptScopesBody {
|
|
109
111
|
scopeIds: string[];
|
|
@@ -116,6 +118,14 @@ interface sessionPasswordBody {
|
|
|
116
118
|
encryptedWalletPrivateKey?: string;
|
|
117
119
|
encryptionKeyHash?: string;
|
|
118
120
|
}
|
|
121
|
+
interface EncryptedWalletPrivateKey {
|
|
122
|
+
id: string;
|
|
123
|
+
userId: string;
|
|
124
|
+
encryptedPrivateKey: string;
|
|
125
|
+
encryptionKeyHash: string;
|
|
126
|
+
biometricPublicKey?: string;
|
|
127
|
+
passwordId?: string;
|
|
128
|
+
}
|
|
119
129
|
export type SDKType = 'WEB' | 'SERVER' | 'BRIDGE' | 'REACT_NATIVE';
|
|
120
130
|
export type VerifyTelegramRes = {
|
|
121
131
|
isValid: true;
|
|
@@ -189,7 +199,7 @@ declare class Client {
|
|
|
189
199
|
logout: () => Promise<any>;
|
|
190
200
|
recoveryVerification: (email: string, verificationCode: string) => Promise<any>;
|
|
191
201
|
recoveryInit: (email: string) => Promise<any>;
|
|
192
|
-
preSignMessage: (userId: string, walletId: string, message: string, scheme?: TWalletScheme, cosmosSignDoc?: string) => Promise<any>;
|
|
202
|
+
preSignMessage: (userId: string, walletId: string, message: string, scheme?: TWalletScheme, cosmosSignDoc?: string, protocolId?: string) => Promise<any>;
|
|
193
203
|
deleteSelf: (userId: string) => Promise<any>;
|
|
194
204
|
uploadKeyshares(userId: string, walletId: string, encryptedKeyshares: EncryptedKeyShare[]): Promise<any>;
|
|
195
205
|
uploadUserKeyShares(userId: string, encryptedKeyshares: (EncryptedKeyShare & {
|
|
@@ -319,8 +329,12 @@ declare class Client {
|
|
|
319
329
|
publicKey: string;
|
|
320
330
|
}[];
|
|
321
331
|
}>;
|
|
322
|
-
uploadEncryptedWalletPrivateKey(userId: string, encryptedWalletPrivateKey: string, encryptionKeyHash: string, biometricPublicKey?: string, passwordId?: string): Promise<
|
|
323
|
-
|
|
332
|
+
uploadEncryptedWalletPrivateKey(userId: string, encryptedWalletPrivateKey: string, encryptionKeyHash: string, biometricPublicKey?: string, passwordId?: string): Promise<{
|
|
333
|
+
encryptedWalletPrivateKey: EncryptedWalletPrivateKey;
|
|
334
|
+
}>;
|
|
335
|
+
getEncryptedWalletPrivateKeys(userId: string, encryptionKeyHash: string): Promise<{
|
|
336
|
+
encryptedPrivateKeys: EncryptedWalletPrivateKey[];
|
|
337
|
+
}>;
|
|
324
338
|
getConversionRate(chainId: string, symbol: string, currency: string): Promise<any>;
|
|
325
339
|
getGasEstimate(chainId: string, totalGasPrice: string): Promise<any>;
|
|
326
340
|
getGasOracle(chainId: string): Promise<any>;
|
|
@@ -333,7 +347,11 @@ declare class Client {
|
|
|
333
347
|
getSupportedAuthMethods(auth: Auth): Promise<any>;
|
|
334
348
|
getPasswords(auth: Auth): Promise<PasswordEntity[]>;
|
|
335
349
|
verifyPasswordChallenge(partnerId: string, body: verifyPasswordChallengeBody): Promise<any>;
|
|
336
|
-
getEncryptedWalletPrivateKey(passwordId: string): Promise<
|
|
350
|
+
getEncryptedWalletPrivateKey(passwordId: string): Promise<{
|
|
351
|
+
data: {
|
|
352
|
+
encryptedWalletPrivateKey: EncryptedWalletPrivateKey;
|
|
353
|
+
};
|
|
354
|
+
}>;
|
|
337
355
|
getUser(userId: string): Promise<any>;
|
|
338
356
|
getAccountMetadata(userId: string, partnerId: string): Promise<{
|
|
339
357
|
accountMetadata: AccountMetadata;
|
|
@@ -160,6 +160,7 @@ export type ServerAuthStateLogin = ServerAuthStateBase & {
|
|
|
160
160
|
stage: 'login';
|
|
161
161
|
biometricHints?: BiometricLocationHint[];
|
|
162
162
|
loginAuthMethods: AuthMethod[];
|
|
163
|
+
isWalletSelectionNeeded?: boolean;
|
|
163
164
|
};
|
|
164
165
|
export type VerifyThirdPartyAuth = ServerAuthStateSignup | ServerAuthStateLogin;
|
|
165
166
|
export type ExternalWalletInfo = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/user-management-client",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.19",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"require": "./dist/cjs/index.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "80d2c5d7e1203fb12378aa29bfd4d7003c7d7075"
|
|
36
36
|
}
|