@bluxcc/core 0.1.0 → 0.1.1
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/LICENSE +80 -0
- package/README.md +108 -0
- package/dist/assets/Logos.d.ts +4 -0
- package/dist/components/QRCode/index.d.ts +3 -2
- package/dist/enums.d.ts +7 -2
- package/dist/exports/blux.d.ts +8 -2
- package/dist/exports/createConfig.d.ts +3 -0
- package/dist/exports/index.d.ts +4 -1
- package/dist/index.cjs.js +35 -6
- package/dist/index.d.ts +144 -147
- package/dist/index.esm.js +35 -6
- package/dist/index.iife.js +42 -5
- package/dist/pages/Failed/index.d.ts +2 -0
- package/dist/pages/SignMessage/index.d.ts +1 -1
- package/dist/pages/Waiting/index.d.ts +1 -1
- package/dist/pages/WalletConnect/index.d.ts +2 -0
- package/dist/stellar/handleSignMessage.d.ts +3 -0
- package/dist/stellar/handleTransactionSigning.d.ts +1 -3
- package/dist/stellar/processes/connectWalletProcess.d.ts +4 -0
- package/dist/stellar/processes/sendTransactionProcess.d.ts +3 -0
- package/dist/stellar/processes/signMessageProcess.d.ts +3 -0
- package/dist/stellar/submitTransaction.d.ts +1 -3
- package/dist/store.d.ts +16 -9
- package/dist/types.d.ts +44 -41
- package/dist/utils/initializeWalletConnect.d.ts +3 -0
- package/dist/wallets/hot.d.ts +2 -0
- package/dist/wallets/index.d.ts +2 -2
- package/dist/wallets/klever.d.ts +2 -0
- package/dist/wallets/walletConnect.d.ts +2 -0
- package/package.json +10 -3
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
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
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, border 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/core
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
or using yarn:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
yarn add @bluxcc/core
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
Include Blux and set up the authentication flow:
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<!DOCTYPE html>
|
|
34
|
+
<html>
|
|
35
|
+
<head>
|
|
36
|
+
<title>Blux Example</title>
|
|
37
|
+
<script src="https://unpkg.com/@bluxcc/core/dist/index.iife.js"></script>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<button id="loginBtn">Login with Blux</button>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
Blux.createConfig({
|
|
44
|
+
appName: 'your-app-name',
|
|
45
|
+
appId: 'get-id-from-dashboard',
|
|
46
|
+
networks: ['Public Global Stellar Network ; September 2015'],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
document.getElementById('loginBtn').onclick = async () => {
|
|
50
|
+
const user = await Blux.Blux.login();
|
|
51
|
+
|
|
52
|
+
console.log('Logged in:', user);
|
|
53
|
+
};
|
|
54
|
+
</script>
|
|
55
|
+
</body>
|
|
56
|
+
</html>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Customization
|
|
60
|
+
|
|
61
|
+
Developers can customize various UI elements:
|
|
62
|
+
|
|
63
|
+
- **Themes & Fonts**
|
|
64
|
+
- **Backgrounds, Logos**
|
|
65
|
+
- **Border Radius & Text Colors**
|
|
66
|
+
- **Authentication Limits** (Free tier supports 500-1000 accounts per auth method)
|
|
67
|
+
|
|
68
|
+
Configuration options can be passed in the `config` object when initializing Blux, or set via environment variables.
|
|
69
|
+
|
|
70
|
+
## Supported Wallets
|
|
71
|
+
|
|
72
|
+
Currently supported connection methods:
|
|
73
|
+
|
|
74
|
+
- [x] **Rabet**
|
|
75
|
+
- [x] **xBull**
|
|
76
|
+
- [x] **Lobstr**
|
|
77
|
+
- [x] **Freighter**
|
|
78
|
+
- [x] **Albedo**
|
|
79
|
+
- [x] **Hana**
|
|
80
|
+
- [ ] **Ledger**
|
|
81
|
+
- [ ] **Trezor**
|
|
82
|
+
- [ ] **WalletConnect**
|
|
83
|
+
- [ ] **OAuth**
|
|
84
|
+
- [ ] **Email**
|
|
85
|
+
|
|
86
|
+
## License & Usage Restrictions
|
|
87
|
+
|
|
88
|
+
- **No Production Use**: This software is provided under the **Blux Team License** with restrictions on production use.
|
|
89
|
+
- **No Forking or Unauthorized Modifications**: Removing references to **Blux Team** or forking without attribution is strictly prohibited.
|
|
90
|
+
- **Custom Licensing Available**: Contact us at [support@blux.cc](mailto:support@blux.cc) to discuss licensing options.
|
|
91
|
+
|
|
92
|
+
## Support & Contact
|
|
93
|
+
|
|
94
|
+
For support, licensing, or inquiries, reach out via:
|
|
95
|
+
|
|
96
|
+
- **Email**: [support@blux.cc](mailto:support@blux.cc)
|
|
97
|
+
- **X (Twitter)**: [@BluxOfficial](https://twitter.com/BluxOfficial)
|
|
98
|
+
|
|
99
|
+
## Roadmap & Future Plans
|
|
100
|
+
|
|
101
|
+
Blux is evolving. Follow our updates on [X (Twitter)](https://twitter.com/BluxOfficial) for:
|
|
102
|
+
|
|
103
|
+
- **OAuth Authentication (Apple, Meta, Google, etc.)**
|
|
104
|
+
- **Email & Phone-Based Authentication**
|
|
105
|
+
- **More Wallet Integrations**
|
|
106
|
+
- **Enhanced Customization & Security Features**
|
|
107
|
+
|
|
108
|
+
Stay tuned. We have many exciting developments ahead!
|
package/dist/assets/Logos.d.ts
CHANGED
|
@@ -22,3 +22,7 @@ export declare const StellarSmallLogo: ({ fill }: {
|
|
|
22
22
|
fill?: string;
|
|
23
23
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export declare const GoogleLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const WalletConnectLogo: ({ fill, background, }: {
|
|
26
|
+
fill?: string;
|
|
27
|
+
background?: string;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,8 @@ interface QRCodeCanvasProps {
|
|
|
4
4
|
size?: number;
|
|
5
5
|
bgColor?: string;
|
|
6
6
|
fgColor?: string;
|
|
7
|
-
level?:
|
|
7
|
+
level?: 'L' | 'M' | 'Q' | 'H';
|
|
8
|
+
imgSize?: number;
|
|
8
9
|
}
|
|
9
|
-
declare const QRCode: ({ value, title, size, bgColor, fgColor, level, ...rest }: QRCodeCanvasProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const QRCode: ({ value, title, size, bgColor, fgColor, level, imgSize, ...rest }: QRCodeCanvasProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default QRCode;
|
package/dist/enums.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ export declare enum SupportedWallet {
|
|
|
4
4
|
Freighter = "Freighter",
|
|
5
5
|
Xbull = "xBull",
|
|
6
6
|
Lobstr = "LOBSTR",
|
|
7
|
-
Hana = "Hana"
|
|
7
|
+
Hana = "Hana",
|
|
8
|
+
WalletConnect = "Wallet Connect",
|
|
9
|
+
Hot = "Hot",
|
|
10
|
+
Klever = "Klever"
|
|
8
11
|
}
|
|
9
12
|
export declare enum StellarNetwork {
|
|
10
13
|
PUBLIC = "Public Global Stellar Network ; September 2015",
|
|
@@ -18,6 +21,7 @@ export declare enum Route {
|
|
|
18
21
|
WRONG_NETWORK = "WRONG_NETWORK",// View for selecting a wallet
|
|
19
22
|
WAITING = "WAITING",// View for connection process
|
|
20
23
|
SUCCESSFUL = "SUCCESSFUL",// View for connection success process
|
|
24
|
+
FAILED = "FAILED",
|
|
21
25
|
PROFILE = "PROFILE",// User profile view
|
|
22
26
|
SEND_TRANSACTION = "SEND_TRANSACTION",// User sign transaction view
|
|
23
27
|
SEND = "SEND",// User sign transaction view
|
|
@@ -29,5 +33,6 @@ export declare enum Route {
|
|
|
29
33
|
BALANCE_DETAILS = "BALANCE_DETAILS",// View for asset details
|
|
30
34
|
ABOUT = "ABOUT",// View for what is blux
|
|
31
35
|
ADD_TOKEN = "ADD_TOKEN",// View for adding new token
|
|
32
|
-
SIGN_MESSAGE = "SIGN_MESSAGE"
|
|
36
|
+
SIGN_MESSAGE = "SIGN_MESSAGE",// User sign message view
|
|
37
|
+
WALLET_CONNECT = "WALLET_CONNECT"
|
|
33
38
|
}
|
package/dist/exports/blux.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
export declare const login: () => Promise<void>;
|
|
2
|
-
export declare const sendTransaction: (xdr: string, options
|
|
2
|
+
export declare const sendTransaction: (xdr: string, options?: {
|
|
3
|
+
network: string;
|
|
4
|
+
}) => Promise<unknown>;
|
|
5
|
+
export declare const signMessage: (message: string, options?: {
|
|
3
6
|
network: string;
|
|
4
7
|
}) => Promise<unknown>;
|
|
5
8
|
export declare const blux: {
|
|
6
9
|
login: () => Promise<void>;
|
|
7
10
|
logout: () => void;
|
|
8
11
|
profile: () => void;
|
|
9
|
-
|
|
12
|
+
signMessage: (message: string, options?: {
|
|
13
|
+
network: string;
|
|
14
|
+
}) => Promise<unknown>;
|
|
15
|
+
sendTransaction: (xdr: string, options?: {
|
|
10
16
|
network: string;
|
|
11
17
|
}) => Promise<unknown>;
|
|
12
18
|
readonly isReady: boolean;
|
package/dist/exports/index.d.ts
CHANGED
|
@@ -133,7 +133,10 @@ declare const _default: {
|
|
|
133
133
|
login: () => Promise<void>;
|
|
134
134
|
logout: () => void;
|
|
135
135
|
profile: () => void;
|
|
136
|
-
|
|
136
|
+
signMessage: (message: string, options?: {
|
|
137
|
+
network: string;
|
|
138
|
+
}) => Promise<unknown>;
|
|
139
|
+
sendTransaction: (xdr: string, options?: {
|
|
137
140
|
network: string;
|
|
138
141
|
}) => Promise<unknown>;
|
|
139
142
|
readonly isReady: boolean;
|