@bluxcc/core 0.2.12 → 0.2.13

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.
@@ -0,0 +1,20 @@
1
+ import CDNFiles from '../constants/cdnFiles';
2
+ type AssetLogoProps = {
3
+ assetCode: string;
4
+ assetIssuer: string;
5
+ assetType: string;
6
+ /** Fill color forwarded to the bundled SVG fallbacks (native / question mark). */
7
+ fill?: string;
8
+ /** SVG shown for native XLM. */
9
+ nativeIcon?: CDNFiles;
10
+ /** SVG shown when no logo is found or the remote image fails to load. */
11
+ fallbackIcon?: CDNFiles;
12
+ className?: string;
13
+ };
14
+ /**
15
+ * Renders an asset's logo: the curated remote icon when we have one, otherwise
16
+ * the bundled Stellar (native) or question-mark (unknown) SVG. Subscribes to the
17
+ * asset-meta map, so logos appear automatically once the blob finishes loading.
18
+ */
19
+ declare const AssetLogo: ({ assetCode, assetIssuer, assetType, fill, nativeIcon, fallbackIcon, className, }: AssetLogoProps) => import("react/jsx-runtime").JSX.Element;
20
+ export default AssetLogo;
@@ -0,0 +1,6 @@
1
+ import { ICustomToken } from '../../types';
2
+ type TokensListProps = {
3
+ tokens: ICustomToken[];
4
+ };
5
+ declare const TokensList: ({ tokens }: TokensListProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default TokensList;
@@ -7,3 +7,4 @@ export declare const BLUX_API = "https://api.blux.cc";
7
7
  export declare const BLUX_APP_ID_HEADER: "blux-app-id";
8
8
  export declare const BLUX_CDN_PATH = "https://cdn.blux.cc/files";
9
9
  export declare const CLOUDFLARE_R2_LOGOS = "https://cdn2.blux.cc/core-assets/logos2.json.gz";
10
+ export declare const CLOUDFLARE_R2_ASSET_META = "https://cdn2.blux.cc/core-assets/asset-meta.json.gz";
package/dist/enums.d.ts CHANGED
@@ -40,6 +40,7 @@ export declare enum Route {
40
40
  BALANCES = "BALANCES",// View for balances
41
41
  SWAP = "SWAP",// View for swap assets
42
42
  BALANCE_DETAILS = "BALANCE_DETAILS",// View for asset details
43
+ TOKEN_DETAILS = "TOKEN_DETAILS",// View for custom token details
43
44
  ABOUT = "ABOUT",// View for what is blux
44
45
  ADD_TOKEN = "ADD_TOKEN",// View for adding new token
45
46
  SIGN_MESSAGE = "SIGN_MESSAGE",// User sign message view
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Keeps the store's custom-token list in sync:
3
+ *
4
+ * 1. On login (a JWT appears), fetch the user's preferred tokens once and store
5
+ * both network buckets.
6
+ * 2. Whenever the active network's bucket membership, the account, or the
7
+ * network changes, read each token's on-chain balance and write it back.
8
+ *
9
+ * Mounted once from {@link Provider}, alongside {@link useUpdateAccount}.
10
+ */
11
+ declare const useCustomTokens: () => void;
12
+ export default useCustomTokens;