@bluxcc/react 0.1.0 → 0.1.2

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.
Files changed (70) hide show
  1. package/LICENSE +80 -0
  2. package/README.md +101 -1
  3. package/dist/assets/Icons.d.ts +12 -1
  4. package/dist/assets/bluxLogo.d.ts +3 -1
  5. package/dist/assets/logos.d.ts +6 -1
  6. package/dist/chains.d.ts +8 -0
  7. package/dist/components/Button/buttonVariants.d.ts +2 -2
  8. package/dist/components/Button/index.d.ts +13 -6
  9. package/dist/components/CardItem/index.d.ts +10 -0
  10. package/dist/components/Input/OTPInput.d.ts +3 -0
  11. package/dist/components/Input/index.d.ts +16 -0
  12. package/dist/components/Modal/Header/index.d.ts +3 -3
  13. package/dist/components/Modal/index.d.ts +3 -4
  14. package/dist/components/Transaction/History/index.d.ts +10 -0
  15. package/dist/components/Transaction/Summery/index.d.ts +9 -0
  16. package/dist/constants/index.d.ts +6 -2
  17. package/dist/containers/BluxModal/content.d.ts +11 -0
  18. package/dist/containers/BluxModal/index.d.ts +7 -0
  19. package/dist/containers/ConnectModal/content.d.ts +11 -0
  20. package/dist/containers/ConnectModal/index.d.ts +2 -1
  21. package/dist/containers/Pages/Activity/index.d.ts +3 -0
  22. package/dist/containers/Pages/ConfirmCode/index.d.ts +3 -0
  23. package/dist/containers/Pages/OnBoarding/index.d.ts +7 -0
  24. package/dist/containers/Pages/Profile/index.d.ts +3 -0
  25. package/dist/containers/Pages/Send/index.d.ts +3 -0
  26. package/dist/containers/Pages/SignTransaction/index.d.ts +3 -0
  27. package/dist/containers/Pages/Successful/index.d.ts +3 -0
  28. package/dist/containers/Pages/Waiting/index.d.ts +3 -0
  29. package/dist/context/provider.d.ts +1 -1
  30. package/dist/hooks/useAccount.d.ts +12 -0
  31. package/dist/hooks/useBlux.d.ts +4 -2
  32. package/dist/hooks/useGoogleFont.d.ts +1 -4
  33. package/dist/index.cjs.js +1406 -0
  34. package/dist/index.cjs.js.map +1 -0
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.esm.js +1399 -1
  37. package/dist/index.esm.js.map +1 -1
  38. package/dist/types/index.d.ts +95 -23
  39. package/dist/useStellar/index.d.ts +2 -0
  40. package/dist/useStellar/useBalance.d.ts +8 -0
  41. package/dist/utils/BN.d.ts +3 -0
  42. package/dist/utils/capitalizeFirstLetter.d.ts +2 -0
  43. package/dist/utils/getBorderRadius.d.ts +2 -1
  44. package/dist/utils/getContrastColor.d.ts +2 -0
  45. package/dist/utils/getHorizonServer.d.ts +6 -0
  46. package/dist/utils/getInitialHeight.d.ts +2 -0
  47. package/dist/utils/getNetworkByPassphrase.d.ts +1 -0
  48. package/dist/utils/getNetworkPassphrase.d.ts +1 -0
  49. package/dist/utils/getTransactionDetails.d.ts +6 -0
  50. package/dist/utils/handleIcons.d.ts +2 -1
  51. package/dist/utils/handleLogos.d.ts +3 -0
  52. package/dist/utils/humanizeAmount.d.ts +3 -0
  53. package/dist/utils/initializeRabetMobile.d.ts +2 -1
  54. package/dist/utils/mappedWallets.d.ts +6 -3
  55. package/dist/utils/signTransactionHandler.d.ts +3 -0
  56. package/dist/utils/stellar/getExplorerUrl.d.ts +2 -0
  57. package/dist/utils/stellar/getNetworkByPassphrase.d.ts +2 -0
  58. package/dist/utils/stellar/getNetworkPassphrase.d.ts +2 -0
  59. package/dist/utils/stellar/getStellarServer.d.ts +6 -0
  60. package/dist/utils/stellar/getTransactionDetails.d.ts +7 -0
  61. package/dist/utils/stellar/signTransaction.d.ts +3 -0
  62. package/dist/utils/stellar/submitTransaction.d.ts +3 -0
  63. package/dist/utils/submitTransaction.d.ts +2 -0
  64. package/dist/wallets/configs/albedoConfig.d.ts +2 -2
  65. package/dist/wallets/configs/freighterConfig.d.ts +2 -2
  66. package/dist/wallets/configs/lobstrConfig.d.ts +2 -2
  67. package/dist/wallets/configs/rabetConfig.d.ts +2 -2
  68. package/dist/wallets/configs/xbullConfig.d.ts +2 -2
  69. package/dist/wallets/walletsConfig.d.ts +2 -2
  70. package/package.json +9 -16
