@bluxcc/core 0.3.1 → 0.3.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.
package/README.md CHANGED
@@ -6,27 +6,27 @@ Blux Core is a JavaScript/TypeScript SDK for adding authentication, Stellar wall
6
6
 
7
7
  ## Useful Links
8
8
 
9
- * **Website:** [blux.cc](https://blux.cc/)
10
- * **Documentation:** [docs.blux.cc](https://docs.blux.cc/)
11
- * **Live Demo:** [demo.blux.cc](https://demo.blux.cc/)
12
- * **Dashboard:** [dashboard.blux.cc](https://dashboard.blux.cc/)
9
+ - **Website:** [blux.cc](https://blux.cc/)
10
+ - **Documentation:** [docs.blux.cc](https://docs.blux.cc/)
11
+ - **Live Demo:** [demo.blux.cc](https://demo.blux.cc/)
12
+ - **Dashboard:** [dashboard.blux.cc](https://dashboard.blux.cc/)
13
13
 
14
14
  ## Features
15
15
 
16
- * **Framework-Agnostic**: Use Blux Core with vanilla JavaScript, TypeScript, or any frontend framework.
17
- * **Multi-Wallet Support**: Integrate Stellar wallets such as **Rabet, xBull, LOBSTR, Freighter, Albedo, HOT Wallet, Hana, and more**.
18
- * **Email, Passkey & Social Authentication**: Onboard users without requiring them to install or manage a traditional wallet.
19
- * **Transaction Signing**: Connect wallets and request transaction signatures through a consistent interface.
20
- * **Soroban Support**: Add Stellar smart contract interactions to your application.
21
- * **Customizable UI**: Adjust themes, fonts, backgrounds, logos, border radius, text colors, and other interface elements.
22
- * **Wallet Configuration**: Include or exclude individual wallets and control their display order.
23
- * **Configurable Networks**: Choose the Stellar networks supported by your application and set a default network.
24
- * **Custom Explorer**: Configure the block explorer used for account and transaction links.
25
- * **Localization**: Provide the authentication experience in multiple supported languages.
26
- * **User Management & Analytics**: Review authentication methods, login activity, timestamps, and associated wallet addresses through the Blux dashboard.
27
- * **Testing Tools**: Use predefined test accounts and reusable OTP credentials in configured testing environments.
28
- * **Multiple Projects**: Create and manage multiple applications from a single Blux account.
29
- * **Future-Proof**: More wallets and authentication methods will be added based on community feedback.
16
+ - **Framework-Agnostic**: Use Blux Core with vanilla JavaScript, TypeScript, or any frontend framework.
17
+ - **Multi-Wallet Support**: Integrate Stellar wallets such as **Rabet, xBull, LOBSTR, Freighter, Albedo, HOT Wallet, Hana, and more**.
18
+ - **Email, Passkey & Social Authentication**: Onboard users without requiring them to install or manage a traditional wallet.
19
+ - **Transaction Signing**: Connect wallets and request transaction signatures through a consistent interface.
20
+ - **Soroban Support**: Add Stellar smart contract interactions to your application.
21
+ - **Customizable UI**: Adjust themes, fonts, backgrounds, logos, border radius, text colors, and other interface elements.
22
+ - **Wallet Configuration**: Include or exclude individual wallets and control their display order.
23
+ - **Configurable Networks**: Choose the Stellar networks supported by your application and set a default network.
24
+ - **Custom Explorer**: Configure the block explorer used for account and transaction links.
25
+ - **Localization**: Provide the authentication experience in multiple supported languages.
26
+ - **User Management & Analytics**: Review authentication methods, login activity, timestamps, and associated wallet addresses through the Blux dashboard.
27
+ - **Testing Tools**: Use predefined test accounts and reusable OTP credentials in configured testing environments.
28
+ - **Multiple Projects**: Create and manage multiple applications from a single Blux account.
29
+ - **Future-Proof**: More wallets and authentication methods will be added based on community feedback.
30
30
 
31
31
  ## Installation
32
32
 
@@ -77,24 +77,73 @@ document.getElementById('loginBtn').onclick = async () => {
77
77
 
78
78
  Create a project through the [Blux Dashboard](https://dashboard.blux.cc/) to obtain your application ID. You can create and manage multiple projects from the same account.
79
79
 
80
+ ### Social Login
81
+
82
+ Add any supported provider to `loginMethods`. The first enabled social is
83
+ shown on the login screen; the rest appear on **Other socials**.
84
+
85
+ ```tsx
86
+ createConfig({
87
+ appName: 'My App',
88
+ appId: 'GET_FROM_BLUX_DASHBOARD',
89
+ networks: [core.networks.mainnet],
90
+ loginMethods: [
91
+ 'wallet',
92
+ 'google',
93
+ 'apple',
94
+ 'discord',
95
+ 'telegram',
96
+ 'meta',
97
+ 'github',
98
+ 'farcaster',
99
+ 'tiktok',
100
+ 'linkedin',
101
+ 'twitch',
102
+ 'kick',
103
+ 'spotify',
104
+ 'instagram',
105
+ 'microsoft',
106
+ 'gitlab',
107
+ 'twitter',
108
+ 'steam',
109
+ 'email',
110
+ 'passkey',
111
+ ],
112
+ });
113
+ ```
114
+
115
+ Each provider is shown only when requested in `loginMethods` and returned in
116
+ the app's enabled `socials` by `/auth/validate`. Most providers open
117
+ `/auth/social/{provider}/start` on the Blux API (for example,
118
+ `/auth/social/meta/start` or `/auth/social/github/start`) and use the
119
+ shared social-login success, retry, and cancellation flow. Telegram uses
120
+ the on-page [Login Widget](https://core.telegram.org/widgets/login) instead
121
+ of a popup, because the bot is bound to the site's domain; Mini Apps can
122
+ complete login via WebApp init data when that is enabled for the project.
123
+
124
+ The backend must support each provider and have the project's credentials
125
+ and callbacks configured. Private keys, client secrets, and bot tokens never
126
+ belong in this browser configuration. Token verification is the backend's
127
+ responsibility; the SDK accepts only the resulting Blux session.
128
+
80
129
  ## Customization
81
130
 
82
131
  Developers can customize various UI elements:
83
132
 
84
- * **Themes & Fonts**
85
- * **Backgrounds, Logos**
86
- * **Border Radius & Text Colors**
87
- * **Authentication Limits** (Free tier supports 500-1000 accounts per auth method)
133
+ - **Themes & Fonts**
134
+ - **Backgrounds, Logos**
135
+ - **Border Radius & Text Colors**
136
+ - **Authentication Limits** (Free tier supports 500-1000 accounts per auth method)
88
137
 
89
138
  Developers can also configure:
90
139
 
91
- * Enabled authentication methods
92
- * Included and excluded wallets
93
- * Wallet display order
94
- * Supported networks
95
- * Default network
96
- * Block explorer
97
- * Interface language
140
+ - Enabled authentication methods
141
+ - Included and excluded wallets
142
+ - Wallet display order
143
+ - Supported networks
144
+ - Default network
145
+ - Block explorer
146
+ - Interface language
98
147
 
99
148
  Configuration options can be set via the `BluxProvider` config or environment variables.
100
149
 
@@ -104,11 +153,11 @@ The Blux dashboard provides information about the users who have connected to yo
104
153
 
105
154
  Available information includes:
106
155
 
107
- * Authentication method
108
- * Login and connection timestamps
109
- * Associated wallet addresses, when available
110
- * Recent authentication activity
111
- * Individual user information
156
+ - Authentication method
157
+ - Login and connection timestamps
158
+ - Associated wallet addresses, when available
159
+ - Recent authentication activity
160
+ - Individual user information
112
161
 
113
162
  This information can help developers understand how their applications are being used and troubleshoot authentication or wallet connection issues.
114
163
 
@@ -124,57 +173,60 @@ These credentials are intended only for the configured testing environment. Refe
124
173
 
125
174
  Currently supported connection methods:
126
175
 
127
- * [x] **Freighter**
128
- * [x] **Rabet**
129
- * [x] **WalletConnect**
130
- * [x] **HOT Wallet**
131
- * [x] **Hana**
132
- * [x] **xBull**
133
- * [x] **LOBSTR**
134
- * [x] **Ledger**
135
- * [x] **Albedo**
136
- * [x] **Klever Wallet**
137
- * [x] **Bitget Wallet**
138
- * [x] **OneKey**
139
- * [x] **CactusLink**
140
- * [x] **Fordefi**
141
- * [x] **Trezor**
142
- * [x] **Email**
143
- * [x] **Google**
144
- * [x] **Passkey**
176
+ - [x] **Freighter**
177
+ - [x] **Rabet**
178
+ - [x] **WalletConnect**
179
+ - [x] **HOT Wallet**
180
+ - [x] **Hana**
181
+ - [x] **xBull**
182
+ - [x] **LOBSTR**
183
+ - [x] **Ledger**
184
+ - [x] **Albedo**
185
+ - [x] **Klever Wallet**
186
+ - [x] **Bitget Wallet**
187
+ - [x] **OneKey**
188
+ - [x] **CactusLink**
189
+ - [x] **Fordefi**
190
+ - [x] **Trezor**
191
+ - [x] **Email**
192
+ - [x] **Google**
193
+ - [x] **Apple**
194
+ - [x] **Discord**
195
+ - [x] **Telegram**
196
+ - [x] **Passkey**
145
197
 
146
198
  ## Supported Languages
147
199
 
148
200
  Currently supported languages:
149
201
 
150
- * [x] **English**
151
- * [x] **Spanish**
152
- * [x] **Portuguese**
153
- * [x] **French**
154
- * [x] **German**
155
- * [x] **Russian**
156
- * [x] **Chinese**
157
- * [x] **Japanese**
158
- * [x] **Korean**
202
+ - [x] **English**
203
+ - [x] **Spanish**
204
+ - [x] **Portuguese**
205
+ - [x] **French**
206
+ - [x] **German**
207
+ - [x] **Russian**
208
+ - [x] **Chinese**
209
+ - [x] **Japanese**
210
+ - [x] **Korean**
159
211
 
160
212
  ## License & Usage Restrictions
161
213
 
162
- * **No Forking or Unauthorized Modifications**: Removing references to **Blux Team** or forking without attribution is strictly prohibited.
163
- * **Custom Licensing Available**: Contact us at [support@blux.cc](mailto:support@blux.cc) to discuss licensing options.
214
+ - **No Forking or Unauthorized Modifications**: Removing references to **Blux Team** or forking without attribution is strictly prohibited.
215
+ - **Custom Licensing Available**: Contact us at [support@blux.cc](mailto:support@blux.cc) to discuss licensing options.
164
216
 
165
217
  ## Support & Contact
166
218
 
167
219
  For support, licensing, custom SMS authentication, or other inquiries, reach out via:
168
220
 
169
- * **Email**: [support@blux.cc](mailto:support@blux.cc)
170
- * **X**: [@BluxOfficial](https://x.com/bluxofficial)
221
+ - **Email**: [support@blux.cc](mailto:support@blux.cc)
222
+ - **X**: [@BluxOfficial](https://x.com/bluxofficial)
171
223
 
172
224
  ## Roadmap & Future Plans
173
225
 
174
226
  Blux is evolving. Follow our updates on [X](https://x.com/BluxOfficial) for:
175
227
 
176
- * **Additional OAuth and Social Authentication Methods**
177
- * **More Wallet Integrations**
178
- * **Enhanced Developer Hooks**
179
- * **Expanded Soroban Support**
180
- * **Enhanced Customization, Analytics, and Security Features**
228
+ - **Additional OAuth and Social Authentication Methods**
229
+ - **More Wallet Integrations**
230
+ - **Enhanced Developer Hooks**
231
+ - **Expanded Soroban Support**
232
+ - **Enhanced Customization, Analytics, and Security Features**
@@ -0,0 +1,15 @@
1
+ export declare const FarcasterLogo: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const TikTokLogo: () => import("react/jsx-runtime").JSX.Element;
3
+ export declare const LinkedInLogo: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const TwitchLogo: () => import("react/jsx-runtime").JSX.Element;
5
+ export declare const KickLogo: () => import("react/jsx-runtime").JSX.Element;
6
+ export declare const SpotifyLogo: () => import("react/jsx-runtime").JSX.Element;
7
+ export declare const InstagramLogo: () => import("react/jsx-runtime").JSX.Element;
8
+ export declare const MicrosoftLogo: () => import("react/jsx-runtime").JSX.Element;
9
+ export declare const GitLabLogo: () => import("react/jsx-runtime").JSX.Element;
10
+ export declare const XLogo: ({ fill }: {
11
+ fill?: string;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const SteamLogo: ({ fill }: {
14
+ fill?: string;
15
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const AppleLogo: ({ fill }: {
2
+ fill?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const DiscordLogo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const GitHubLogo: ({ fill }: {
2
+ fill?: string;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MetaLogo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const TelegramLogo: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ declare const SocialProviderIcon: ({ provider, fill, }: {
2
+ provider: string;
3
+ fill?: string;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default SocialProviderIcon;
package/dist/enums.d.ts CHANGED
@@ -26,7 +26,8 @@ export declare enum StellarNetwork {
26
26
  export declare enum Route {
27
27
  ONBOARDING = "ONBOARDING",// View for selecting a wallet
28
28
  PASSKEY_ONBOARDING = "PASSKEY_ONBOARDING",
29
- SOCIALS_ONBOARDING = "SOCIALS_ONBOARDING",// Social (OAuth) login popup flow
29
+ SOCIALS_ONBOARDING = "SOCIALS_ONBOARDING",// Social login waiting / widget / popup flow
30
+ OTHER_SOCIALS = "OTHER_SOCIALS",// Remaining social providers after the primary one
30
31
  WRONG_NETWORK = "WRONG_NETWORK",// View for selecting a wallet
31
32
  WAITING = "WAITING",// View for connection process
32
33
  SUCCESSFUL = "SUCCESSFUL",// View for connection success process