@bluxcc/core 0.2.5 → 0.2.6
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 +2 -1
- package/dist/assets/index.d.ts +13 -6
- 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 +1 -1
- 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 +3 -1
- package/dist/components/Transaction/Summary/index.d.ts +1 -1
- package/dist/constants/assets.d.ts +8 -0
- package/dist/enums.d.ts +5 -1
- package/dist/exports/core/index.d.ts +2 -0
- package/dist/exports/core/readContracts.d.ts +5 -1
- package/dist/exports/core/writeContract.d.ts +2 -0
- package/dist/hooks/useLang.d.ts +1 -1
- package/dist/hooks/useMaxAmount.d.ts +3 -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 +1 -2
- 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 +1 -2
- package/dist/pages/Onboarding/OTP/index.d.ts +1 -1
- package/dist/pages/Onboarding/Passkey/index.d.ts +1 -1
- package/dist/pages/Onboarding/Socials/index.d.ts +2 -0
- package/dist/pages/Onboarding/index.d.ts +1 -2
- package/dist/pages/Profile/Activity/index.d.ts +1 -1
- package/dist/pages/Profile/Balances/AddToken/index.d.ts +1 -2
- 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 +1 -2
- package/dist/pages/Profile/Send/index.d.ts +1 -2
- 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/store.d.ts +4 -0
- package/dist/types.d.ts +19 -3
- package/dist/utils/animatedGradient.d.ts +1 -1
- package/dist/utils/api.d.ts +1 -0
- package/dist/utils/helpers.d.ts +12 -3
- package/dist/utils/initializeTrezor.d.ts +8 -0
- package/dist/utils/socialLogin.d.ts +24 -0
- package/dist/utils/walletLogos.d.ts +1 -1
- package/dist/wallets/cactuslink.d.ts +2 -0
- package/dist/wallets/fordefi.d.ts +2 -0
- package/dist/wallets/trezor.d.ts +2 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ npm i @bluxcc/core
|
|
|
31
31
|
<script>
|
|
32
32
|
Blux.createConfig({
|
|
33
33
|
appName: 'My App',
|
|
34
|
+
appId: 'GET_FROM_BLUX_DASHBOARD',
|
|
34
35
|
networks: [Blux.core.networks.mainnet],
|
|
35
36
|
});
|
|
36
37
|
|
|
@@ -45,6 +46,7 @@ import { blux, core, createConfig } from '@bluxcc/core';
|
|
|
45
46
|
|
|
46
47
|
createConfig({
|
|
47
48
|
appName: 'My App',
|
|
49
|
+
appId: 'GET_FROM_BLUX_DASHBOARD',
|
|
48
50
|
networks: [core.networks.mainnet],
|
|
49
51
|
});
|
|
50
52
|
|
|
@@ -61,4 +63,3 @@ For support, licensing, or inquiries, reach out via:
|
|
|
61
63
|
- **X (Twitter)**: [@BluxOfficial](https://twitter.com/BluxOfficial)
|
|
62
64
|
|
|
63
65
|
Follow for more updates at [X (Twitter)](https://twitter.com/BluxOfficial).
|
|
64
|
-
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export declare const ArrowOutward: ({ fill }: {
|
|
2
2
|
fill?: string;
|
|
3
|
-
}) => import("react").JSX.Element;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const Terms: ({ fill }: {
|
|
5
5
|
fill?: string;
|
|
6
|
-
}) => import("react").JSX.Element;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const BitGetLogo: ({ fill }: {
|
|
8
8
|
fill?: string;
|
|
9
|
-
}) => import("react").JSX.Element;
|
|
10
|
-
export declare const OneKeyLogo: () => import("react").JSX.Element;
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const OneKeyLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const CactusLinkLogo: ({ fill }: {
|
|
12
|
+
fill?: string;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const FordefiLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const TrezorLogo: ({ fill }: {
|
|
16
|
+
fill?: string;
|
|
17
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const MoonPayLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const PasskeyFingerLogo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,5 +6,5 @@ type IAssetWithDetails = IAsset & {
|
|
|
6
6
|
type AssetsProps = {
|
|
7
7
|
assets: IAssetWithDetails[];
|
|
8
8
|
};
|
|
9
|
-
declare const Assets: ({ assets }: AssetsProps) => import("react").JSX.Element;
|
|
9
|
+
declare const Assets: ({ assets }: AssetsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Assets;
|
|
@@ -15,5 +15,5 @@ interface ButtonProps {
|
|
|
15
15
|
type?: 'button' | 'submit';
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const Button: ({ size, disabled, variant, state, children, startIcon, endIcon, onClick, style, className, type, }: ButtonProps) =>
|
|
18
|
+
declare const Button: ({ size, disabled, variant, state, children, startIcon, endIcon, onClick, style, className, type, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default Button;
|
|
@@ -4,5 +4,5 @@ type ImageProps = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
props?: Record<string, string>;
|
|
6
6
|
};
|
|
7
|
-
declare const CDNImage: ({ className, name, props, ...rest }: ImageProps) => import("react").JSX.Element;
|
|
7
|
+
declare const CDNImage: ({ className, name, props, ...rest }: ImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default CDNImage;
|
|
@@ -12,5 +12,5 @@ type CardItemProps = {
|
|
|
12
12
|
onSubmit?: (value: string) => void;
|
|
13
13
|
inputType?: 'text' | 'password' | 'number' | 'email' | string;
|
|
14
14
|
};
|
|
15
|
-
declare const CardItem: ({ variant, size, startIcon, endArrow, isRecent, label, onClick, onChange, onEnter, onSubmit, inputType, }: CardItemProps) =>
|
|
15
|
+
declare const CardItem: ({ variant, size, startIcon, endArrow, isRecent, label, onClick, onChange, onEnter, onSubmit, inputType, }: CardItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export default CardItem;
|
|
@@ -7,5 +7,5 @@ type ButtonCardProps = {
|
|
|
7
7
|
label?: string;
|
|
8
8
|
onClick?: () => void;
|
|
9
9
|
};
|
|
10
|
-
declare const ButtonCard: ({ size, startIcon, endArrow, isRecent, label, onClick, }: ButtonCardProps) =>
|
|
10
|
+
declare const ButtonCard: ({ size, startIcon, endArrow, isRecent, label, onClick, }: ButtonCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default ButtonCard;
|
|
@@ -6,5 +6,5 @@ type InputCardProps = {
|
|
|
6
6
|
onSubmit?: (value: string) => void;
|
|
7
7
|
inputType?: 'text' | 'password' | 'number' | 'email' | string;
|
|
8
8
|
};
|
|
9
|
-
declare const InputCard: ({ startIcon, onChange, onEnter, onSubmit, inputType, }: InputCardProps) =>
|
|
9
|
+
declare const InputCard: ({ startIcon, onChange, onEnter, onSubmit, inputType, }: InputCardProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default InputCard;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Divider: () => import("react").JSX.Element;
|
|
1
|
+
declare const Divider: () => import("react/jsx-runtime").JSX.Element;
|
|
2
2
|
export default Divider;
|
|
@@ -7,5 +7,5 @@ interface HeaderProps {
|
|
|
7
7
|
closeButton?: boolean;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
}
|
|
10
|
-
declare const Header: ({ icon, onInfo, onBack, title, closeButton, onClose, isPersistent, }: HeaderProps) => import("react").JSX.Element;
|
|
10
|
+
declare const Header: ({ icon, onInfo, onBack, title, closeButton, onClose, isPersistent, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default Header;
|
|
@@ -15,5 +15,5 @@ type InputFieldProps = {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
optionalField?: boolean;
|
|
17
17
|
};
|
|
18
|
-
declare const InputField: ({ label, autoFocus, type, placeholder, error, iconRight, iconLeft, button, optionalField, onButtonClick, customLabel, value, className, onChange, }: InputFieldProps) =>
|
|
18
|
+
declare const InputField: ({ label, autoFocus, type, placeholder, error, iconRight, iconLeft, button, optionalField, onButtonClick, customLabel, value, className, onChange, }: InputFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export default InputField;
|
|
@@ -4,5 +4,5 @@ type ProfileItemProps = {
|
|
|
4
4
|
href?: string;
|
|
5
5
|
onClick?: () => void;
|
|
6
6
|
};
|
|
7
|
-
declare const Link: ({ label, icon, href, onClick }: ProfileItemProps) => import("react").JSX.Element;
|
|
7
|
+
declare const Link: ({ label, icon, href, onClick }: ProfileItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default Link;
|
|
@@ -8,5 +8,5 @@ interface ModalProps {
|
|
|
8
8
|
appearance: IAppearance;
|
|
9
9
|
isPersistent: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const Modal: ({ isOpen, onClose, children, isSticky, appearance, isPersistent, }: ModalProps) =>
|
|
11
|
+
declare const Modal: ({ isOpen, onClose, children, isSticky, appearance, isPersistent, }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
export default Modal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Provider: () => import("react").JSX.Element;
|
|
1
|
+
export declare const Provider: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,5 @@ interface QRCodeCanvasProps {
|
|
|
7
7
|
level?: 'L' | 'M' | 'Q' | 'H';
|
|
8
8
|
imgSize?: number;
|
|
9
9
|
}
|
|
10
|
-
declare const QRCode: ({ value, title, size, bgColor, fgColor, level, imgSize, ...rest }: QRCodeCanvasProps) => import("react").JSX.Element;
|
|
10
|
+
declare const QRCode: ({ value, title, size, bgColor, fgColor, level, imgSize, ...rest }: QRCodeCanvasProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default QRCode;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export type TxAction = 'send' | 'receive' | 'swap' | 'multi' | 'other';
|
|
2
3
|
export type TxDetail = {
|
|
3
4
|
hash: string;
|
|
4
5
|
date: string;
|
|
5
6
|
title: string;
|
|
6
7
|
description: string;
|
|
8
|
+
action?: TxAction;
|
|
7
9
|
};
|
|
8
10
|
interface TransactionProps {
|
|
9
11
|
tx: TxDetail;
|
|
10
12
|
}
|
|
11
|
-
declare const _default: React.MemoExoticComponent<({ tx }: TransactionProps) =>
|
|
13
|
+
declare const _default: React.MemoExoticComponent<({ tx }: TransactionProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
14
|
export default _default;
|
|
@@ -6,5 +6,5 @@ interface SummaryProps {
|
|
|
6
6
|
action: string;
|
|
7
7
|
network: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Summary: ({ operationsCount, sender, receiver, network, estimatedFee, action, }: SummaryProps) => import("react").JSX.Element;
|
|
9
|
+
declare const Summary: ({ operationsCount, sender, receiver, network, estimatedFee, action, }: SummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Summary;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IAsset } from '../types';
|
|
1
2
|
export declare const XLM: {
|
|
2
3
|
assetIssuer: string;
|
|
3
4
|
assetCode: string;
|
|
@@ -16,3 +17,10 @@ export declare const TESTNET_USDC: {
|
|
|
16
17
|
assetBalance: string;
|
|
17
18
|
assetType: string;
|
|
18
19
|
};
|
|
20
|
+
export declare const MAINNET_EURC: {
|
|
21
|
+
assetIssuer: string;
|
|
22
|
+
assetCode: string;
|
|
23
|
+
assetBalance: string;
|
|
24
|
+
assetType: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const getSuggestedAssets: (networkPassphrase: string) => IAsset[];
|
package/dist/enums.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ export declare enum SupportedWallet {
|
|
|
11
11
|
Klever = "Klever",
|
|
12
12
|
Ledger = "Ledger",
|
|
13
13
|
Bitget = "Bitget",
|
|
14
|
-
Onekey = "Onekey"
|
|
14
|
+
Onekey = "Onekey",
|
|
15
|
+
CactusLink = "Cactus Link",
|
|
16
|
+
Fordefi = "Fordefi",
|
|
17
|
+
Trezor = "Trezor"
|
|
15
18
|
}
|
|
16
19
|
export declare enum StellarNetwork {
|
|
17
20
|
PUBLIC = "Public Global Stellar Network ; September 2015",
|
|
@@ -23,6 +26,7 @@ export declare enum StellarNetwork {
|
|
|
23
26
|
export declare enum Route {
|
|
24
27
|
ONBOARDING = "ONBOARDING",// View for selecting a wallet
|
|
25
28
|
PASSKEY_ONBOARDING = "PASSKEY_ONBOARDING",
|
|
29
|
+
SOCIALS_ONBOARDING = "SOCIALS_ONBOARDING",// Social (OAuth) login popup flow
|
|
26
30
|
WRONG_NETWORK = "WRONG_NETWORK",// View for selecting a wallet
|
|
27
31
|
WAITING = "WAITING",// View for connection process
|
|
28
32
|
SUCCESSFUL = "SUCCESSFUL",// View for connection success process
|
|
@@ -16,6 +16,8 @@ export { getStrictSendPaths } from './getStrictSendPaths';
|
|
|
16
16
|
export { getTradeAggregation } from './getTradeAggregation';
|
|
17
17
|
export { getTrades } from './getTrades';
|
|
18
18
|
export { getTransactions } from './getTransactions';
|
|
19
|
+
export { readContracts } from './readContracts';
|
|
20
|
+
export { writeContract } from './writeContract';
|
|
19
21
|
export { networks } from './networks';
|
|
20
22
|
export { switchNetwork } from './switchNetwork';
|
|
21
23
|
export { type Numberish, numberish, ToScVal } from './toScVal';
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { rpc } from '@stellar/stellar-sdk';
|
|
1
2
|
import { IContractCall, ReadContractsOptions } from '../utils';
|
|
2
|
-
export declare const readContracts: (calls: IContractCall[], options?: ReadContractsOptions) => Promise<
|
|
3
|
+
export declare const readContracts: (calls: IContractCall[], options?: ReadContractsOptions) => Promise<never[] | {
|
|
4
|
+
raws: (rpc.Api.SimulateTransactionSuccessResponse | rpc.Api.SimulateTransactionRestoreResponse | undefined)[];
|
|
5
|
+
values: any[];
|
|
6
|
+
}>;
|
package/dist/hooks/useLang.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TranslationKey } from
|
|
1
|
+
import { TranslationKey } from '../constants/locales';
|
|
2
2
|
export declare const useLang: () => (key: TranslationKey, vars?: Record<string, string>) => string;
|