@getpara/solana-wallet-connectors 2.0.0-alpha.26 → 2.0.0-alpha.28

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
@@ -4,3 +4,4 @@ export { ParaSolanaProvider } from './providers/ParaSolanaProvider.js';
4
4
  export type { ParaSolanaProviderConfig, ParaSolanaProviderProps } from './providers/ParaSolanaProvider.js';
5
5
  export * from './wallets/connectors/index.js';
6
6
  export type { WalletList } from './types/Wallet.js';
7
+ export type { Adapter } from '@solana/wallet-adapter-base';
@@ -1,7 +1,8 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { CreateWalletFn } from '../types/Wallet.js';
3
3
  import { ExternalWalletContextType, ExternalWalletProviderConfig, ExternalWalletProviderConfigBase } from '@getpara/react-common';
4
- export type SolanaExternalWalletContextType = ExternalWalletContextType;
4
+ import { TExternalHooks } from './externalHooks.js';
5
+ export type SolanaExternalWalletContextType = ExternalWalletContextType & TExternalHooks;
5
6
  export declare const SolanaExternalWalletContext: import("react").Context<SolanaExternalWalletContextType>;
6
7
  export type SolanaExternalWalletProviderConfig = ExternalWalletProviderConfigBase;
7
8
  type SolanaExternalWalletProviderConfigFull = ExternalWalletProviderConfig<CreateWalletFn>;
@@ -43,6 +43,7 @@ import {
43
43
  defaultSolanaExternalWallet
44
44
  } from "@getpara/react-common";
45
45
  import bs58 from "bs58";
46
+ import { externalHooks } from "./externalHooks.js";
46
47
  const SolanaExternalWalletContext = createContext(defaultSolanaExternalWallet);
47
48
  function SolanaExternalWalletProvider({
48
49
  children,
@@ -302,7 +303,7 @@ function SolanaExternalWalletProvider({
302
303
  SolanaExternalWalletContext.Provider,
303
304
  {
304
305
  value: useMemo(
305
- () => ({ wallets, disconnect, signMessage, signVerificationMessage, requestInfo, disconnectBase }),
306
+ () => __spreadValues({ wallets, disconnect, signMessage, signVerificationMessage, requestInfo, disconnectBase }, externalHooks),
306
307
  [wallets, disconnect, signMessage, signVerificationMessage, requestInfo, disconnectBase]
307
308
  ),
308
309
  children
@@ -0,0 +1,7 @@
1
+ import { useWallet } from '@solana/wallet-adapter-react';
2
+ export type TExternalHooks = {
3
+ useWallet: typeof useWallet;
4
+ };
5
+ export declare const externalHooks: {
6
+ useWallet: typeof useWallet;
7
+ };
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import { useWallet } from "@solana/wallet-adapter-react";
3
+ const externalHooks = { useWallet };
4
+ export {
5
+ externalHooks
6
+ };
package/package.json CHANGED
@@ -1,39 +1,43 @@
1
1
  {
2
2
  "name": "@getpara/solana-wallet-connectors",
3
- "version": "2.0.0-alpha.26",
4
- "type": "module",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": "./dist/index.js",
9
- "./connectors": "./dist/wallets/connectors/index.js"
10
- },
11
- "scripts": {
12
- "build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs",
13
- "typegen": "tsc --emitDeclarationOnly",
14
- "test": "vitest run --coverage"
15
- },
3
+ "version": "2.0.0-alpha.28",
16
4
  "dependencies": {
17
- "@getpara/web-sdk": "2.0.0-alpha.26",
18
- "@solana-mobile/wallet-adapter-mobile": "2.2.0",
19
- "@solana/wallet-adapter-base": "0.9.27",
20
- "@solana/wallet-adapter-react": "0.15.39",
21
- "@solana/wallet-adapter-walletconnect": "0.1.21",
5
+ "@getpara/react-common": "2.0.0-alpha.28",
6
+ "@getpara/web-sdk": "2.0.0-alpha.28",
22
7
  "bs58": "6.0.0"
23
8
  },
24
9
  "devDependencies": {
25
- "@getpara/react-common": "2.0.0-alpha.26",
10
+ "@solana-mobile/wallet-adapter-mobile": "^2.2.0",
11
+ "@solana/wallet-adapter-base": "^0.9.27",
12
+ "@solana/wallet-adapter-react": "^0.15.39",
13
+ "@solana/wallet-adapter-walletconnect": "^0.1.21",
26
14
  "@types/react": "^18.0.31",
27
15
  "@types/react-dom": "^18.2.7",
28
- "typescript": "^5.4.3"
16
+ "typescript": "^5.8.3"
29
17
  },
30
- "peerDependencies": {
31
- "react": ">=18",
32
- "react-dom": ">=18"
18
+ "exports": {
19
+ ".": "./dist/index.js",
20
+ "./connectors": "./dist/wallets/connectors/index.js"
33
21
  },
34
22
  "files": [
35
23
  "dist",
36
24
  "package.json"
37
25
  ],
38
- "gitHead": "c97be88dd7414041f25d6f4b9758ea26dcfb2694"
26
+ "gitHead": "1da9f8663f58015a70686f45741fb76ddc671ac7",
27
+ "main": "dist/index.js",
28
+ "peerDependencies": {
29
+ "@solana-mobile/wallet-adapter-mobile": "2.x",
30
+ "@solana/wallet-adapter-base": "0.x",
31
+ "@solana/wallet-adapter-react": "0.x",
32
+ "@solana/wallet-adapter-walletconnect": "0.x",
33
+ "react": ">=18",
34
+ "react-dom": ">=18"
35
+ },
36
+ "scripts": {
37
+ "build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs",
38
+ "test": "vitest run --coverage",
39
+ "typegen": "tsc --emitDeclarationOnly"
40
+ },
41
+ "type": "module",
42
+ "types": "dist/index.d.ts"
39
43
  }