@getpara/cosmos-wallet-connectors 2.0.0-alpha.27 → 2.0.0-alpha.29

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 { ParaCosmosProvider } from './providers/ParaCosmosContext.js';
4
4
  export type { ParaCosmosProviderProps, ParaGrazProviderProps, ParaCosmosProviderConfig, } from './providers/ParaCosmosContext.js';
5
5
  export * from './wallets/connectors/index.js';
6
6
  export type { WalletList } from './types/Wallet.js';
7
+ export type * from './types/ExternalHooks.js';
@@ -2,12 +2,13 @@ import { PropsWithChildren } from 'react';
2
2
  import { ParaCosmosProviderConfig } from './ParaCosmosContext.js';
3
3
  import { WalletWithType } from '../types/Wallet.js';
4
4
  import { type ChainManagement, type ConnectParaEmbedded, type ExternalWalletContextType, type ExternalWalletProviderConfig, type ExternalWalletProviderConfigBase, type SignResult } from '@getpara/react-common';
5
+ import { TExternalHooks } from './externalHooks.js';
5
6
  export type CosmosSignResult = SignResult & {
6
7
  cosmosPublicKeyHex?: string;
7
8
  cosmosSigner?: string;
8
9
  addressBech32?: string;
9
10
  };
10
- export type CosmosExternalWalletContextType = ExternalWalletContextType<CosmosSignResult> & ChainManagement<string> & ConnectParaEmbedded;
11
+ export type CosmosExternalWalletContextType = ExternalWalletContextType<CosmosSignResult> & ChainManagement<string> & TExternalHooks & ConnectParaEmbedded;
11
12
  export type CosmosExternalWalletProviderConfig = ExternalWalletProviderConfigBase;
12
13
  export type CosmosExternalWalletProviderConfigFull = ExternalWalletProviderConfig<WalletWithType, Omit<ParaCosmosProviderConfig, 'wallets'>>;
13
14
  export declare const CosmosExternalWalletContext: import("react").Context<CosmosExternalWalletContextType>;
@@ -23,6 +23,7 @@ import {
23
23
  defaultCosmosExternalWallet
24
24
  } from "@getpara/react-common";
25
25
  import { formatEthHexAddress } from "../utils/formatEthHexAddress.js";
26
+ import { externalHooks } from "./externalHooks.js";
26
27
  const CosmosExternalWalletContext = createContext(defaultCosmosExternalWallet);
27
28
  function CosmosExternalWalletProvider({
28
29
  children,
@@ -336,7 +337,7 @@ function CosmosExternalWalletProvider({
336
337
  CosmosExternalWalletContext.Provider,
337
338
  {
338
339
  value: useMemo(
339
- () => ({
340
+ () => __spreadValues({
340
341
  wallets,
341
342
  chains: formattedChains,
342
343
  chainId: selectedChainId,
@@ -347,7 +348,7 @@ function CosmosExternalWalletProvider({
347
348
  signVerificationMessage,
348
349
  requestInfo,
349
350
  disconnectBase
350
- }),
351
+ }, externalHooks),
351
352
  [
352
353
  wallets,
353
354
  formattedChains,
@@ -0,0 +1,8 @@
1
+ import { useAccount } from '@getpara/graz';
2
+ import { MultiChainHookArgs } from '../types/ExternalHooks.js';
3
+ export type TExternalHooks = {
4
+ useAccount: typeof useAccount<MultiChainHookArgs>;
5
+ };
6
+ export declare const externalHooks: {
7
+ useAccount: typeof useAccount;
8
+ };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import "../chunk-IV3L3JVM.js";
3
+ import { useAccount } from "@getpara/graz";
4
+ const externalHooks = { useAccount };
5
+ export {
6
+ externalHooks
7
+ };
@@ -0,0 +1,8 @@
1
+ import { UseAccountArgs } from '@getpara/graz';
2
+ type ChainId$1 = string | string[];
3
+ export interface MultiChainHookArgs {
4
+ chainId?: ChainId$1;
5
+ multiChain?: boolean;
6
+ }
7
+ export type UseAccountParameters = UseAccountArgs & MultiChainHookArgs;
8
+ export {};
@@ -0,0 +1 @@
1
+ "use client";
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@getpara/cosmos-wallet-connectors",
3
- "version": "2.0.0-alpha.27",
3
+ "version": "2.0.0-alpha.29",
4
4
  "dependencies": {
5
5
  "@getpara/graz": "2.0.0-alpha.3",
6
- "@getpara/react-common": "2.0.0-alpha.27",
7
- "@getpara/web-sdk": "2.0.0-alpha.27",
6
+ "@getpara/react-common": "2.0.0-alpha.29",
7
+ "@getpara/web-sdk": "2.0.0-alpha.29",
8
8
  "@leapwallet/cosmos-social-login-capsule-provider": "^0.0.41",
9
9
  "starknet": "^6.11.0",
10
10
  "zustand": "^4.5.2",
@@ -24,7 +24,7 @@
24
24
  "dist",
25
25
  "package.json"
26
26
  ],
27
- "gitHead": "a54f63445995abd13220eda3d63809728e4b5f7e",
27
+ "gitHead": "7b90cb5a1a83f9bce9d61bd2baf190c47b58b705",
28
28
  "main": "dist/index.js",
29
29
  "peerDependencies": {
30
30
  "@getpara/graz": "2.0.0-alpha.3",