package/LICENSE ADDED
@@ -0,0 +1,80 @@
1
+ Business Source License 1.1
2
+
3
+ License text copyright (c) 2025 Blux Team, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB Corporation Ab.
5
+
6
+ -----------------------------------------------------------------------------
7
+
8
+ Parameters
9
+
10
+ Licensor: Blux Team
11
+
12
+ Licensed Work: Blux Kit
13
+ The Licensed Work is (c) 2025 Blux Team
14
+
15
+ Additional Use Grant: None
16
+
17
+ Change Date: The earlier of 2028-02-05 or a date specified by the Licensor.
18
+
19
+ Change License: GNU Affero General Public License v3.0 (AGPL-3.0)
20
+
21
+ -----------------------------------------------------------------------------
22
+
23
+ Terms
24
+
25
+ 1. Grant of Rights
26
+ The Licensor grants you the right to modify, create derivative works, and contribute changes to the Licensed Work through official channels (e.g., pull requests).
27
+
28
+ 2. Copying and Redistribution Restriction
29
+ You may not copy, redistribute, or publicly share the Licensed Work in any form. The Licensed Work may only be used within the scope of contribution to the official repository.
30
+
31
+ 3. Production Use Restriction
32
+ Production use is strictly prohibited before the Change Date.
33
+ For the purposes of this License, "Production Use" means any deployment of the Licensed Work that:
34
+ - Provides services to third parties (commercial or non-commercial).
35
+ - Generates revenue, directly or indirectly.
36
+ - Supports business operations in any capacity, including internal use.
37
+
38
+ If you wish to use the Licensed Work in production before the Change Date, you must obtain a commercial license from the Licensor at support@blux.cc.
39
+
40
+ 4. Derivative Works and Contributions
41
+ - You may not modify or remove references to "Blux Team" in any derivative works, copies, or modified versions of the Licensed Work.
42
+ - Any modifications must be submitted as pull requests to the official repository.
43
+
44
+ 5. Change License and Change Date
45
+ - On the Change Date, or the fourth anniversary of a specific version’s first public distribution, whichever comes first, this License terminates, and the Licensed Work will be available under the Change License (AGPL-3.0).
46
+ - Only the latest version of the Licensed Work at the Change Date will be subject to AGPL-3.0.
47
+ - The Licensor reserves the right to extend the Change Date for future versions of the Licensed Work.
48
+
49
+ 6. License Compliance and Enforcement
50
+ - If your use of the Licensed Work does not comply with the requirements of this License, your rights to use all versions of the Licensed Work terminate immediately.
51
+ - Violations may result in legal action, including but not limited to seeking injunctive relief and damages.
52
+
53
+ 7. Trademark and Branding
54
+ - This License does not grant any rights to use the "Blux Team" name, logo, or trademarks, except where expressly required by this License.
55
+
56
+ 8. Warranty Disclaimer
57
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED "AS IS" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
58
+
59
+ MariaDB hereby grants you permission to use this License’s text to license
60
+ your works, and to refer to it using the trademark "Business Source License",
61
+ as long as you comply with the Covenants of Licensor below.
62
+
63
+ -----------------------------------------------------------------------------
64
+
65
+ Covenants of Licensor
66
+ In consideration of the right to use this License’s text and the "Business
67
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
68
+ other recipients of the licensed work to be provided by Licensor:
69
+
70
+ 1. Use GNU Affero General Public License Version 3.0 (AGPL-3.0) or a later version as the Change License.
71
+ 2. Either specify an Additional Use Grant that does not impose additional restrictions, or insert "None".
72
+ 3. Specify a Change Date for each version.
73
+ 4. Provide commercial or special-use licenses upon request at support@blux.cc.
74
+ 5. Not modify this License in any way that conflicts with the above terms.
75
+
76
+ -----------------------------------------------------------------------------
77
+
78
+ Notice
79
+ The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
80
+
package/README.md CHANGED
@@ -1 +1,101 @@
1
- # Blux
1
+ # Blux Wallet Kit - The Missing Piece for Stellar dApps
2
+
3
+ Blux is a **comprehensive authentication and wallet connect kit** designed for Stellar dApps. It simplifies onboarding by integrating multiple authentication methods, including **wallets, email, phone, and OAuth**. With Blux, developers can create seamless multi-auth experiences without the complexity of building custom authentication solutions from scratch.
4
+
5
+ ## Features
6
+
7
+ - **Multi-Wallet Support**: Easily integrate Stellar wallets such as **Rabet, xBull, Lobstr, Freighter, and Albedo**.
8
+ - **OAuth & Social Login** *(Coming Soon)*: Support for **Apple, Meta, Google, and more**.
9
+ - **Email & Phone Authentication** *(Coming Soon)*: Securely onboard users with non-crypto credentials.
10
+ - **Customizable UI**: Adjust themes, fonts, backgrounds, logos, cover images, corner radius, and text colors.
11
+ - **Configurable Networks**: Set up and modify network preferences via API keys.
12
+ - **Future-Proof**: More wallets and authentication methods will be added based on community feedback.
13
+
14
+ ## Installation
15
+
16
+ Blux can be installed via npm:
17
+
18
+ ```sh
19
+ npm i @bluxcc/react
20
+ ```
21
+
22
+ or using yarn:
23
+
24
+ ```sh
25
+ yarn add @bluxcc/react
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ Import Blux and set up the authentication flow:
31
+
32
+ ```tsx
33
+ import { BluxProvider, useBlux } from "@bluxcc/react";
34
+
35
+ const ConnectButton = () => {
36
+ const { connect } = useBlux();
37
+ return <button onClick={connect}>Connect Wallet</button>;
38
+ };
39
+
40
+ const App = () => {
41
+ return (
42
+ <BluxProvider config={{ appName: "YourApp", network: "testnet" }}>
43
+ <ConnectButton />
44
+ </BluxProvider>
45
+ );
46
+ };
47
+
48
+ export default App;
49
+ ```
50
+
51
+ ## Customization
52
+
53
+ Developers can customize various UI elements:
54
+
55
+ - **Themes & Fonts**
56
+ - **Backgrounds, Logos, and Cover Images**
57
+ - **Corner Radius & Text Colors**
58
+ - **Authentication Limits** (Free tier supports 500-1000 accounts per auth method)
59
+
60
+ Configuration options can be set via the `BluxProvider` config or environment variables.
61
+
62
+ ## Supported Wallets
63
+
64
+ Currently supported connection methods:
65
+
66
+ - [x] **Rabet**
67
+ - [x] **xBull**
68
+ - [x] **Lobstr**
69
+ - [x] **Freighter**
70
+ - [x] **Albedo**
71
+ - [ ] **Ledger**
72
+ - [ ] **Trezor**
73
+ - [ ] **Hana**
74
+ - [ ] **WalletConnect**
75
+ - [ ] **OAuth**
76
+ - [ ] **Email**
77
+ - [ ] **Phone**
78
+
79
+ ## License & Usage Restrictions
80
+
81
+ - **No Production Use Until 2028**: This software is provided under the **Blux Team License** with restrictions on production use.
82
+ - **No Forking or Unauthorized Modifications**: Removing references to **Blux Team** or forking without attribution is strictly prohibited.
83
+ - **Custom Licensing Available**: Contact us at [support@blux.cc](mailto:support@blux.cc) to discuss licensing options.
84
+
85
+ ## Support & Contact
86
+
87
+ For support, licensing, or inquiries, reach out via:
88
+
89
+ - **Email**: [support@blux.cc](mailto:support@blux.cc)
90
+ - **X (Twitter)**: [@BluxOfficial](https://twitter.com/BluxOfficial)
91
+
92
+ ## Roadmap & Future Plans
93
+
94
+ Blux is evolving. Follow our updates on [X (Twitter)](https://twitter.com/BluxOfficial) for:
95
+
96
+ - **OAuth Authentication (Apple, Meta, Google, etc.)**
97
+ - **Email & Phone-Based Authentication**
98
+ - **More Wallet Integrations**
99
+ - **Enhanced Customization & Security Features**
100
+
101
+ Stay tuned. We have many exciting developments ahead!
@@ -1,6 +1,17 @@
1
1
  import React from 'react';
2
- export declare const InfoIcon: () => React.JSX.Element;
2
+ export declare const InfoIcon: ({ fill }: {
3
+ fill?: string;
4
+ }) => React.JSX.Element;
3
5
  export declare const ArrowRight: () => React.JSX.Element;
4
6
  export declare const ArrowLeft: () => React.JSX.Element;
5
7
  export declare const Close: () => React.JSX.Element;
6
8
  export declare const Loading: () => React.JSX.Element;
9
+ export declare const GreenCheck: () => React.JSX.Element;
10
+ export declare const LogOut: () => React.JSX.Element;
11
+ export declare const Copy: () => React.JSX.Element;
12
+ export declare const History: () => React.JSX.Element;
13
+ export declare const Send: () => React.JSX.Element;
14
+ export declare const ArrowDropUp: () => React.JSX.Element;
15
+ export declare const RedAlert: () => React.JSX.Element;
16
+ export declare const Upstream: () => React.JSX.Element;
17
+ export declare const Globe: () => React.JSX.Element;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- declare const BluxLogo: () => React.JSX.Element;
2
+ declare const BluxLogo: ({ fill }: {
3
+ fill?: string;
4
+ }) => React.JSX.Element;
3
5
  export default BluxLogo;
@@ -4,4 +4,9 @@ export declare const RabetIcon: () => React.JSX.Element;
4
4
  export declare const FreighterIcon: () => React.JSX.Element;
5
5
  export declare const XBullIcon: () => React.JSX.Element;
6
6
  export declare const LobstrIcon: () => React.JSX.Element;
7
- export declare const StellarIcon: () => React.JSX.Element;
7
+ export declare const StellarIcon: ({ fill }: {
8
+ fill?: string;
9
+ }) => React.JSX.Element;
10
+ export declare const StellarSmallIcon: ({ fill }: {
11
+ fill?: string;
12
+ }) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Networks } from "@stellar/stellar-sdk";
2
+ export declare const chains: {
3
+ mainnet: Networks;
4
+ testnet: Networks;
5
+ sandbox: Networks;
6
+ futurenet: Networks;
7
+ standalone: Networks;
8
+ };
@@ -4,6 +4,6 @@ interface IconButtonProps extends ButtonProps {
4
4
  icon: React.ReactNode;
5
5
  name: string;
6
6
  }
7
- export declare const ButtonWithIcon: React.FC<IconButtonProps>;
8
- export declare const ButtonWithIconAndArrow: React.FC<IconButtonProps>;
7
+ export declare const ButtonWithIcon: ({ icon, name, ...props }: IconButtonProps) => React.JSX.Element;
8
+ export declare const ButtonWithIconAndArrow: ({ icon, name, ...props }: IconButtonProps) => React.JSX.Element;
9
9
  export {};
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
- export type ButtonProps = {
3
- name?: string;
2
+ type ButtonSize = 'small' | 'medium' | 'large';
3
+ type ButtonVariant = 'outline' | 'text' | 'fill';
4
+ type ButtonState = 'enabled' | 'disabled' | 'selected';
5
+ interface ButtonProps {
6
+ size?: ButtonSize;
7
+ variant?: ButtonVariant;
8
+ state?: ButtonState;
9
+ children: React.ReactNode;
10
+ startIcon?: React.ReactNode;
11
+ endIcon?: React.ReactNode;
4
12
  onClick?: () => void;
5
- children?: React.ReactNode;
13
+ style?: React.CSSProperties;
6
14
  className?: string;
7
- disabled?: boolean;
8
- };
9
- declare const Button: ({ onClick, className, disabled, children }: ButtonProps) => React.JSX.Element;
15
+ }
16
+ declare const Button: ({ size, variant, state, children, startIcon, endIcon, onClick, style, className, }: ButtonProps) => React.JSX.Element;
10
17
  export default Button;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type CardItemProps = {
3
+ variant?: 'social' | 'default';
4
+ startIcon: React.ReactNode;
5
+ endArrow?: boolean;
6
+ label: string;
7
+ onClick?: () => void;
8
+ };
9
+ declare const CardItem: React.FC<CardItemProps>;
10
+ export default CardItem;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const OTPInput: React.FC;
3
+ export default OTPInput;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ type InputFieldProps = {
3
+ label?: string;
4
+ placeholder?: string;
5
+ error?: boolean;
6
+ helperText?: string;
7
+ iconRight?: React.ReactNode;
8
+ iconLeft?: React.ReactNode;
9
+ button?: string | React.ReactNode;
10
+ onButtonClick?: () => void;
11
+ value?: string;
12
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ customLabel?: React.ReactNode;
14
+ };
15
+ declare const InputField: ({ label, placeholder, error, helperText, iconRight, iconLeft, button, onButtonClick, customLabel, value, onChange, }: InputFieldProps) => React.JSX.Element;
16
+ export default InputField;
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  interface HeaderProps {
3
- icon: 'info' | 'back';
3
+ icon?: 'info' | 'back';
4
4
  onInfo?: () => void;
5
5
  onBack?: () => void;
6
- modalHeader: string;
6
+ title: string;
7
7
  closeButton?: boolean;
8
8
  onClose: () => void;
9
9
  }
10
- declare const ModalHeader: React.FC<HeaderProps>;
10
+ declare const ModalHeader: ({ icon, onInfo, onBack, title, closeButton, onClose, }: HeaderProps) => React.JSX.Element;
11
11
  export default ModalHeader;
@@ -1,15 +1,14 @@
1
1
  import React from 'react';
2
2
  interface ModalProps {
3
3
  isOpen: boolean;
4
- className?: string;
5
4
  onClose?: () => void;
6
5
  onBack?: () => void;
7
6
  children: React.ReactNode;
8
- icon: 'info' | 'back';
7
+ icon?: 'info' | 'back';
9
8
  onInfo?: () => void;
10
9
  closeButton?: boolean;
11
- modalHeader: string;
10
+ title: string;
12
11
  initialHeight: number;
13
12
  }
14
- declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, className, modalHeader, icon, initialHeight, closeButton, }: ModalProps) => React.JSX.Element | null;
13
+ declare const Modal: ({ isOpen, onClose, onBack, onInfo, children, title, icon, initialHeight, closeButton, }: ModalProps) => React.JSX.Element | null;
15
14
  export default Modal;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface TransactionProps {
3
+ amount: string;
4
+ date: string;
5
+ status: 'success' | 'failed' | string;
6
+ action: string;
7
+ hash: string;
8
+ }
9
+ declare const _default: React.MemoExoticComponent<({ amount, date, status, action, hash }: TransactionProps) => React.JSX.Element>;
10
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface SummaryProps {
3
+ operationsCount: number;
4
+ sender: string;
5
+ estimatedFee: string;
6
+ action: string;
7
+ }
8
+ declare const Summary: ({ operationsCount, sender, estimatedFee, action }: SummaryProps) => React.JSX.Element;
9
+ export default Summary;
@@ -1,5 +1,9 @@
1
1
  import { ModalHeights } from '../types';
2
+ import { IAppearance } from '../types';
2
3
  export declare const MODAL_HEIGHTS: ModalHeights;
3
- export declare const MODAL_CONFIG: {
4
- readonly defaultHeader: "Connect Wallet";
4
+ export declare const HORIZON_SERVERS: {
5
+ public: string;
6
+ testnet: string;
7
+ futurenet: string;
5
8
  };
9
+ export declare const defaultAppearance: IAppearance;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Routes } from '../../types';
3
+ interface ModalContentProps {
4
+ showAllWallets: boolean;
5
+ setShowAllWallets: (show: boolean) => void;
6
+ }
7
+ export declare const modalContent: Record<Routes, {
8
+ title: string;
9
+ Component: React.FC<ModalContentProps>;
10
+ }>;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface BluxModalProps {
3
+ isOpen: boolean;
4
+ closeModal: () => void;
5
+ }
6
+ export default function BluxModal({ isOpen, closeModal }: BluxModalProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Routes } from '../../types';
3
+ interface ModalContentProps {
4
+ showAllWallets: boolean;
5
+ setShowAllWallets: (show: boolean) => void;
6
+ }
7
+ export declare const modalContent: Record<Routes, {
8
+ title: string;
9
+ Component: React.FC<ModalContentProps>;
10
+ }>;
11
+ export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  interface ConnectModalProps {
3
3
  isOpen: boolean;
4
+ closeModal: () => void;
4
5
  }
5
- export default function ConnectModal({ isOpen }: ConnectModalProps): React.JSX.Element;
6
+ export default function ConnectModal({ isOpen, closeModal }: ConnectModalProps): React.JSX.Element;
6
7
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Activity: React.FC;
3
+ export default Activity;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ConfirmCode: () => React.JSX.Element;
3
+ export default ConfirmCode;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type OnBoardingProps = {
3
+ showAllWallets: boolean;
4
+ setShowAllWallets: (value: boolean) => void;
5
+ };
6
+ declare const OnBoarding: ({ showAllWallets, setShowAllWallets }: OnBoardingProps) => React.JSX.Element;
7
+ export default OnBoarding;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Profile: () => React.JSX.Element;
3
+ export default Profile;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Send: () => React.JSX.Element;
3
+ export default Send;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const SignTransaction: () => React.JSX.Element;
3
+ export default SignTransaction;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Successful: () => React.JSX.Element;
3
+ export default Successful;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const Waiting: () => React.JSX.Element;
3
+ export default Waiting;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { ContextState, IProviderConfig, IAppearance } from '../types';
3
3
  export declare const ProviderContext: React.Context<ContextState | null>;
4
- export declare const defaultAppearance: IAppearance;
5
4
  export declare const BluxProvider: ({ config, isDemo, appearance, children, }: {
6
5
  isDemo?: boolean;
7
6
  appearance?: IAppearance;
8
7
  config: IProviderConfig;
9
8
  children: React.ReactNode;
10
9
  }) => React.JSX.Element;
10
+ export declare const useProvider: () => ContextState;
@@ -0,0 +1,12 @@
1
+ import { AccountData } from '../types';
2
+ interface AccountHookResult {
3
+ account: AccountData | null;
4
+ loading: boolean;
5
+ error: string | null;
6
+ }
7
+ interface AccountHookProps {
8
+ publicKey: string;
9
+ passphrase: string;
10
+ }
11
+ declare const useAccount: ({ publicKey, passphrase }: AccountHookProps) => AccountHookResult;
12
+ export default useAccount;
@@ -1,6 +1,8 @@
1
1
  export declare const useBlux: () => {
2
- connect: () => Promise<void>;
3
- disconnect: () => Promise<void>;
2
+ connect: () => void;
3
+ disconnect: () => void;
4
+ profile: () => void;
5
+ signTransaction: (xdr: string) => Promise<unknown>;
4
6
  isReady: boolean;
5
7
  user: import("../types").IUser;
6
8
  isAuthenticated: boolean;
@@ -1,5 +1,2 @@
1
1
  import { SupportedFonts } from '../types';
2
- export declare function useGoogleFonts(): {
3
- selectedFont: SupportedFonts | null;
4
- setSelectedFont: import("react").Dispatch<import("react").SetStateAction<SupportedFonts | null>>;
5
- };
2
+ export declare function useGoogleFonts(): SupportedFonts;