@getpara/react-native-wallet 2.18.1 → 2.20.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.
@@ -64,7 +64,7 @@ dependencies {
64
64
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
65
65
  //noinspection GradleDynamicVersion
66
66
  implementation "com.facebook.react:react-native:+"
67
- implementation 'com.github.briancorbin:aar-testing:0.0.4@aar'
67
+ implementation 'com.github.getpara:react-native-signer:1.0.0@aar'
68
68
  }
69
69
 
70
70
  if (isNewArchitectureEnabled()) {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export * from '@getpara/web-sdk';
2
2
  export { ParaMobile } from './react-native/ParaMobile.js';
3
- export * from '@getpara/viem-v2-integration/aa';
3
+ export type * from '@getpara/viem-v2-integration/aa';
4
+ export * from './provider/index.js';
5
+ export * from '@getpara/react-core';
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
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/aa
4
- export * from '@getpara/viem-v2-integration/aa';
3
+ // React Native provider (wraps ParaProviderCore with AsyncStorage persistence)
4
+ export * from './provider/index.js';
5
+ // Core provider hooks and config types — platform-agnostic, work with any ParaCore subclass
6
+ export * from '@getpara/react-core';
@@ -0,0 +1,19 @@
1
+ import { type ParaProviderCoreProps, type ParaClientConfig } from '@getpara/react-core/internal';
2
+ import { ParaMobile } from '../react-native/ParaMobile.js';
3
+ /**
4
+ * RN provider props. Same as ParaProviderCoreProps but:
5
+ * - Defaults to ParaMobile
6
+ * - paraClientConfig accepts a simple { apiKey, env?, opts? } config (no createClient needed)
7
+ * - storageAdapter defaults to AsyncStorage
8
+ * - Omits configureClient, waitForReady, store (internal concerns)
9
+ */
10
+ export type ParaProviderProps = Omit<ParaProviderCoreProps<ParaMobile>, 'paraClientConfig' | 'configureClient' | 'waitForReady' | 'store'> & {
11
+ /** A pre-instantiated ParaMobile, or a config with apiKey + optional env/opts. */
12
+ paraClientConfig: ParaMobile | ParaClientConfig;
13
+ };
14
+ /**
15
+ * React Native Para provider. Wraps ParaProviderCore with AsyncStorage-backed
16
+ * persistence by default. Accepts either a ParaMobile instance or a simple
17
+ * `{ apiKey, env?, opts? }` config — the provider creates the client internally.
18
+ */
19
+ export declare function ParaProvider({ children, paraClientConfig: paraClientInput, config, callbacks, storageAdapter, }: ParaProviderProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { useMemo } from 'react';
2
+ import { ParaProviderCore, } from '@getpara/react-core/internal';
3
+ import { asyncStorageAdapter } from './asyncStorageAdapter.js';
4
+ import { ParaMobile } from '../react-native/ParaMobile.js';
5
+ /**
6
+ * React Native Para provider. Wraps ParaProviderCore with AsyncStorage-backed
7
+ * persistence by default. Accepts either a ParaMobile instance or a simple
8
+ * `{ apiKey, env?, opts? }` config — the provider creates the client internally.
9
+ */
10
+ export function ParaProvider({ children, paraClientConfig: paraClientInput, config, callbacks, storageAdapter = asyncStorageAdapter, }) {
11
+ const coreInput = useMemo(() => {
12
+ if (paraClientInput instanceof ParaMobile)
13
+ return paraClientInput;
14
+ return Object.assign(Object.assign({}, paraClientInput), { createClient: (apiKey, env, opts) => new ParaMobile(apiKey, env, opts) });
15
+ }, [paraClientInput]);
16
+ return (<ParaProviderCore paraClientConfig={coreInput} config={config} callbacks={callbacks} storageAdapter={storageAdapter}>
17
+ {children}
18
+ </ParaProviderCore>);
19
+ }
@@ -0,0 +1,6 @@
1
+ import type { ParaStorageAdapter } from '@getpara/react-core';
2
+ /**
3
+ * ParaStorageAdapter backed by React Native AsyncStorage.
4
+ * Used by the core Zustand store for state persistence.
5
+ */
6
+ export declare const asyncStorageAdapter: ParaStorageAdapter;
@@ -0,0 +1,41 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import RNAsyncStorage from '@react-native-async-storage/async-storage';
11
+ /**
12
+ * ParaStorageAdapter backed by React Native AsyncStorage.
13
+ * Used by the core Zustand store for state persistence.
14
+ */
15
+ export const asyncStorageAdapter = {
16
+ getItem: (key) => __awaiter(void 0, void 0, void 0, function* () {
17
+ try {
18
+ return yield RNAsyncStorage.getItem(key);
19
+ }
20
+ catch (error) {
21
+ console.warn('[Para] Error reading from AsyncStorage:', error);
22
+ return null;
23
+ }
24
+ }),
25
+ setItem: (key, value) => __awaiter(void 0, void 0, void 0, function* () {
26
+ try {
27
+ yield RNAsyncStorage.setItem(key, value);
28
+ }
29
+ catch (error) {
30
+ console.warn(`[Para] Error writing to AsyncStorage (key: ${key}):`, error);
31
+ }
32
+ }),
33
+ removeItem: (key) => __awaiter(void 0, void 0, void 0, function* () {
34
+ try {
35
+ yield RNAsyncStorage.removeItem(key);
36
+ }
37
+ catch (error) {
38
+ console.warn(`[Para] Error removing from AsyncStorage (key: ${key}):`, error);
39
+ }
40
+ }),
41
+ };
@@ -0,0 +1,2 @@
1
+ export { ParaProvider, type ParaProviderProps } from './ParaProvider.js';
2
+ export { asyncStorageAdapter } from './asyncStorageAdapter.js';
@@ -0,0 +1,2 @@
1
+ export { ParaProvider } from './ParaProvider.js';
2
+ export { asyncStorageAdapter } from './asyncStorageAdapter.js';
@@ -1,6 +1,4 @@
1
- import { PlatformUtils, TPregenIdentifierType, EventHandler, EventData } from '@getpara/web-sdk';
2
- import { Ctx } from '@getpara/web-sdk';
3
- import { SignatureRes } from '@getpara/web-sdk';
1
+ import type { PlatformUtils, TPregenIdentifierType, EventHandler, EventData, Ctx, SignatureRes } from '@getpara/web-sdk';
4
2
  import { BackupKitEmailProps, TWalletType, SDKType } from '@getpara/user-management-client';
5
3
  import { AsyncStorage } from '../AsyncStorage.js';
6
4
  import { KeychainStorage } from '../KeychainStorage.js';
@@ -58,11 +56,11 @@ export declare class ReactNativeUtils implements PlatformUtils {
58
56
  _sessionCookie: string, isDKLS?: boolean): Promise<SignatureRes>;
59
57
  signTransaction(ctx: Ctx, userId: string, walletId: string, share: string, rlpEncodedTxBase64: string, // base64 encoding of rlp encoded tx
60
58
  chainId: string, _sessionCookie: string, isDKLS?: boolean): Promise<SignatureRes>;
61
- ed25519Keygen(ctx: Ctx, userId: string, _sessionCookie: string, _emailProps?: BackupKitEmailProps): Promise<{
59
+ ed25519Keygen(ctx: Ctx, userId: string, _sessionCookie: string, _emailProps?: BackupKitEmailProps, type?: TWalletType): Promise<{
62
60
  signer: string;
63
61
  walletId: string;
64
62
  }>;
65
- ed25519PreKeygen(ctx: Ctx, pregenIdentifier: string, pregenIdentifierType: TPregenIdentifierType, _sessionCookie: string): Promise<{
63
+ ed25519PreKeygen(ctx: Ctx, pregenIdentifier: string, pregenIdentifierType: TPregenIdentifierType, _sessionCookie: string, type?: TWalletType): Promise<{
66
64
  signer: string;
67
65
  walletId: string;
68
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/dist/shim.d.ts CHANGED
@@ -1,126 +1,175 @@
1
1
  export function ensureParaCrypto(): {
2
2
  baseCrypto: import("crypto").webcrypto.Crypto | {
3
- getCiphers: () => string[];
4
- getHashes: () => string[];
5
- webcrypto: {
6
- subtle: import("react-native-quick-crypto/lib/typescript/src/subtle").Subtle;
7
- SubtleCrypto: typeof import("react-native-quick-crypto/lib/typescript/src/subtle").Subtle;
8
- CryptoKey: typeof import("react-native-quick-crypto/lib/typescript/src/keys").CryptoKey;
3
+ Certificate: typeof import("react-native-quick-crypto").Certificate;
4
+ X509Certificate: typeof import("react-native-quick-crypto").X509Certificate;
5
+ getCurves: typeof import("react-native-quick-crypto").getCurves;
6
+ constants: {
7
+ readonly RSA_PKCS1_PADDING: 1;
8
+ readonly RSA_NO_PADDING: 3;
9
+ readonly RSA_PKCS1_OAEP_PADDING: 4;
10
+ readonly RSA_X931_PADDING: 5;
11
+ readonly RSA_PKCS1_PSS_PADDING: 6;
12
+ readonly RSA_PSS_SALTLEN_DIGEST: -1;
13
+ readonly RSA_PSS_SALTLEN_MAX_SIGN: -2;
14
+ readonly RSA_PSS_SALTLEN_AUTO: -2;
15
+ readonly POINT_CONVERSION_COMPRESSED: 2;
16
+ readonly POINT_CONVERSION_UNCOMPRESSED: 4;
17
+ readonly POINT_CONVERSION_HYBRID: 6;
18
+ readonly DH_CHECK_P_NOT_PRIME: 1;
19
+ readonly DH_CHECK_P_NOT_SAFE_PRIME: 2;
20
+ readonly DH_UNABLE_TO_CHECK_GENERATOR: 4;
21
+ readonly DH_NOT_SUITABLE_GENERATOR: 8;
22
+ readonly OPENSSL_VERSION_NUMBER: 805306368;
23
+ };
24
+ Buffer: typeof Buffer;
25
+ isCryptoKeyPair(result: import("react-native-quick-crypto").CryptoKey | import("react-native-quick-crypto").CryptoKeyPair): result is import("react-native-quick-crypto").CryptoKeyPair;
26
+ Subtle: typeof import("react-native-quick-crypto").Subtle;
27
+ subtle: import("react-native-quick-crypto").Subtle;
28
+ toArrayBuffer(buf: Buffer | import("safe-buffer").Buffer | ArrayBufferView): ArrayBuffer;
29
+ bufferLikeToArrayBuffer(buf: import("react-native-quick-crypto").BufferLike): ArrayBuffer;
30
+ binaryLikeToArrayBuffer(input: import("react-native-quick-crypto").BinaryLikeNode, encoding?: string): ArrayBuffer;
31
+ ab2str(buf: ArrayBuffer, encoding?: string): string;
32
+ bufferToString(buf: ArrayBuffer, encoding?: string): string;
33
+ stringToBuffer(str: string, encoding?: string): ArrayBuffer;
34
+ abvToArrayBuffer: (buf: import("react-native-quick-crypto").ABV) => ArrayBuffer;
35
+ kEmptyObject: any;
36
+ ensureBytes(title: string, hex: import("react-native-quick-crypto").Hex, expectedLength?: number): Uint8Array;
37
+ isBytes(a: unknown): a is Uint8Array;
38
+ hexToBytes(hex: string): Uint8Array;
39
+ lazyDOMException(message: string, domName: string | {
40
+ name: string;
41
+ cause: unknown;
42
+ }): Error;
43
+ normalizeHashName(algo: string | import("react-native-quick-crypto").HashAlgorithm | {
44
+ name: string;
45
+ } | undefined, context?: import("react-native-quick-crypto").HashContext): string;
46
+ HashContext: typeof import("react-native-quick-crypto").HashContext;
47
+ timingSafeEqual(a: import("react-native-quick-crypto").ABV, b: import("react-native-quick-crypto").ABV): boolean;
48
+ KFormatType: typeof import("react-native-quick-crypto").KFormatType;
49
+ KeyType: typeof import("react-native-quick-crypto").KeyType;
50
+ KeyEncoding: typeof import("react-native-quick-crypto").KeyEncoding;
51
+ KeyFormat: typeof import("react-native-quick-crypto").KeyFormat;
52
+ kNamedCurveAliases: {
53
+ readonly "P-256": "prime256v1";
54
+ readonly "P-384": "secp384r1";
55
+ readonly "P-521": "secp521r1";
9
56
  };
10
- randomFill<T extends import("react-native-quick-crypto/lib/typescript/src/Utils").ABV>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
11
- randomFill<T extends import("react-native-quick-crypto/lib/typescript/src/Utils").ABV>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
12
- randomFill<T extends import("react-native-quick-crypto/lib/typescript/src/Utils").ABV>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
13
- randomFillSync<T extends import("react-native-quick-crypto/lib/typescript/src/Utils").ABV>(buffer: T, offset?: number, size?: number): T;
57
+ KeyVariant: typeof import("react-native-quick-crypto").KeyVariant;
58
+ validateFunction(f: unknown): boolean;
59
+ isStringOrBuffer(val: unknown): val is string | ArrayBuffer;
60
+ validateObject<T>(value: unknown, name: string, options?: {
61
+ allowArray: boolean;
62
+ allowFunction: boolean;
63
+ nullable: boolean;
64
+ } | null): value is T;
65
+ hasAnyNotIn(set: string[], checks: string[]): boolean;
66
+ validateMaxBufferLength: (data: import("react-native-quick-crypto").BinaryLike | import("react-native-quick-crypto").BufferLike, name: string) => void;
67
+ getUsagesUnion: (usageSet: import("react-native-quick-crypto").KeyUsage[], ...usages: import("react-native-quick-crypto").KeyUsage[]) => import("react-native-quick-crypto").KeyUsage[];
68
+ validateKeyOps: (keyOps: import("react-native-quick-crypto").KeyUsage[] | undefined, usagesSet: import("react-native-quick-crypto").KeyUsage[]) => void;
69
+ setDefaultEncoding(encoding: import("react-native-quick-crypto").Encoding): void;
70
+ getDefaultEncoding(): import("react-native-quick-crypto").Encoding;
71
+ normalizeEncoding(enc: string): "ascii" | "utf8" | "utf16le" | "base64" | "latin1" | "hex" | undefined;
72
+ validateEncoding(data: string, encoding: string): void;
73
+ getUIntOption(options: Record<string, any>, key: string): any;
74
+ encapsulate(key: import("react-native-quick-crypto").CryptoKey | import("react-native-quick-crypto").BinaryLike | import("react-native-quick-crypto").KeyObject | import("react-native-quick-crypto").KeyInputObject, callback?: (err: Error | null, result?: import("react-native-quick-crypto").EncapsulateResult) => void): import("react-native-quick-crypto").EncapsulateResult | void;
75
+ decapsulate(key: import("react-native-quick-crypto").CryptoKey | import("react-native-quick-crypto").BinaryLike | import("react-native-quick-crypto").KeyObject | import("react-native-quick-crypto").KeyInputObject, ciphertext: import("react-native-quick-crypto").BinaryLike, callback?: (err: Error | null, result?: ArrayBuffer) => void): ArrayBuffer | void;
76
+ mlkem_generateKeyPairWebCrypto(variant: import("react-native-quick-crypto").MlKemVariant, extractable: boolean, keyUsages: import("react-native-quick-crypto").KeyUsage[]): Promise<import("react-native-quick-crypto").CryptoKeyPair>;
77
+ MlKem: typeof import("react-native-quick-crypto").MlKem;
78
+ createDiffieHellman(primeOrSize: number | string | Buffer, primeEncodingOrGenerator?: string | number | Buffer, generator?: number | string | Buffer, _generatorEncoding?: string): import("react-native-quick-crypto").DiffieHellman;
79
+ getDiffieHellman(groupName: string): import("react-native-quick-crypto").DiffieHellman;
80
+ DiffieHellman: typeof import("react-native-quick-crypto").DiffieHellman;
81
+ createDiffieHellmanGroup: typeof import("react-native-quick-crypto").getDiffieHellman;
82
+ createECDH(curveName: string): import("react-native-quick-crypto").ECDH;
83
+ ECDH: typeof import("react-native-quick-crypto").ECDH;
84
+ randomFill<T extends import("react-native-quick-crypto").ABV>(buffer: T, callback: import("react-native-quick-crypto").RandomCallback<T>): void;
85
+ randomFill<T extends import("react-native-quick-crypto").ABV>(buffer: T, offset: number, callback: import("react-native-quick-crypto").RandomCallback<T>): void;
86
+ randomFill<T extends import("react-native-quick-crypto").ABV>(buffer: T, offset: number, size: number, callback: import("react-native-quick-crypto").RandomCallback<T>): void;
87
+ randomFillSync<T extends import("react-native-quick-crypto").ABV>(buffer: T, offset?: number, size?: number): T;
14
88
  randomBytes(size: number): Buffer;
15
89
  randomBytes(size: number, callback: (err: Error | null, buf?: Buffer) => void): void;
16
90
  randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
17
91
  randomInt(max: number): number;
18
92
  randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
19
93
  randomInt(min: number, max: number): number;
20
- getRandomValues(data: import("react-native-quick-crypto/lib/typescript/src/random").RandomTypedArrays): import("react-native-quick-crypto/lib/typescript/src/random").RandomTypedArrays;
94
+ getRandomValues(data: import("react-native-quick-crypto").RandomTypedArrays): import("react-native-quick-crypto").RandomTypedArrays;
21
95
  randomUUID(): string;
22
- rng: typeof import("react-native-quick-crypto/lib/typescript/src/random").randomBytes;
23
- pseudoRandomBytes: typeof import("react-native-quick-crypto/lib/typescript/src/random").randomBytes;
24
- prng: typeof import("react-native-quick-crypto/lib/typescript/src/random").randomBytes;
25
- pbkdf2(password: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, salt: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey?: Buffer) => void): void;
26
- pbkdf2Sync(password: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, salt: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, iterations: number, keylen: number, digest?: string): Buffer;
27
- pbkdf2DeriveBits(algorithm: import("react-native-quick-crypto/lib/typescript/src/keys").SubtleAlgorithm, baseKey: import("react-native-quick-crypto/lib/typescript/src/keys").CryptoKey, length: number): Promise<ArrayBuffer>;
28
- createHmac: typeof import("react-native-quick-crypto/lib/typescript/src/Hmac").createHmac;
29
- Hmac: typeof import("react-native-quick-crypto/lib/typescript/src/Hmac").createHmac;
30
- Hash: typeof import("react-native-quick-crypto/lib/typescript/src/Hash").createHash;
31
- createHash: typeof import("react-native-quick-crypto/lib/typescript/src/Hash").createHash;
32
- createCipher: typeof import("react-native-quick-crypto/lib/typescript/src/Cipher").createCipher;
33
- createCipheriv: typeof import("react-native-quick-crypto/lib/typescript/src/Cipher").createCipheriv;
34
- createDecipher: typeof import("react-native-quick-crypto/lib/typescript/src/Cipher").createDecipher;
35
- createDecipheriv: typeof import("react-native-quick-crypto/lib/typescript/src/Cipher").createDecipheriv;
36
- createPublicKey: typeof import("react-native-quick-crypto/lib/typescript/src/keys").createPublicKey;
37
- createPrivateKey: (key: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike | import("react-native-quick-crypto/lib/typescript/src/keys").EncodingOptions) => import("react-native-quick-crypto/lib/typescript/src/keys").PrivateKeyObject;
38
- createSecretKey: typeof import("react-native-quick-crypto/lib/typescript/src/keys").createSecretKey;
39
- publicEncrypt: (options: import("react-native-quick-crypto/lib/typescript/src/keys").EncodingOptions | import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, buffer: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike) => Buffer;
40
- publicDecrypt: (options: import("react-native-quick-crypto/lib/typescript/src/keys").EncodingOptions | import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, buffer: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike) => Buffer;
41
- privateDecrypt: (options: import("react-native-quick-crypto/lib/typescript/src/keys").EncodingOptions | import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike, buffer: import("react-native-quick-crypto/lib/typescript/src/Utils").BinaryLike) => Buffer;
42
- generateKey: (type: import("react-native-quick-crypto/lib/typescript/src/keys").SecretKeyType, options: import("react-native-quick-crypto/lib/typescript/src/keys").AesKeyGenParams, callback: import("react-native-quick-crypto/lib/typescript/src/keygen").KeyGenCallback) => void;
43
- generateKeyPair: (type: import("react-native-quick-crypto/lib/typescript/src/keys").KeyPairType, options: import("react-native-quick-crypto/lib/typescript/src/Cipher").GenerateKeyPairOptions, callback: import("react-native-quick-crypto/lib/typescript/src/Cipher").GenerateKeyPairCallback) => void;
44
- generateKeyPairSync: typeof import("react-native-quick-crypto/lib/typescript/src/Cipher").generateKeyPairSync;
45
- generateKeySync: (type: import("react-native-quick-crypto/lib/typescript/src/keys").SecretKeyType, options: import("react-native-quick-crypto/lib/typescript/src/keys").AesKeyGenParams) => import("react-native-quick-crypto/lib/typescript/src/keys").SecretKeyObject;
46
- createSign: typeof import("react-native-quick-crypto/lib/typescript/src/sig").createSign;
47
- createVerify: typeof import("react-native-quick-crypto/lib/typescript/src/sig").createVerify;
48
- subtle: import("react-native-quick-crypto/lib/typescript/src/subtle").Subtle;
49
- constants: {
50
- OPENSSL_VERSION_NUMBER: number;
51
- SSL_OP_ALL: number;
52
- SSL_OP_ALLOW_NO_DHE_KEX: number;
53
- SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
54
- SSL_OP_CIPHER_SERVER_PREFERENCE: number;
55
- SSL_OP_CISCO_ANYCONNECT: number;
56
- SSL_OP_COOKIE_EXCHANGE: number;
57
- SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
58
- SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
59
- SSL_OP_EPHEMERAL_RSA: number;
60
- SSL_OP_LEGACY_SERVER_CONNECT: number;
61
- SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
62
- SSL_OP_MICROSOFT_SESS_ID_BUG: number;
63
- SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
64
- SSL_OP_NETSCAPE_CA_DN_BUG: number;
65
- SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
66
- SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
67
- SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
68
- SSL_OP_NO_COMPRESSION: number;
69
- SSL_OP_NO_ENCRYPT_THEN_MAC: number;
70
- SSL_OP_NO_QUERY_MTU: number;
71
- SSL_OP_NO_RENEGOTIATION: number;
72
- SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
73
- SSL_OP_NO_SSLv2: number;
74
- SSL_OP_NO_SSLv3: number;
75
- SSL_OP_NO_TICKET: number;
76
- SSL_OP_NO_TLSv1: number;
77
- SSL_OP_NO_TLSv1_1: number;
78
- SSL_OP_NO_TLSv1_2: number;
79
- SSL_OP_NO_TLSv1_3: number;
80
- SSL_OP_PKCS1_CHECK_1: number;
81
- SSL_OP_PKCS1_CHECK_2: number;
82
- SSL_OP_PRIORITIZE_CHACHA: number;
83
- SSL_OP_SINGLE_DH_USE: number;
84
- SSL_OP_SINGLE_ECDH_USE: number;
85
- SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
86
- SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
87
- SSL_OP_TLS_BLOCK_PADDING_BUG: number;
88
- SSL_OP_TLS_D5_BUG: number;
89
- SSL_OP_TLS_ROLLBACK_BUG: number;
90
- ENGINE_METHOD_RSA: number;
91
- ENGINE_METHOD_DSA: number;
92
- ENGINE_METHOD_DH: number;
93
- ENGINE_METHOD_RAND: number;
94
- ENGINE_METHOD_EC: number;
95
- ENGINE_METHOD_CIPHERS: number;
96
- ENGINE_METHOD_DIGESTS: number;
97
- ENGINE_METHOD_PKEY_METHS: number;
98
- ENGINE_METHOD_PKEY_ASN1_METHS: number;
99
- ENGINE_METHOD_ALL: number;
100
- ENGINE_METHOD_NONE: number;
101
- DH_CHECK_P_NOT_SAFE_PRIME: number;
102
- DH_CHECK_P_NOT_PRIME: number;
103
- DH_UNABLE_TO_CHECK_GENERATOR: number;
104
- DH_NOT_SUITABLE_GENERATOR: number;
105
- ALPN_ENABLED: number;
106
- RSA_PKCS1_PADDING: number;
107
- RSA_SSLV23_PADDING: number;
108
- RSA_NO_PADDING: number;
109
- RSA_PKCS1_OAEP_PADDING: number;
110
- RSA_X931_PADDING: number;
111
- RSA_PKCS1_PSS_PADDING: number;
112
- RSA_PSS_SALTLEN_DIGEST: number;
113
- RSA_PSS_SALTLEN_MAX_SIGN: number;
114
- RSA_PSS_SALTLEN_AUTO: number;
115
- defaultCoreCipherList: string;
116
- TLS1_VERSION: number;
117
- TLS1_1_VERSION: number;
118
- TLS1_2_VERSION: number;
119
- TLS1_3_VERSION: number;
120
- POINT_CONVERSION_COMPRESSED: number;
121
- POINT_CONVERSION_UNCOMPRESSED: number;
122
- POINT_CONVERSION_HYBRID: number;
96
+ rng: typeof import("react-native-quick-crypto").randomBytes;
97
+ pseudoRandomBytes: typeof import("react-native-quick-crypto").randomBytes;
98
+ prng: typeof import("react-native-quick-crypto").randomBytes;
99
+ scrypt(password: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, keylen: number, options?: import("react-native-quick-crypto").ScryptOptions | ((err: Error | null, derivedKey?: Buffer) => void), callback?: (err: Error | null, derivedKey?: Buffer) => void): void;
100
+ scryptSync(password: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, keylen: number, options?: import("react-native-quick-crypto").ScryptOptions): Buffer;
101
+ generatePrimeSync(size: number, options?: import("react-native-quick-crypto").GeneratePrimeOptions): Buffer | bigint;
102
+ generatePrime(size: number, options: import("react-native-quick-crypto").GeneratePrimeOptions | ((err: Error | null, prime: Buffer | bigint) => void), callback?: (err: Error | null, prime: Buffer | bigint) => void): void;
103
+ checkPrimeSync(candidate: import("react-native-quick-crypto").BinaryLike | bigint, options?: import("react-native-quick-crypto").CheckPrimeOptions): boolean;
104
+ checkPrime(candidate: import("react-native-quick-crypto").BinaryLike | bigint, options: import("react-native-quick-crypto").CheckPrimeOptions | ((err: Error | null, result: boolean) => void), callback?: (err: Error | null, result: boolean) => void): void;
105
+ pbkdf2(password: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey?: Buffer) => void): void;
106
+ pbkdf2Sync(password: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
107
+ pbkdf2DeriveBits(algorithm: import("react-native-quick-crypto").SubtleAlgorithm, baseKey: import("react-native-quick-crypto").CryptoKey, length: number): Promise<ArrayBuffer>;
108
+ hkdf(digest: string, key: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, info: import("react-native-quick-crypto").BinaryLike, keylen: number, callback: import("react-native-quick-crypto").HkdfCallback): void;
109
+ hkdfSync(digest: string, key: import("react-native-quick-crypto").BinaryLike, salt: import("react-native-quick-crypto").BinaryLike, info: import("react-native-quick-crypto").BinaryLike, keylen: number): Buffer;
110
+ hkdfDeriveBits(algorithm: import("react-native-quick-crypto").HkdfAlgorithm, baseKey: import("react-native-quick-crypto").CryptoKey, length: number): ArrayBuffer;
111
+ createHmac: typeof import("react-native-quick-crypto").createHmac;
112
+ createHash: typeof import("react-native-quick-crypto").createHash;
113
+ getHashes: typeof import("react-native-quick-crypto").getHashes;
114
+ hash: typeof import("react-native-quick-crypto").hash;
115
+ asyncDigest: (algorithm: import("react-native-quick-crypto").SubtleAlgorithm, data: import("react-native-quick-crypto").BufferLike) => Promise<ArrayBuffer>;
116
+ diffieHellman(options: import("react-native-quick-crypto").DiffieHellmanOptions, callback?: import("react-native-quick-crypto").DiffieHellmanCallback): Buffer | void;
117
+ ed_generateKeyPair(isAsync: boolean, type: import("react-native-quick-crypto").CFRGKeyPairType, encoding: import("react-native-quick-crypto").KeyPairGenConfig, callback: import("react-native-quick-crypto").GenerateKeyPairCallback | undefined): import("react-native-quick-crypto").GenerateKeyPairReturn | void;
118
+ ed_generateKeyPairWebCrypto(type: "ed25519" | "ed448", extractable: boolean, keyUsages: import("react-native-quick-crypto").KeyUsage[]): Promise<import("react-native-quick-crypto").CryptoKeyPair>;
119
+ x_generateKeyPairWebCrypto(type: "x25519" | "x448", extractable: boolean, keyUsages: import("react-native-quick-crypto").KeyUsage[]): Promise<import("react-native-quick-crypto").CryptoKeyPair>;
120
+ xDeriveBits(algorithm: import("react-native-quick-crypto").SubtleAlgorithm, baseKey: import("react-native-quick-crypto").CryptoKey, length: number | null): ArrayBuffer;
121
+ Ed: typeof import("react-native-quick-crypto").Ed;
122
+ getCiphers(): string[];
123
+ getCipherInfo(name: string, options?: {
124
+ keyLength?: number;
125
+ ivLength?: number;
126
+ }): import("react-native-quick-crypto").CipherInfoResult | undefined;
127
+ createDecipheriv(algorithm: import("crypto").CipherCCMTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options: import("crypto").CipherCCMOptions): import("react-native-quick-crypto").Decipher;
128
+ createDecipheriv(algorithm: import("crypto").CipherOCBTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options: import("crypto").CipherOCBOptions): import("react-native-quick-crypto").Decipher;
129
+ createDecipheriv(algorithm: import("crypto").CipherGCMTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options?: import("crypto").CipherGCMOptions): import("react-native-quick-crypto").Decipher;
130
+ createDecipheriv(algorithm: string, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options?: import("readable-stream").TransformOptions): import("react-native-quick-crypto").Decipher;
131
+ createCipheriv(algorithm: import("crypto").CipherCCMTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options: import("crypto").CipherCCMOptions): import("react-native-quick-crypto").Cipher;
132
+ createCipheriv(algorithm: import("crypto").CipherOCBTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options: import("crypto").CipherOCBOptions): import("react-native-quick-crypto").Cipher;
133
+ createCipheriv(algorithm: import("crypto").CipherGCMTypes, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options?: import("crypto").CipherGCMOptions): import("react-native-quick-crypto").Cipher;
134
+ createCipheriv(algorithm: string, key: import("react-native-quick-crypto").BinaryLikeNode, iv: import("react-native-quick-crypto").BinaryLike, options?: import("readable-stream").TransformOptions): import("react-native-quick-crypto").Cipher;
135
+ xsalsa20(key: Uint8Array, nonce: Uint8Array, data: Uint8Array, output?: Uint8Array | undefined, counter?: number): Uint8Array;
136
+ createBlake3(opts?: import("react-native-quick-crypto").Blake3Options): import("react-native-quick-crypto").Blake3;
137
+ blake3: typeof import("react-native-quick-crypto").blake3;
138
+ Blake3: typeof import("react-native-quick-crypto").Blake3;
139
+ blake3Exports: {
140
+ Blake3: typeof import("react-native-quick-crypto").Blake3;
141
+ createBlake3: typeof import("react-native-quick-crypto").createBlake3;
142
+ blake3: typeof import("react-native-quick-crypto").blake3;
123
143
  };
144
+ createSecretKey: typeof import("react-native-quick-crypto").createSecretKey;
145
+ createPublicKey: typeof import("react-native-quick-crypto").createPublicKey;
146
+ createPrivateKey: typeof import("react-native-quick-crypto").createPrivateKey;
147
+ CryptoKey: typeof import("react-native-quick-crypto").CryptoKey;
148
+ generateKey: typeof import("react-native-quick-crypto").generateKey;
149
+ generateKeySync: typeof import("react-native-quick-crypto").generateKeySync;
150
+ generateKeyPair: (type: import("react-native-quick-crypto").KeyPairType, options: import("react-native-quick-crypto").GenerateKeyPairOptions, callback: import("react-native-quick-crypto").GenerateKeyPairCallback) => void;
151
+ generateKeyPairSync: typeof import("react-native-quick-crypto").generateKeyPairSync;
152
+ AsymmetricKeyObject: typeof import("react-native-quick-crypto").AsymmetricKeyObject;
153
+ KeyObject: typeof import("react-native-quick-crypto").KeyObject;
154
+ createSign: typeof import("react-native-quick-crypto").createSign;
155
+ createVerify: typeof import("react-native-quick-crypto").createVerify;
156
+ sign: typeof import("react-native-quick-crypto").sign;
157
+ verify: typeof import("react-native-quick-crypto").verify;
158
+ Sign: typeof import("react-native-quick-crypto").Sign;
159
+ Verify: typeof import("react-native-quick-crypto").Verify;
160
+ publicEncrypt: typeof import("react-native-quick-crypto").publicEncrypt;
161
+ publicDecrypt: typeof import("react-native-quick-crypto").publicDecrypt;
162
+ privateEncrypt: typeof import("react-native-quick-crypto").privateEncrypt;
163
+ privateDecrypt: typeof import("react-native-quick-crypto").privateDecrypt;
164
+ parsePublicKeyEncoding: typeof import("react-native-quick-crypto").parsePublicKeyEncoding;
165
+ parsePrivateKeyEncoding: typeof import("react-native-quick-crypto").parsePrivateKeyEncoding;
166
+ parseKeyEncoding: typeof import("react-native-quick-crypto").parseKeyEncoding;
167
+ SecretKeyObject: typeof import("react-native-quick-crypto").SecretKeyObject;
168
+ PublicKeyObject: typeof import("react-native-quick-crypto").PublicKeyObject;
169
+ PrivateKeyObject: typeof import("react-native-quick-crypto").PrivateKeyObject;
170
+ isCryptoKey: (obj: any) => boolean;
171
+ argon2Sync(algorithm: string, params: import("react-native-quick-crypto").Argon2Params): Buffer;
172
+ argon2(algorithm: string, params: import("react-native-quick-crypto").Argon2Params, callback: (err: Error | null, result: Buffer) => void): void;
124
173
  };
125
174
  peculiarCrypto: PeculiarCrypto;
126
175
  };
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
2
  "name": "@getpara/react-native-wallet",
3
3
  "description": "Para Wallet for React Native",
4
- "version": "2.18.1",
4
+ "version": "2.20.0",
5
5
  "author": "Para Team <hello@getpara.com> (https://getpara.com)",
6
6
  "dependencies": {
7
- "@getpara/core-sdk": "2.18.0",
8
- "@getpara/user-management-client": "2.18.0",
9
- "@getpara/viem-v2-integration": "2.18.0",
10
- "@getpara/web-sdk": "2.18.0",
7
+ "@getpara/core-sdk": "2.20.0",
8
+ "@getpara/react-core": "2.20.0",
9
+ "@getpara/user-management-client": "2.20.0",
10
+ "@getpara/viem-v2-integration": "2.20.0",
11
+ "@getpara/web-sdk": "2.20.0",
11
12
  "@peculiar/webcrypto": "^1.5.0",
12
13
  "@ungap/structured-clone": "1.3.0",
13
- "readable-stream": "^4.5.2",
14
14
  "react-native-url-polyfill": "2.0.0",
15
+ "readable-stream": "^4.5.2",
15
16
  "text-encoding": "0.7.0"
16
17
  },
17
18
  "devDependencies": {
@@ -23,9 +24,9 @@
23
24
  "@types/text-encoding": "0.0.39",
24
25
  "react-native-keychain": "^10.0.0",
25
26
  "react-native-modpow": "^1.1.0",
27
+ "react-native-nitro-modules": "^0.29.1",
26
28
  "react-native-passkey": "^3.1.0",
27
29
  "react-native-quick-base64": "^2.2.0",
28
- "react-native-nitro-modules": "^0.29.1",
29
30
  "react-native-quick-crypto": "^1.0.0",
30
31
  "typescript": "^5.8.3"
31
32
  },
@@ -47,8 +48,7 @@
47
48
  "android",
48
49
  "cpp",
49
50
  "*.podspec",
50
- "signer.xcframework",
51
- "signer.aar"
51
+ "signer.xcframework"
52
52
  ],
53
53
  "homepage": "https://getpara.com",
54
54
  "main": "./dist/index.js",
@@ -56,6 +56,7 @@
56
56
  "peerDependencies": {
57
57
  "@craftzdog/react-native-buffer": ">=6.0.0",
58
58
  "@react-native-async-storage/async-storage": ">=2.0.0",
59
+ "@tanstack/react-query": ">=5",
59
60
  "react": ">=18",
60
61
  "react-native": ">=0.70.0",
61
62
  "react-native-keychain": ">=8.0.0",
@@ -94,5 +95,6 @@
94
95
  "./dist/index.d.ts"
95
96
  ]
96
97
  }
97
- }
98
+ },
99
+ "gitHead": "a8443bcc4018864f5e582f238ade1bb3b4e121f4"
98
100
  }
package/src/index.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  export * from '@getpara/web-sdk';
2
2
  export { ParaMobile } from './react-native/ParaMobile.js';
3
3
 
4
- // Smart Account types, errors, utilities re-exported from viem-v2-integration/aa
5
- export * from '@getpara/viem-v2-integration/aa';
4
+ // Smart Account types type-only re-export so Metro doesn't bundle viem for non-AA users
5
+ export type * from '@getpara/viem-v2-integration/aa';
6
+
7
+ // React Native provider (wraps ParaProviderCore with AsyncStorage persistence)
8
+ export * from './provider/index.js';
9
+
10
+ // Core provider hooks and config types — platform-agnostic, work with any ParaCore subclass
11
+ export * from '@getpara/react-core';
@@ -0,0 +1,51 @@
1
+ import { useMemo } from 'react';
2
+ import {
3
+ ParaProviderCore,
4
+ type ParaProviderCoreProps,
5
+ type ParaClientConfig,
6
+ type ParaClientConfigWithFactory,
7
+ } from '@getpara/react-core/internal';
8
+ import { asyncStorageAdapter } from './asyncStorageAdapter.js';
9
+ import { ParaMobile } from '../react-native/ParaMobile.js';
10
+
11
+ /**
12
+ * RN provider props. Same as ParaProviderCoreProps but:
13
+ * - Defaults to ParaMobile
14
+ * - paraClientConfig accepts a simple { apiKey, env?, opts? } config (no createClient needed)
15
+ * - storageAdapter defaults to AsyncStorage
16
+ * - Omits configureClient, waitForReady, store (internal concerns)
17
+ */
18
+ export type ParaProviderProps = Omit<
19
+ ParaProviderCoreProps<ParaMobile>,
20
+ 'paraClientConfig' | 'configureClient' | 'waitForReady' | 'store'
21
+ > & {
22
+ /** A pre-instantiated ParaMobile, or a config with apiKey + optional env/opts. */
23
+ paraClientConfig: ParaMobile | ParaClientConfig;
24
+ };
25
+
26
+ /**
27
+ * React Native Para provider. Wraps ParaProviderCore with AsyncStorage-backed
28
+ * persistence by default. Accepts either a ParaMobile instance or a simple
29
+ * `{ apiKey, env?, opts? }` config — the provider creates the client internally.
30
+ */
31
+ export function ParaProvider({
32
+ children,
33
+ paraClientConfig: paraClientInput,
34
+ config,
35
+ callbacks,
36
+ storageAdapter = asyncStorageAdapter,
37
+ }: ParaProviderProps) {
38
+ const coreInput = useMemo<ParaMobile | ParaClientConfigWithFactory<ParaMobile>>(() => {
39
+ if (paraClientInput instanceof ParaMobile) return paraClientInput;
40
+ return {
41
+ ...paraClientInput,
42
+ createClient: (apiKey, env, opts) => new ParaMobile(apiKey, env, opts),
43
+ };
44
+ }, [paraClientInput]);
45
+
46
+ return (
47
+ <ParaProviderCore paraClientConfig={coreInput} config={config} callbacks={callbacks} storageAdapter={storageAdapter}>
48
+ {children}
49
+ </ParaProviderCore>
50
+ );
51
+ }
@@ -0,0 +1,31 @@
1
+ import type { ParaStorageAdapter } from '@getpara/react-core';
2
+ import RNAsyncStorage from '@react-native-async-storage/async-storage';
3
+
4
+ /**
5
+ * ParaStorageAdapter backed by React Native AsyncStorage.
6
+ * Used by the core Zustand store for state persistence.
7
+ */
8
+ export const asyncStorageAdapter: ParaStorageAdapter = {
9
+ getItem: async (key: string) => {
10
+ try {
11
+ return await RNAsyncStorage.getItem(key);
12
+ } catch (error) {
13
+ console.warn('[Para] Error reading from AsyncStorage:', error);
14
+ return null;
15
+ }
16
+ },
17
+ setItem: async (key: string, value: string) => {
18
+ try {
19
+ await RNAsyncStorage.setItem(key, value);
20
+ } catch (error) {
21
+ console.warn(`[Para] Error writing to AsyncStorage (key: ${key}):`, error);
22
+ }
23
+ },
24
+ removeItem: async (key: string) => {
25
+ try {
26
+ await RNAsyncStorage.removeItem(key);
27
+ } catch (error) {
28
+ console.warn(`[Para] Error removing from AsyncStorage (key: ${key}):`, error);
29
+ }
30
+ },
31
+ };
@@ -0,0 +1,2 @@
1
+ export { ParaProvider, type ParaProviderProps } from './ParaProvider.js';
2
+ export { asyncStorageAdapter } from './asyncStorageAdapter.js';
@@ -1,6 +1,4 @@
1
- import { PlatformUtils, TPregenIdentifierType, EventHandler, EventData } from '@getpara/web-sdk';
2
- import { Ctx } from '@getpara/web-sdk';
3
- import { SignatureRes } from '@getpara/web-sdk';
1
+ import type { PlatformUtils, TPregenIdentifierType, EventHandler, EventData, Ctx, SignatureRes } from '@getpara/web-sdk';
4
2
  import { BackupKitEmailProps, KeyShareType, TWalletType, SDKType } from '@getpara/user-management-client';
5
3
  import { NativeModules } from 'react-native';
6
4
 
@@ -273,13 +271,14 @@ export class ReactNativeUtils implements PlatformUtils {
273
271
  userId: string,
274
272
  _sessionCookie: string,
275
273
  _emailProps?: BackupKitEmailProps,
274
+ type?: TWalletType,
276
275
  ): Promise<{
277
276
  signer: string;
278
277
  walletId: string;
279
278
  }> {
280
279
  const { walletId, protocolId } = await ctx.client.createWallet(userId, {
281
280
  scheme: 'ED25519',
282
- type: 'SOLANA',
281
+ type: type ?? 'SOLANA',
283
282
  });
284
283
 
285
284
  const signer = await ParaSignerModule.ed25519CreateAccount(walletId, protocolId);
@@ -291,6 +290,7 @@ export class ReactNativeUtils implements PlatformUtils {
291
290
  pregenIdentifier: string,
292
291
  pregenIdentifierType: TPregenIdentifierType,
293
292
  _sessionCookie: string,
293
+ type?: TWalletType,
294
294
  ): Promise<{
295
295
  signer: string;
296
296
  walletId: string;
@@ -299,7 +299,7 @@ export class ReactNativeUtils implements PlatformUtils {
299
299
  pregenIdentifier,
300
300
  pregenIdentifierType,
301
301
  scheme: 'ED25519',
302
- type: 'SOLANA',
302
+ type: type ?? 'SOLANA',
303
303
  });
304
304
 
305
305
  const signer = await ParaSignerModule.ed25519CreateAccount(walletId, protocolId);