@getpara/react-native-wallet 2.19.0 → 2.21.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.
@@ -56,11 +56,11 @@ export declare class ReactNativeUtils implements PlatformUtils {
56
56
  _sessionCookie: string, isDKLS?: boolean): Promise<SignatureRes>;
57
57
  signTransaction(ctx: Ctx, userId: string, walletId: string, share: string, rlpEncodedTxBase64: string, // base64 encoding of rlp encoded tx
58
58
  chainId: string, _sessionCookie: string, isDKLS?: boolean): Promise<SignatureRes>;
59
- ed25519Keygen(ctx: Ctx, userId: string, _sessionCookie: string, _emailProps?: BackupKitEmailProps): Promise<{
59
+ ed25519Keygen(ctx: Ctx, userId: string, _sessionCookie: string, _emailProps?: BackupKitEmailProps, type?: TWalletType): Promise<{
60
60
  signer: string;
61
61
  walletId: string;
62
62
  }>;
63
- ed25519PreKeygen(ctx: Ctx, pregenIdentifier: string, pregenIdentifierType: TPregenIdentifierType, _sessionCookie: string): Promise<{
63
+ ed25519PreKeygen(ctx: Ctx, pregenIdentifier: string, pregenIdentifierType: TPregenIdentifierType, _sessionCookie: string, type?: TWalletType): Promise<{
64
64
  signer: string;
65
65
  walletId: string;
66
66
  }>;
@@ -186,23 +186,23 @@ export class ReactNativeUtils {
186
186
  return this.baseSignTransaction(ctx, userId, walletId, data.protocolId, share, rlpEncodedTxBase64, chainId, isDKLS);
187
187
  });
188
188
  }
189
- ed25519Keygen(ctx, userId, _sessionCookie, _emailProps) {
189
+ ed25519Keygen(ctx, userId, _sessionCookie, _emailProps, type) {
190
190
  return __awaiter(this, void 0, void 0, function* () {
191
191
  const { walletId, protocolId } = yield ctx.client.createWallet(userId, {
192
192
  scheme: 'ED25519',
193
- type: 'SOLANA',
193
+ type: type !== null && type !== void 0 ? type : 'SOLANA',
194
194
  });
195
195
  const signer = yield ParaSignerModule.ed25519CreateAccount(walletId, protocolId);
196
196
  return { signer, walletId };
197
197
  });
198
198
  }
199
- ed25519PreKeygen(ctx, pregenIdentifier, pregenIdentifierType, _sessionCookie) {
199
+ ed25519PreKeygen(ctx, pregenIdentifier, pregenIdentifierType, _sessionCookie, type) {
200
200
  return __awaiter(this, void 0, void 0, function* () {
201
201
  const { walletId, protocolId } = yield ctx.client.createPregenWallet({
202
202
  pregenIdentifier,
203
203
  pregenIdentifierType,
204
204
  scheme: 'ED25519',
205
- type: 'SOLANA',
205
+ type: type !== null && type !== void 0 ? type : 'SOLANA',
206
206
  });
207
207
  const signer = yield ParaSignerModule.ed25519CreateAccount(walletId, protocolId);
208
208
  return { signer, walletId };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@getpara/react-native-wallet",
3
3
  "description": "Para Wallet for React Native",
4
- "version": "2.19.0",
4
+ "version": "2.21.0",
5
5
  "author": "Para Team <hello@getpara.com> (https://getpara.com)",
6
6
  "dependencies": {
7
- "@getpara/core-sdk": "2.19.0",
8
- "@getpara/react-core": "2.19.0",
9
- "@getpara/user-management-client": "2.19.0",
10
- "@getpara/viem-v2-integration": "2.19.0",
11
- "@getpara/web-sdk": "2.19.0",
7
+ "@getpara/core-sdk": "2.21.0",
8
+ "@getpara/react-core": "2.21.0",
9
+ "@getpara/user-management-client": "2.21.0",
10
+ "@getpara/viem-v2-integration": "2.21.0",
11
+ "@getpara/web-sdk": "2.21.0",
12
12
  "@peculiar/webcrypto": "^1.5.0",
13
13
  "@ungap/structured-clone": "1.3.0",
14
14
  "react-native-url-polyfill": "2.0.0",
@@ -96,5 +96,5 @@
96
96
  ]
97
97
  }
98
98
  },
99
- "gitHead": "7dc9400777adb653c0cc28e0d9236424eb384467"
99
+ "gitHead": "61f68bb1344dcec458f9016db39f631bb630b8f4"
100
100
  }
@@ -271,13 +271,14 @@ export class ReactNativeUtils implements PlatformUtils {
271
271
  userId: string,
272
272
  _sessionCookie: string,
273
273
  _emailProps?: BackupKitEmailProps,
274
+ type?: TWalletType,
274
275
  ): Promise<{
275
276
  signer: string;
276
277
  walletId: string;
277
278
  }> {
278
279
  const { walletId, protocolId } = await ctx.client.createWallet(userId, {
279
280
  scheme: 'ED25519',
280
- type: 'SOLANA',
281
+ type: type ?? 'SOLANA',
281
282
  });
282
283
 
283
284
  const signer = await ParaSignerModule.ed25519CreateAccount(walletId, protocolId);
@@ -289,6 +290,7 @@ export class ReactNativeUtils implements PlatformUtils {
289
290
  pregenIdentifier: string,
290
291
  pregenIdentifierType: TPregenIdentifierType,
291
292
  _sessionCookie: string,
293
+ type?: TWalletType,
292
294
  ): Promise<{
293
295
  signer: string;
294
296
  walletId: string;
@@ -297,7 +299,7 @@ export class ReactNativeUtils implements PlatformUtils {
297
299
  pregenIdentifier,
298
300
  pregenIdentifierType,
299
301
  scheme: 'ED25519',
300
- type: 'SOLANA',
302
+ type: type ?? 'SOLANA',
301
303
  });
302
304
 
303
305
  const signer = await ParaSignerModule.ed25519CreateAccount(walletId, protocolId);