@bluxcc/core 0.2.1 → 0.2.3
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 +1 -0
- package/dist/components/CDNImage.d.ts +8 -0
- package/dist/constants/cdnFiles.d.ts +63 -0
- package/dist/constants/consts.d.ts +2 -0
- package/dist/enums.d.ts +10 -1
- package/dist/exports/blux.d.ts +6 -3
- package/dist/exports/core/index.d.ts +1 -0
- package/dist/exports/core/readContracts.d.ts +2 -1
- package/dist/exports/core/test-types.d.ts +2 -0
- package/dist/exports/core/toScVal.d.ts +30 -0
- package/dist/exports/index.d.ts +5 -1
- package/dist/exports/utils.d.ts +6 -4
- package/dist/index.cjs.js +14 -14
- package/dist/index.esm.js +14 -14
- package/dist/pages/AcceptTermsAndPrivacy/index.d.ts +2 -0
- package/dist/pages/FundMe/FundMeCrypto/index.d.ts +2 -0
- package/dist/pages/FundMe/index.d.ts +2 -0
- package/dist/stellar/processes/connectWalletProcess.d.ts +1 -1
- package/dist/stellar/processes/continueLoginProcess.d.ts +3 -0
- package/dist/stellar/processes/loginResolver.d.ts +2 -0
- package/dist/store.d.ts +23 -2
- package/dist/types.d.ts +3 -1
- package/dist/utils/api.d.ts +4 -9
- package/dist/utils/checkRecentLogins.d.ts +3 -0
- package/dist/utils/events.d.ts +49 -0
- package/dist/utils/preloadImages.d.ts +1 -0
- package/package.json +2 -2
- package/dist/assets/Icons.d.ts +0 -108
- package/dist/assets/Logos.d.ts +0 -33
- package/dist/assets/bluxLogo.d.ts +0 -8
- package/dist/exports/core/writeContracts.d.ts +0 -1
- package/dist/index.iife.js +0 -51
package/README.md
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import CDNFiles from '../constants/cdnFiles';
|
|
2
|
+
type ImageProps = {
|
|
3
|
+
name: CDNFiles;
|
|
4
|
+
className?: string;
|
|
5
|
+
props?: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
declare const CDNImage: ({ className, name, props, ...rest }: ImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CDNImage;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare enum CDNFiles {
|
|
2
|
+
Blux = "blux.svg",
|
|
3
|
+
SmallBlux = "smallblux.svg",
|
|
4
|
+
About = "about.svg",
|
|
5
|
+
ArrowRight = "arrowright.svg",
|
|
6
|
+
ArrowLeft = "arrowleft.svg",
|
|
7
|
+
Close = "close.svg",
|
|
8
|
+
Loading = "loading.svg",
|
|
9
|
+
Search = "search.svg",
|
|
10
|
+
GreenCheck = "greencheck.svg",
|
|
11
|
+
LogOut = "logout.svg",
|
|
12
|
+
Copy = "copy.svg",
|
|
13
|
+
LargeCopy = "largecopy.svg",
|
|
14
|
+
History = "history.svg",
|
|
15
|
+
Send = "send.svg",
|
|
16
|
+
ArrowDropUp = "arrowdropup.svg",
|
|
17
|
+
ArrowDropDown = "arrowdropdown.svg",
|
|
18
|
+
RedAlert = "redalert.svg",
|
|
19
|
+
Upstream = "upstream.svg",
|
|
20
|
+
MultiOperation = "multioperation.svg",
|
|
21
|
+
Downstream = "downstream.svg",
|
|
22
|
+
Globe = "globe.svg",
|
|
23
|
+
SmallEmail = "smallemail.svg",
|
|
24
|
+
Email = "email.svg",
|
|
25
|
+
RedExclamation = "redexclamation.svg",
|
|
26
|
+
WrongNetwork = "wrongnetwork.svg",
|
|
27
|
+
Swap = "swap.svg",
|
|
28
|
+
SmallSwap = "smallswap.svg",
|
|
29
|
+
Receive = "receive.svg",
|
|
30
|
+
Balances = "balances.svg",
|
|
31
|
+
NFTs = "nfts.svg",
|
|
32
|
+
Assets = "assets.svg",
|
|
33
|
+
Token = "token.svg",
|
|
34
|
+
Plus = "plus.svg",
|
|
35
|
+
OpenEye = "openeye.svg",
|
|
36
|
+
CloseEye = "closeeye.svg",
|
|
37
|
+
Warn = "warn.svg",
|
|
38
|
+
Error = "error.svg",
|
|
39
|
+
CopyIcon = "copyicon.svg",
|
|
40
|
+
Success = "success.svg",
|
|
41
|
+
Key = "key.svg",
|
|
42
|
+
Chip = "chip.svg",
|
|
43
|
+
Shield = "shield.svg",
|
|
44
|
+
Wallet = "wallet.svg",
|
|
45
|
+
QuestionMark = "questionmark.svg",
|
|
46
|
+
SmallQuestionMark = "smallquestionmark.svg",
|
|
47
|
+
GrayCube = "graycube.svg",
|
|
48
|
+
Albedo = "albedo.svg",
|
|
49
|
+
Hana = "hana.svg",
|
|
50
|
+
Hot = "hot.svg",
|
|
51
|
+
Rabet = "rabet.svg",
|
|
52
|
+
Freighter = "freighter.svg",
|
|
53
|
+
DarkFreighter = "darkfreighter.svg",
|
|
54
|
+
XBull = "xbull.svg",
|
|
55
|
+
Lobstr = "lobstr.svg",
|
|
56
|
+
Stellar = "stellar.svg",
|
|
57
|
+
StellarSmall = "stellarsmall.svg",
|
|
58
|
+
Google = "google.svg",
|
|
59
|
+
WalletConnect = "walletconnect.svg",
|
|
60
|
+
Klever = "klever.svg",
|
|
61
|
+
Ledger = "ledger.svg"
|
|
62
|
+
}
|
|
63
|
+
export default CDNFiles;
|
|
@@ -5,3 +5,5 @@ export declare const WC_STELLAR_PUBNET = "stellar:pubnet";
|
|
|
5
5
|
export declare const WC_STELLAR_TESTNET = "stellar:testnet";
|
|
6
6
|
export declare const BLUX_API = "https://api.blux.cc";
|
|
7
7
|
export declare const BLUX_APP_ID_HEADER: "blux-app-id";
|
|
8
|
+
export declare const BLUX_CDN_PATH = "https://cdn.blux.cc/files";
|
|
9
|
+
export declare const CLOUDFLARE_R2_LOGOS = "https://cdn2.blux.cc/core-assets/logos.json.gz";
|
package/dist/enums.d.ts
CHANGED
|
@@ -37,5 +37,14 @@ export declare enum Route {
|
|
|
37
37
|
ADD_TOKEN = "ADD_TOKEN",// View for adding new token
|
|
38
38
|
SIGN_MESSAGE = "SIGN_MESSAGE",// User sign message view
|
|
39
39
|
WALLET_CONNECT = "WALLET_CONNECT",// User sign message view
|
|
40
|
-
SELECT_ASSET = "SELECT_ASSET"
|
|
40
|
+
SELECT_ASSET = "SELECT_ASSET",
|
|
41
|
+
FUND_ME = "FUND_ME",
|
|
42
|
+
FUND_ME_CRYPTO = "FUND_ME_CRYPTO",
|
|
43
|
+
ACCEPT_TERMS_AND_PRIVACY = "ACCEPT_TERMS_AND_PRIVACY"
|
|
44
|
+
}
|
|
45
|
+
export declare enum CDNPreloadImages {
|
|
46
|
+
SmallEmail = "smallemail.svg",
|
|
47
|
+
Email = "email.svg",
|
|
48
|
+
Albedo = "albedo.svg",
|
|
49
|
+
Stellar = "stellar.svg"
|
|
41
50
|
}
|
package/dist/exports/blux.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { IUser } from '../store';
|
|
2
|
+
export declare const _login: (isSilent: boolean) => Promise<IUser>;
|
|
3
|
+
export declare const login: () => Promise<IUser>;
|
|
2
4
|
export declare const signTransaction: (xdr: string, options?: {
|
|
3
5
|
network: string;
|
|
4
6
|
}) => Promise<unknown>;
|
|
@@ -9,8 +11,9 @@ export declare const signMessage: (message: string, options?: {
|
|
|
9
11
|
network: string;
|
|
10
12
|
}) => Promise<unknown>;
|
|
11
13
|
export declare const blux: {
|
|
12
|
-
login: () => Promise<
|
|
14
|
+
login: () => Promise<IUser>;
|
|
13
15
|
logout: () => void;
|
|
16
|
+
fundMe: () => void;
|
|
14
17
|
profile: () => void;
|
|
15
18
|
signMessage: (message: string, options?: {
|
|
16
19
|
network: string;
|
|
@@ -23,5 +26,5 @@ export declare const blux: {
|
|
|
23
26
|
}) => Promise<unknown>;
|
|
24
27
|
readonly isReady: boolean;
|
|
25
28
|
readonly isAuthenticated: boolean;
|
|
26
|
-
readonly user:
|
|
29
|
+
readonly user: IUser | undefined;
|
|
27
30
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { IContractCall, ReadContractsOptions } from '../utils';
|
|
2
|
+
export declare const readContracts: (calls: IContractCall[], options?: ReadContractsOptions) => Promise<any[]>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { xdr } from '@stellar/stellar-sdk';
|
|
2
|
+
export type Numberish = string | number | bigint;
|
|
3
|
+
export declare const numberish: <T extends Numberish>(val: Numberish, targetType: "string" | "number" | "bigint") => T;
|
|
4
|
+
type MapEntry = Record<string, xdr.ScVal | Object>;
|
|
5
|
+
export declare class ToScVal {
|
|
6
|
+
static i32(value: Numberish): xdr.ScVal;
|
|
7
|
+
static i64(value: Numberish): xdr.ScVal;
|
|
8
|
+
static i128(value: Numberish): xdr.ScVal;
|
|
9
|
+
static i256(value: Numberish): xdr.ScVal;
|
|
10
|
+
static u32(value: Numberish): xdr.ScVal;
|
|
11
|
+
static u64(value: Numberish): xdr.ScVal;
|
|
12
|
+
static u128(value: Numberish): xdr.ScVal;
|
|
13
|
+
static u256(value: Numberish): xdr.ScVal;
|
|
14
|
+
static error(value: xdr.ScError): xdr.ScVal;
|
|
15
|
+
static duration(value: Numberish): xdr.ScVal;
|
|
16
|
+
static timepoint(value: Numberish): xdr.ScVal;
|
|
17
|
+
static ledgerKeyNonce(value: xdr.ScNonceKey): xdr.ScVal;
|
|
18
|
+
static contractInstance(value: xdr.ScContractInstance): xdr.ScVal;
|
|
19
|
+
static scvMap(value: null | xdr.ScMapEntry[]): xdr.ScVal;
|
|
20
|
+
static map(value: MapEntry | null): xdr.ScVal;
|
|
21
|
+
static string(value: string | Buffer): xdr.ScVal;
|
|
22
|
+
static vec(value: null | xdr.ScVal[]): xdr.ScVal;
|
|
23
|
+
static void(): xdr.ScVal;
|
|
24
|
+
static bytes(value: Buffer): xdr.ScVal;
|
|
25
|
+
static ledgerKeyContractInstance(): xdr.ScVal;
|
|
26
|
+
static symbol(symbol: string | Buffer): xdr.ScVal;
|
|
27
|
+
static boolean(bool: boolean): xdr.ScVal;
|
|
28
|
+
static address(address: string): xdr.ScVal;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
package/dist/exports/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { BluxEventMap, ReadOnlyEmitter } from '../utils/events';
|
|
2
2
|
export { Asset } from '@stellar/stellar-sdk';
|
|
3
|
+
export * as StellarSdk from '@stellar/stellar-sdk';
|
|
4
|
+
export * from './core';
|
|
3
5
|
export { blux } from './blux';
|
|
6
|
+
export { BluxEvent } from '../utils/events';
|
|
4
7
|
export { getState, subscribe, getInitialState, useExportedStore, } from './exportedStore';
|
|
5
8
|
export declare const setAppearance: (newAppearance: Partial<import("../types").IAppearance>) => void;
|
|
9
|
+
export declare const events: ReadOnlyEmitter<BluxEventMap>;
|
package/dist/exports/utils.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Horizon, rpc } from '@stellar/stellar-sdk';
|
|
2
|
-
export type Val = [any, string];
|
|
1
|
+
import { Horizon, rpc, xdr } from '@stellar/stellar-sdk';
|
|
3
2
|
export type IContractCall = {
|
|
4
3
|
address: string;
|
|
5
4
|
fn: string;
|
|
6
|
-
args:
|
|
5
|
+
args: xdr.ScVal[];
|
|
7
6
|
};
|
|
8
|
-
export type
|
|
7
|
+
export type ReadContractsOptions = {
|
|
8
|
+
network?: string;
|
|
9
|
+
};
|
|
10
|
+
export type WriteContractsOptions = {
|
|
9
11
|
network?: string;
|
|
10
12
|
};
|
|
11
13
|
export type CallBuilderOptions = {
|