@getpara/react-native-wallet 2.13.0 → 2.14.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/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-native-wallet",
|
|
3
3
|
"description": "Para Wallet for React Native",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.14.0",
|
|
5
5
|
"author": "Para Team <hello@getpara.com> (https://getpara.com)",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@getpara/core-sdk": "2.
|
|
8
|
-
"@getpara/user-management-client": "2.
|
|
9
|
-
"@getpara/web-sdk": "2.
|
|
7
|
+
"@getpara/core-sdk": "2.14.0",
|
|
8
|
+
"@getpara/user-management-client": "2.14.0",
|
|
9
|
+
"@getpara/web-sdk": "2.14.0",
|
|
10
10
|
"@peculiar/webcrypto": "^1.5.0",
|
|
11
11
|
"@ungap/structured-clone": "1.3.0",
|
|
12
12
|
"react-native-url-polyfill": "2.0.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "8ac7cfbe3b106a42e53f6e5439f484ab11b0e1f3"
|
|
96
96
|
}
|
|
@@ -145,12 +145,14 @@ export class ParaMobile extends ParaCore {
|
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Registers a passkey for the user.
|
|
148
|
-
* @param
|
|
149
|
-
* @param {string} biometricsId - The biometrics ID obtained from verification.
|
|
148
|
+
* @param authState - Either an AuthStateSignup object or a passkeyId string.
|
|
150
149
|
* @returns {Promise<void>}
|
|
151
150
|
*/
|
|
152
|
-
async registerPasskey(authState: AuthStateSignup)
|
|
153
|
-
|
|
151
|
+
async registerPasskey(authState: AuthStateSignup): Promise<void>;
|
|
152
|
+
async registerPasskey(passkeyId: string): Promise<void>;
|
|
153
|
+
async registerPasskey(authStateOrPasskeyId: AuthStateSignup | string): Promise<void> {
|
|
154
|
+
const passkeyId = typeof authStateOrPasskeyId === 'string' ? authStateOrPasskeyId : authStateOrPasskeyId.passkeyId;
|
|
155
|
+
if (!passkeyId) {
|
|
154
156
|
throw new Error('Passkey ID not found. Make sure you have enabled passkey logins in the Para Developer Portal.');
|
|
155
157
|
}
|
|
156
158
|
|
|
@@ -213,7 +215,7 @@ export class ParaMobile extends ParaCore {
|
|
|
213
215
|
const encryptedPrivateKeyHex = await encryptPrivateKey(keyPair, userHandleEncoded);
|
|
214
216
|
|
|
215
217
|
const { partnerId } = await this.ctx.client.touchSession();
|
|
216
|
-
await this.ctx.client.patchSessionPublicKey(partnerId, userId,
|
|
218
|
+
await this.ctx.client.patchSessionPublicKey(partnerId, userId, passkeyId, {
|
|
217
219
|
publicKey: resultJson.id,
|
|
218
220
|
sigDerivedPublicKey: publicKeyHex,
|
|
219
221
|
cosePublicKey,
|