@bluxcc/react 0.1.4 → 0.1.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/hooks/useBlux.d.ts +4 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +16 -9
- package/dist/utils/getBorderRadius.d.ts +1 -1
- package/dist/utils/stellar/getTransactionDetails.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chains.d.ts +0 -8
- package/dist/components/Button/buttonVariants.d.ts +0 -9
- package/dist/containers/ConnectModal/content.d.ts +0 -11
- package/dist/containers/ConnectModal/index.d.ts +0 -7
- package/dist/containers/ModalState/Connecting/index.d.ts +0 -3
- package/dist/containers/ModalState/OnBoarding/index.d.ts +0 -7
- package/dist/containers/ModalState/Profile/index.d.ts +0 -3
- package/dist/hooks/useConnectModal.d.ts +0 -12
- package/dist/hooks/useGoogleFont.d.ts +0 -2
- package/dist/utils/BN.d.ts +0 -3
- package/dist/utils/getHorizonServer.d.ts +0 -6
- package/dist/utils/getInitialHeight.d.ts +0 -2
- package/dist/utils/getNetworkByPassphrase.d.ts +0 -1
- package/dist/utils/getNetworkPassphrase.d.ts +0 -1
- package/dist/utils/getTransactionDetails.d.ts +0 -6
- package/dist/utils/handleIcons.d.ts +0 -3
- package/dist/utils/setWalletNetwork.d.ts +0 -3
- package/dist/utils/signTransactionHandler.d.ts +0 -3
- package/dist/utils/submitTransaction.d.ts +0 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Horizon } from '@stellar/stellar-sdk';
|
|
2
|
+
import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon';
|
|
2
3
|
import { Url } from '../utils/network/url';
|
|
3
4
|
import { Fallback } from '../utils/network/fallback';
|
|
4
|
-
import { History } from '../utils/stellar/getTransactions';
|
|
5
5
|
/**
|
|
6
6
|
* Enum representing the supported wallets in the system.
|
|
7
7
|
*/
|
|
@@ -29,7 +29,7 @@ export interface AccountData {
|
|
|
29
29
|
subentry_count: number;
|
|
30
30
|
balances: Horizon.HorizonApi.BalanceLine[];
|
|
31
31
|
thresholds: Horizon.HorizonApi.AccountThresholds;
|
|
32
|
-
transactions?:
|
|
32
|
+
transactions?: Horizon.ServerApi.TransactionRecord[];
|
|
33
33
|
}
|
|
34
34
|
interface IServers {
|
|
35
35
|
horizon?: Url | Fallback;
|
|
@@ -37,15 +37,22 @@ interface IServers {
|
|
|
37
37
|
}
|
|
38
38
|
export type ITransports = Record<string, IServers>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* BluxProvider.config
|
|
41
41
|
*/
|
|
42
42
|
export interface IProviderConfig {
|
|
43
43
|
appName: string;
|
|
44
44
|
networks: string[];
|
|
45
|
-
appearance
|
|
45
|
+
appearance?: Partial<IAppearance>;
|
|
46
46
|
transports?: ITransports;
|
|
47
47
|
loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'passkey'>;
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* context.value.config
|
|
51
|
+
* Appearance will be set to default values if the user does not provider appearance (or provides some of the values in Appearance)
|
|
52
|
+
*/
|
|
53
|
+
export interface IConfig extends IProviderConfig {
|
|
54
|
+
appearance: IAppearance;
|
|
55
|
+
}
|
|
49
56
|
/**
|
|
50
57
|
* Information about the connected wallet.
|
|
51
58
|
*/
|
|
@@ -87,15 +94,15 @@ export interface IAppearance {
|
|
|
87
94
|
background: string;
|
|
88
95
|
accent: string;
|
|
89
96
|
textColor: string;
|
|
90
|
-
font: SupportedFonts;
|
|
91
|
-
cornerRadius: CornerRadius;
|
|
97
|
+
font: SupportedFonts | string;
|
|
98
|
+
cornerRadius: CornerRadius | string;
|
|
92
99
|
logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'];
|
|
93
100
|
}
|
|
94
101
|
/**
|
|
95
102
|
* Structure of the global context values.
|
|
96
103
|
*/
|
|
97
104
|
export interface ContextInterface {
|
|
98
|
-
config:
|
|
105
|
+
config: IConfig;
|
|
99
106
|
user: IUser;
|
|
100
107
|
isModalOpen: boolean;
|
|
101
108
|
isReady: boolean;
|
|
@@ -105,8 +112,8 @@ export interface ContextInterface {
|
|
|
105
112
|
waitingStatus: 'connecting' | 'signing';
|
|
106
113
|
signTransaction: {
|
|
107
114
|
xdr: string;
|
|
108
|
-
resolver: ((value:
|
|
109
|
-
result:
|
|
115
|
+
resolver: ((value: HorizonApi.SubmitTransactionResponse) => void) | null;
|
|
116
|
+
result: HorizonApi.SubmitTransactionResponse | null;
|
|
110
117
|
};
|
|
111
118
|
}
|
|
112
119
|
/**
|
package/package.json
CHANGED
package/dist/chains.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonProps } from './index';
|
|
3
|
-
interface IconButtonProps extends ButtonProps {
|
|
4
|
-
icon: React.ReactNode;
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const ButtonWithIcon: ({ icon, name, ...props }: IconButtonProps) => React.JSX.Element;
|
|
8
|
-
export declare const ButtonWithIconAndArrow: ({ icon, name, ...props }: IconButtonProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Routes } from '../../types';
|
|
3
|
-
interface ModalContentProps {
|
|
4
|
-
showAllWallets: boolean;
|
|
5
|
-
setShowAllWallets: (show: boolean) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const modalContent: Record<Routes, {
|
|
8
|
-
title: string;
|
|
9
|
-
Component: React.FC<ModalContentProps>;
|
|
10
|
-
}>;
|
|
11
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
type OnBoardingProps = {
|
|
3
|
-
showAllWallets: boolean;
|
|
4
|
-
setShowAllWallets: (value: boolean) => void;
|
|
5
|
-
};
|
|
6
|
-
declare const OnBoarding: ({ showAllWallets, setShowAllWallets }: OnBoardingProps) => React.JSX.Element;
|
|
7
|
-
export default OnBoarding;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ModalState } from '../types';
|
|
2
|
-
export interface UseConnectModalReturn {
|
|
3
|
-
modalState: ModalState;
|
|
4
|
-
handleGoBack: () => void;
|
|
5
|
-
setShowAllWallets: (show: boolean) => void;
|
|
6
|
-
closeModal: () => void;
|
|
7
|
-
modalHeader: string;
|
|
8
|
-
showBackButton: boolean;
|
|
9
|
-
showCloseButton: boolean;
|
|
10
|
-
initialHeight: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const useConnectModal: () => UseConnectModalReturn;
|
package/dist/utils/BN.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { HORIZON_SERVERS } from '../constants';
|
|
2
|
-
import { Horizon } from '@stellar/stellar-sdk';
|
|
3
|
-
type HorizonServer = Horizon.Server;
|
|
4
|
-
type NetworkKey = keyof typeof HORIZON_SERVERS;
|
|
5
|
-
export declare const getHorizonServer: (network: NetworkKey) => HorizonServer;
|
|
6
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getNetworkByPassphrase: (passphrase: string) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getNetworkPassphrase: (network: string) => string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const getTransactionDetails: (xdr: string, networkPassPhrase: string) => {
|
|
2
|
-
action: "createAccount" | "payment" | "pathPaymentStrictReceive" | "pathPaymentStrictSend" | "createPassiveSellOffer" | "manageSellOffer" | "manageBuyOffer" | "setOptions" | "changeTrust" | "allowTrust" | "accountMerge" | "inflation" | "manageData" | "bumpSequence" | "createClaimableBalance" | "claimClaimableBalance" | "beginSponsoringFutureReserves" | "endSponsoringFutureReserves" | "revokeSponsorship" | "clawback" | "clawbackClaimableBalance" | "setTrustLineFlags" | "liquidityPoolDeposit" | "liquidityPoolWithdraw" | "invokeHostFunction" | "extendFootprintTtl" | "restoreFootprint";
|
|
3
|
-
operations: number;
|
|
4
|
-
sender: string;
|
|
5
|
-
estimatedFee: number;
|
|
6
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon';
|
|
2
|
-
import { WalletActions } from '../types';
|
|
3
|
-
export declare const signTransactionHandler: (wallet: WalletActions, xdr: string, address: string, networkPassphrase: string, resolver: ((value: HorizonApi.SubmitTransactionResponse) => void) | null) => Promise<HorizonApi.SubmitTransactionResponse>;
|