@getpara/react-native-wallet 2.14.0 → 2.16.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/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@getpara/web-sdk';
2
2
  export { ParaMobile } from './react-native/ParaMobile.js';
3
+ export * from '@getpara/viem-v2-integration';
package/dist/index.js CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from '@getpara/web-sdk';
2
2
  export { ParaMobile } from './react-native/ParaMobile.js';
3
+ // Smart Account types, errors, utilities — re-exported from viem-v2-integration
4
+ export * from '@getpara/viem-v2-integration';
@@ -23,11 +23,11 @@ export declare class ParaMobile extends ParaCore {
23
23
  isPasskeySupported(): Promise<boolean>;
24
24
  /**
25
25
  * Registers a passkey for the user.
26
- * @param {Auth<'email'> | Auth<'phone'>} auth - The user's authentication details
27
- * @param {string} biometricsId - The biometrics ID obtained from verification.
26
+ * @param authState - Either an AuthStateSignup object or a passkeyId string.
28
27
  * @returns {Promise<void>}
29
28
  */
30
29
  registerPasskey(authState: AuthStateSignup): Promise<void>;
30
+ registerPasskey(passkeyId: string): Promise<void>;
31
31
  /**
32
32
  * Logs in the user using their authentication credentials.
33
33
  * @param {AuthParams} params - The authentication parameters.
@@ -112,15 +112,10 @@ export class ParaMobile extends ParaCore {
112
112
  return Passkey.isSupported();
113
113
  });
114
114
  }
115
- /**
116
- * Registers a passkey for the user.
117
- * @param {Auth<'email'> | Auth<'phone'>} auth - The user's authentication details
118
- * @param {string} biometricsId - The biometrics ID obtained from verification.
119
- * @returns {Promise<void>}
120
- */
121
- registerPasskey(authState) {
115
+ registerPasskey(authStateOrPasskeyId) {
122
116
  return __awaiter(this, void 0, void 0, function* () {
123
- if (!authState.passkeyId) {
117
+ const passkeyId = typeof authStateOrPasskeyId === 'string' ? authStateOrPasskeyId : authStateOrPasskeyId.passkeyId;
118
+ if (!passkeyId) {
124
119
  throw new Error('Passkey ID not found. Make sure you have enabled passkey logins in the Para Developer Portal.');
125
120
  }
126
121
  const userId = this.assertUserId();
@@ -175,7 +170,7 @@ export class ParaMobile extends ParaCore {
175
170
  const encryptionKeyHash = getSHA256HashHex(userHandleEncoded);
176
171
  const encryptedPrivateKeyHex = yield encryptPrivateKey(keyPair, userHandleEncoded);
177
172
  const { partnerId } = yield this.ctx.client.touchSession();
178
- yield this.ctx.client.patchSessionPublicKey(partnerId, userId, authState.passkeyId, {
173
+ yield this.ctx.client.patchSessionPublicKey(partnerId, userId, passkeyId, {
179
174
  publicKey: resultJson.id,
180
175
  sigDerivedPublicKey: publicKeyHex,
181
176
  cosePublicKey,
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@getpara/react-native-wallet",
3
3
  "description": "Para Wallet for React Native",
4
- "version": "2.14.0",
4
+ "version": "2.16.0",
5
5
  "author": "Para Team <hello@getpara.com> (https://getpara.com)",
6
6
  "dependencies": {
7
- "@getpara/core-sdk": "2.14.0",
8
- "@getpara/user-management-client": "2.14.0",
9
- "@getpara/web-sdk": "2.14.0",
7
+ "@getpara/core-sdk": "2.16.0",
8
+ "@getpara/user-management-client": "2.16.0",
9
+ "@getpara/viem-v2-integration": "2.16.0",
10
+ "@getpara/web-sdk": "2.16.0",
10
11
  "@peculiar/webcrypto": "^1.5.0",
11
12
  "@ungap/structured-clone": "1.3.0",
12
13
  "react-native-url-polyfill": "2.0.0",
@@ -92,5 +93,5 @@
92
93
  ]
93
94
  }
94
95
  },
95
- "gitHead": "8ac7cfbe3b106a42e53f6e5439f484ab11b0e1f3"
96
+ "gitHead": "fbe96a062b308d04105213378c12c38ee973c798"
96
97
  }
package/src/index.ts CHANGED
@@ -1,2 +1,5 @@
1
1
  export * from '@getpara/web-sdk';
2
2
  export { ParaMobile } from './react-native/ParaMobile.js';
3
+
4
+ // Smart Account types, errors, utilities — re-exported from viem-v2-integration
5
+ export * from '@getpara/viem-v2-integration';