@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.
- package/dist/components/AssetLogo.d.ts +20 -0
- package/dist/components/TokensList/index.d.ts +6 -0
- package/dist/constants/consts.d.ts +1 -0
- package/dist/enums.d.ts +1 -0
- package/dist/hooks/useCustomTokens.d.ts +12 -0
- package/dist/index.cjs.js +14 -14
- package/dist/index.esm.js +14 -14
- package/dist/pages/Profile/Balances/TokenDetails/index.d.ts +2 -0
- package/dist/store.d.ts +12 -1
- package/dist/types.d.ts +43 -0
- package/dist/utils/api.d.ts +17 -0
- package/dist/utils/customTokens.d.ts +78 -0
- package/dist/utils/preloadAssetMeta.d.ts +5 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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;
|