@bluxcc/core 0.2.3 → 0.2.5
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/assets/index.d.ts +12 -0
- package/dist/components/AssetsList/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/CDNImage.d.ts +1 -1
- package/dist/components/CardItem/index.d.ts +1 -1
- package/dist/components/CardItem/variants/button.d.ts +1 -1
- package/dist/components/CardItem/variants/input.d.ts +1 -1
- package/dist/components/Divider/index.d.ts +1 -1
- package/dist/components/Header/index.d.ts +1 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Link/index.d.ts +8 -0
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Provider.d.ts +1 -1
- package/dist/components/QRCode/index.d.ts +1 -1
- package/dist/components/TabBox/index.d.ts +1 -1
- package/dist/components/Transaction/History/index.d.ts +1 -1
- package/dist/components/Transaction/Summary/index.d.ts +1 -1
- package/dist/constants/cdnFiles.d.ts +1 -0
- package/dist/constants/consts.d.ts +1 -1
- package/dist/enums.d.ts +4 -1
- package/dist/exports/blux.d.ts +6 -0
- package/dist/index.cjs.js +14 -14
- package/dist/index.esm.js +14 -14
- package/dist/pages/About/index.d.ts +1 -1
- package/dist/pages/AcceptTermsAndPrivacy/index.d.ts +2 -1
- package/dist/pages/Failed/index.d.ts +1 -1
- package/dist/pages/FundMe/FundMeCrypto/index.d.ts +1 -1
- package/dist/pages/FundMe/index.d.ts +2 -1
- package/dist/pages/Onboarding/OTP/index.d.ts +1 -1
- package/dist/pages/Onboarding/Passkey/index.d.ts +9 -0
- package/dist/pages/Onboarding/index.d.ts +2 -1
- package/dist/pages/Profile/Activity/index.d.ts +1 -1
- package/dist/pages/Profile/Balances/AddToken/index.d.ts +2 -1
- package/dist/pages/Profile/Balances/BalanceDetails/index.d.ts +1 -1
- package/dist/pages/Profile/Balances/index.d.ts +1 -1
- package/dist/pages/Profile/Receive/index.d.ts +1 -1
- package/dist/pages/Profile/SelectAsset/index.d.ts +2 -1
- package/dist/pages/Profile/Send/index.d.ts +2 -1
- package/dist/pages/Profile/Swap/AssetBox/index.d.ts +1 -1
- package/dist/pages/Profile/Swap/index.d.ts +1 -1
- package/dist/pages/Profile/index.d.ts +1 -1
- package/dist/pages/SendTransaction/index.d.ts +1 -1
- package/dist/pages/SignMessage/index.d.ts +1 -1
- package/dist/pages/Successful/index.d.ts +1 -1
- package/dist/pages/Waiting/index.d.ts +1 -1
- package/dist/pages/WalletConnect/index.d.ts +1 -1
- package/dist/pages/WrongNetwork/index.d.ts +1 -1
- package/dist/stellar/handleSignAuthEntry.d.ts +3 -0
- package/dist/stellar/processes/signAuthEntryProcess.d.ts +3 -0
- package/dist/store.d.ts +4 -2
- package/dist/types.d.ts +7 -0
- package/dist/utils/animatedGradient.d.ts +1 -1
- package/dist/utils/api.d.ts +8 -0
- package/dist/utils/checkRecentLogins.d.ts +1 -1
- package/dist/utils/helpers.d.ts +1 -0
- package/dist/utils/walletLogos.d.ts +1 -1
- package/dist/wallets/bitget.d.ts +2 -0
- package/dist/wallets/onekey.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const About: () => import("react
|
|
1
|
+
declare const About: () => import("react").JSX.Element;
|
|
2
2
|
export default About;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Failed: () => import("react
|
|
1
|
+
declare const Failed: () => import("react").JSX.Element;
|
|
2
2
|
export default Failed;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const FundMeCrypto: () => import("react").JSX.Element;
|
|
2
2
|
export default FundMeCrypto;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const OTP: () => import("react
|
|
1
|
+
declare const OTP: () => import("react").JSX.Element;
|
|
2
2
|
export default OTP;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type PasskeyFlowResult = {
|
|
2
|
+
step: 'login';
|
|
3
|
+
credential: PublicKeyCredential;
|
|
4
|
+
} | {
|
|
5
|
+
step: 'register';
|
|
6
|
+
credential: PublicKeyCredential;
|
|
7
|
+
};
|
|
8
|
+
declare const PasskeyOnboardingPage: () => import("react").JSX.Element;
|
|
9
|
+
export default PasskeyOnboardingPage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Activity: () => import("react
|
|
1
|
+
declare const Activity: () => import("react").JSX.Element;
|
|
2
2
|
export default Activity;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const BalanceDetails: () => import("react
|
|
1
|
+
declare const BalanceDetails: () => import("react").JSX.Element;
|
|
2
2
|
export default BalanceDetails;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Balances: () =>
|
|
1
|
+
declare const Balances: () => import("react").JSX.Element | "Loading" | "Error, try again.";
|
|
2
2
|
export default Balances;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Receive: () => import("react
|
|
1
|
+
declare const Receive: () => import("react").JSX.Element;
|
|
2
2
|
export default Receive;
|
|
@@ -3,5 +3,5 @@ type AssetBoxProps = {
|
|
|
3
3
|
asset: IAsset;
|
|
4
4
|
handleOpenAssets: () => void;
|
|
5
5
|
};
|
|
6
|
-
declare const AssetBox: ({ handleOpenAssets, asset }: AssetBoxProps) => import("react
|
|
6
|
+
declare const AssetBox: ({ handleOpenAssets, asset }: AssetBoxProps) => import("react").JSX.Element;
|
|
7
7
|
export default AssetBox;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Swap: () => import("react
|
|
1
|
+
declare const Swap: () => import("react").JSX.Element;
|
|
2
2
|
export default Swap;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Profile: () => import("react
|
|
1
|
+
declare const Profile: () => import("react").JSX.Element;
|
|
2
2
|
export default Profile;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SendTransaction: () => import("react
|
|
1
|
+
declare const SendTransaction: () => import("react").JSX.Element;
|
|
2
2
|
export default SendTransaction;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const SignMessage: () => import("react
|
|
1
|
+
declare const SignMessage: () => import("react").JSX.Element | null;
|
|
2
2
|
export default SignMessage;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Successful: () => import("react
|
|
1
|
+
declare const Successful: () => import("react").JSX.Element;
|
|
2
2
|
export default Successful;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Waiting: () => import("react
|
|
1
|
+
declare const Waiting: () => import("react").JSX.Element;
|
|
2
2
|
export default Waiting;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const WalletConnect: () => import("react
|
|
1
|
+
declare const WalletConnect: () => import("react").JSX.Element | null;
|
|
2
2
|
export default WalletConnect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const WrongNetwork: () => import("react
|
|
1
|
+
declare const WrongNetwork: () => import("react").JSX.Element;
|
|
2
2
|
export default WrongNetwork;
|
package/dist/store.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { Route } from './enums';
|
|
|
4
4
|
import { UseBalancesResult } from './hooks/useBalances';
|
|
5
5
|
import { UseTransactionsResult } from './hooks/useTransactions';
|
|
6
6
|
import Emitter, { BluxEventMap } from './utils/events';
|
|
7
|
-
import { IAsset, IWallet, IAppearance, ISignMessage, IInternalConfig, ISendTransaction, AuthenticateApiResponse } from './types';
|
|
7
|
+
import { IAsset, IWallet, IAppearance, ISignMessage, IInternalConfig, ISendTransaction, AuthenticateApiResponse, ISignAuthEntry } from './types';
|
|
8
8
|
export type AlertType = 'error' | 'success' | 'warn' | 'none' | 'copy';
|
|
9
|
-
export type WaitingStatus = 'login' | 'sendTransaction' | 'signMessage';
|
|
9
|
+
export type WaitingStatus = 'login' | 'sendTransaction' | 'signMessage' | 'signAuthEntry';
|
|
10
10
|
export interface ILogo {
|
|
11
11
|
id: number;
|
|
12
12
|
name: string;
|
|
@@ -71,6 +71,7 @@ export interface IStoreProperties {
|
|
|
71
71
|
stellar?: IStellarConfig;
|
|
72
72
|
sendTransaction?: ISendTransaction;
|
|
73
73
|
signMessage?: ISignMessage;
|
|
74
|
+
signAuthEntry?: ISignAuthEntry;
|
|
74
75
|
login?: ILoginPromise;
|
|
75
76
|
balances: UseBalancesResult;
|
|
76
77
|
transactions: UseTransactionsResult;
|
|
@@ -95,6 +96,7 @@ export interface IStoreMethods {
|
|
|
95
96
|
setRoute: (route: Route) => void;
|
|
96
97
|
setSendTransaction: (sendTransaction: ISendTransaction, isOpen: boolean, route?: Route) => void;
|
|
97
98
|
setSignMessage: (messageDetails: ISignMessage, isOpen: boolean, route?: Route) => void;
|
|
99
|
+
setSignAuthEntry: (authEntry: ISignAuthEntry, isOpen: boolean, route?: Route) => void;
|
|
98
100
|
setStellar: (stellar: IStellarConfig) => void;
|
|
99
101
|
setWallets: (wallets: IWallet[]) => void;
|
|
100
102
|
setAlert: (alert: AlertType, message: string) => void;
|
package/dist/types.d.ts
CHANGED
|
@@ -117,6 +117,13 @@ export interface ISignMessage {
|
|
|
117
117
|
rejecter: (reason: any) => void;
|
|
118
118
|
resolver: (value: string) => void;
|
|
119
119
|
}
|
|
120
|
+
export interface ISignAuthEntry {
|
|
121
|
+
result?: string;
|
|
122
|
+
authEntry: string;
|
|
123
|
+
options: ISignOptions;
|
|
124
|
+
rejecter: (reason: any) => void;
|
|
125
|
+
resolver: (value: string) => void;
|
|
126
|
+
}
|
|
120
127
|
export interface AuthenticateApiResponse {
|
|
121
128
|
isValid: boolean;
|
|
122
129
|
message: string;
|
|
@@ -14,5 +14,5 @@ type AnimatedGradientType = {
|
|
|
14
14
|
size?: string;
|
|
15
15
|
style?: React.CSSProperties;
|
|
16
16
|
};
|
|
17
|
-
declare const AnimatedGradient: ({ theme, className, children, animationSpeed, onClick, style, size, }: AnimatedGradientType) =>
|
|
17
|
+
declare const AnimatedGradient: ({ theme, className, children, animationSpeed, onClick, style, size, }: AnimatedGradientType) => React.JSX.Element;
|
|
18
18
|
export default AnimatedGradient;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { IUser } from '../store';
|
|
2
2
|
import { AuthenticateApiResponse } from '../types';
|
|
3
|
+
import { PasskeyFlowResult } from '../pages/Onboarding/Passkey';
|
|
4
|
+
type ApiPasskeyChallenge = {
|
|
5
|
+
user_id: string;
|
|
6
|
+
challenge: string;
|
|
7
|
+
challenge_id: number;
|
|
8
|
+
};
|
|
3
9
|
export declare const authenticateAppId: (appId: string) => Promise<AuthenticateApiResponse>;
|
|
10
|
+
export declare const apiRegisterPasskeyChallenge: (appId: string) => Promise<ApiPasskeyChallenge>;
|
|
11
|
+
export declare const apiRegisterPasskey: (appId: string, challenge: ApiPasskeyChallenge, passkeyResult: PasskeyFlowResult) => Promise<string>;
|
|
4
12
|
export declare const apiSendOtp: (appId: string, authValue: string) => Promise<boolean>;
|
|
5
13
|
export declare const apiStoreWalletConnection: (appId: string, walletName: string, walletAddress: string) => Promise<boolean>;
|
|
6
14
|
export declare const apiVerifyOtp: (appId: string, user: IUser, otp: string) => Promise<string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const setRecentLoginConfig: (authMethod: string, authValue: string, timestamp
|
|
1
|
+
export declare const setRecentLoginConfig: (authMethod: string, authValue: string, timestamp: number | undefined, jwt: string) => void;
|
|
2
2
|
export declare const clearRecentLoginConfig: () => void;
|
|
3
3
|
export declare const checkRecentLogins: () => Promise<boolean>;
|
package/dist/utils/helpers.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Route, SupportedWallet } from '../enums';
|
|
|
4
4
|
import { IAsset, IWallet, IExplorer, LanguageKey, ITransports, IWalletNames } from '../types';
|
|
5
5
|
import { INetworkTransports } from '../constants/networkDetails';
|
|
6
6
|
import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon';
|
|
7
|
+
export declare const bufferToBase64Url: (buf: ArrayBuffer) => string;
|
|
7
8
|
export declare const getAssetTitle: (asset: HorizonApi.BalanceLineNative | HorizonApi.BalanceLineAsset<"credit_alphanum4"> | HorizonApi.BalanceLineAsset<"credit_alphanum12"> | HorizonApi.BalanceLineLiquidityPool) => string;
|
|
8
9
|
export declare const getAssetSubtitle: (asset: HorizonApi.BalanceLineNative | HorizonApi.BalanceLineAsset<"credit_alphanum4"> | HorizonApi.BalanceLineAsset<"credit_alphanum12"> | HorizonApi.BalanceLineLiquidityPool) => string;
|
|
9
10
|
export declare const iAssetToAsset: (asset: IAsset) => Asset;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const handleLogos: (walletName: string, isDark: boolean) => import("react
|
|
1
|
+
declare const handleLogos: (walletName: string, isDark: boolean, size?: "small" | "large") => import("react").JSX.Element | null;
|
|
2
2
|
export default handleLogos;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluxcc/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"homepage": "https://blux.cc",
|
|
5
5
|
"description": "Blux is a wallet infra for the Stellar network",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@ledgerhq/hw-app-str": "^7.2.8",
|
|
43
43
|
"@lobstrco/signer-extension-api": "^1.0.0-beta.0",
|
|
44
44
|
"@stellar/freighter-api": "^5.0.0",
|
|
45
|
-
"@stellar/stellar-sdk": "^15.0
|
|
45
|
+
"@stellar/stellar-sdk": "^15.1.0",
|
|
46
46
|
"@walletconnect/core": "^2.21.9",
|
|
47
47
|
"@walletconnect/sign-client": "^2.21.9",
|
|
48
48
|
"qrcode.react": "^4.2.0",
|