@bluxcc/react 0.1.18 → 0.1.20
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 +12 -5
- package/dist/assets/Icons.d.ts +3 -0
- package/dist/assets/logos.d.ts +1 -0
- package/dist/constants/index.d.ts +1 -5
- package/dist/containers/Pages/SelectAsset/index.d.ts +9 -0
- package/dist/containers/Pages/Send/SendForm.d.ts +3 -0
- package/dist/context/useCheckWalletNetwork.d.ts +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/types/index.d.ts +11 -1
- package/dist/useStellar/useAccount.d.ts +1 -1
- package/dist/utils/apis/getAssetLogos.d.ts +12 -0
- package/dist/utils/network/getNetworkRpc.d.ts +2 -2
- package/dist/utils/network/getNetworkTitle.d.ts +2 -0
- package/dist/utils/stellar/paymentTransaction.d.ts +4 -0
- package/dist/wallets/configs/hotConfig.d.ts +2 -0
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -30,16 +30,23 @@ yarn add @bluxcc/react
|
|
|
30
30
|
Import Blux and set up the authentication flow:
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import { BluxProvider, useBlux } from '@bluxcc/react';
|
|
33
|
+
import { BluxProvider, useBlux, networks } from '@bluxcc/react';
|
|
34
34
|
|
|
35
35
|
const ConnectButton = () => {
|
|
36
|
-
const {
|
|
37
|
-
|
|
36
|
+
const { login } = useBlux();
|
|
37
|
+
|
|
38
|
+
return <button onClick={login}>Login</button>;
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
const App = () => {
|
|
42
|
+
const config = {
|
|
43
|
+
appName: 'Your App',
|
|
44
|
+
networks: [networks.mainnet, networks.testnet],
|
|
45
|
+
defaultNetwork: networks.mainnet,
|
|
46
|
+
};
|
|
47
|
+
|
|
41
48
|
return (
|
|
42
|
-
<BluxProvider config={
|
|
49
|
+
<BluxProvider config={config}>
|
|
43
50
|
<ConnectButton />
|
|
44
51
|
</BluxProvider>
|
|
45
52
|
);
|
|
@@ -70,7 +77,7 @@ Currently supported connection methods:
|
|
|
70
77
|
- [x] **Albedo**
|
|
71
78
|
- [ ] **Ledger**
|
|
72
79
|
- [ ] **Trezor**
|
|
73
|
-
- [
|
|
80
|
+
- [x] **Hana**
|
|
74
81
|
- [ ] **WalletConnect**
|
|
75
82
|
- [ ] **OAuth**
|
|
76
83
|
- [ ] **Email**
|
package/dist/assets/Icons.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export declare const Close: ({ fill }: {
|
|
|
14
14
|
export declare const Loading: ({ fill }: {
|
|
15
15
|
fill?: string;
|
|
16
16
|
}) => React.JSX.Element;
|
|
17
|
+
export declare const Search: ({ fill }: {
|
|
18
|
+
fill?: string;
|
|
19
|
+
}) => React.JSX.Element;
|
|
17
20
|
export declare const GreenCheck: () => React.JSX.Element;
|
|
18
21
|
export declare const LogOut: ({ fill }: {
|
|
19
22
|
fill?: string;
|
package/dist/assets/logos.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const AlbedoLogo: () => React.JSX.Element;
|
|
|
3
3
|
export declare const HanaLogo: ({ fill }: {
|
|
4
4
|
fill?: string;
|
|
5
5
|
}) => React.JSX.Element;
|
|
6
|
+
export declare const HotLogo: () => React.JSX.Element;
|
|
6
7
|
export declare const RabetLogo: ({ fill }: {
|
|
7
8
|
fill?: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { IAppearance } from '../types';
|
|
2
|
-
export declare const
|
|
3
|
-
public: string;
|
|
4
|
-
testnet: string;
|
|
5
|
-
futurenet: string;
|
|
6
|
-
};
|
|
2
|
+
export declare const ASSET_SERVER = "https://asset.rabet.io/assets";
|
|
7
3
|
export declare const defaultLightTheme: IAppearance;
|
|
8
4
|
export declare const defaultDarkTheme: IAppearance;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IAsset } from '../../../types';
|
|
3
|
+
type SelectAssetsProps = {
|
|
4
|
+
assets: IAsset[];
|
|
5
|
+
setShowSelectAssetPage: React.Dispatch<React.SetStateAction<boolean>>;
|
|
6
|
+
setSelectedAsset: React.Dispatch<React.SetStateAction<IAsset>>;
|
|
7
|
+
};
|
|
8
|
+
declare const SelectAssets: ({ assets, setSelectedAsset, setShowSelectAssetPage, }: SelectAssetsProps) => React.JSX.Element;
|
|
9
|
+
export default SelectAssets;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContextInterface, Routes } from
|
|
1
|
+
import { ContextInterface, Routes } from '../types';
|
|
2
2
|
declare const useCheckWalletNetwork: (value: ContextInterface, setValue: React.Dispatch<React.SetStateAction<ContextInterface>>, setRoute: React.Dispatch<React.SetStateAction<Routes>>) => void;
|
|
3
3
|
export default useCheckWalletNetwork;
|