@bluxcc/react 0.1.2 → 0.1.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.
@@ -0,0 +1,8 @@
1
+ import { Networks } from "@stellar/stellar-sdk";
2
+ export declare const networks: {
3
+ mainnet: Networks;
4
+ testnet: Networks;
5
+ sandbox: Networks;
6
+ futurenet: Networks;
7
+ standalone: Networks;
8
+ };
@@ -29,18 +29,27 @@ export interface AccountData {
29
29
  xlmBalance: string;
30
30
  transactions?: Horizon.ServerApi.TransactionRecord[];
31
31
  }
32
+ interface IServers {
33
+ horizon?: string;
34
+ soroban?: string;
35
+ }
36
+ export type ITransports = Record<string, IServers>;
32
37
  /**
33
38
  * Configuration options for the provider.
34
39
  */
35
40
  export interface IProviderConfig {
36
41
  appName: string;
37
42
  appLogo?: string;
38
- network: string;
43
+ networks: string[];
44
+ appearance: IAppearance;
45
+ transports?: ITransports;
46
+ loginMethods?: Array<'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'passkey'>;
39
47
  }
40
48
  /**
41
49
  * Information about the connected wallet.
42
50
  */
43
51
  export interface WalletInfo {
52
+ passphrase: string;
44
53
  name: SupportedWallets;
45
54
  address: string | null;
46
55
  }
@@ -49,6 +58,8 @@ export interface WalletInfo {
49
58
  */
50
59
  export interface IUser {
51
60
  wallet: WalletInfo | null;
61
+ email: string | null;
62
+ phoneNumber: number | null;
52
63
  }
53
64
  /**
54
65
  * Context state management interface.
@@ -84,7 +95,6 @@ export interface IAppearance {
84
95
  */
85
96
  export interface ContextInterface {
86
97
  config: IProviderConfig;
87
- appearance: IAppearance;
88
98
  user: IUser;
89
99
  isModalOpen: boolean;
90
100
  isReady: boolean;
@@ -108,7 +118,8 @@ export declare enum Routes {
108
118
  PROFILE = "PROFILE",// User profile view
109
119
  SIGN_TRANSACTION = "SIGN_TRANSACTION",// User sign transaction view
110
120
  SEND = "SEND",// User sign transaction view
111
- ACTIVITY = "ACTIVITY"
121
+ ACTIVITY = "ACTIVITY",// User sign transaction view
122
+ OTP = "OTP"
112
123
  }
113
124
  /**
114
125
  * Modal state management interface.
@@ -128,6 +139,7 @@ export interface ModalHeights {
128
139
  [Routes.SIGN_TRANSACTION]: number;
129
140
  [Routes.SEND]: number;
130
141
  [Routes.ACTIVITY]: number;
142
+ [Routes.OTP]: number;
131
143
  }
132
144
  /**
133
145
  * Represents the result of a successful wallet connection.
@@ -141,6 +153,10 @@ export interface ConnectResult {
141
153
  export interface SignResult {
142
154
  signedXdr: string;
143
155
  }
156
+ export interface GetNetworkResult {
157
+ network: string;
158
+ passphrase: string;
159
+ }
144
160
  /**
145
161
  * Defines the available actions for interacting with a wallet.
146
162
  */
@@ -162,9 +178,9 @@ export interface WalletInterface {
162
178
  submit?: boolean;
163
179
  }) => Promise<string>;
164
180
  disconnect?: () => Promise<void>;
165
- getNetwork?: () => Promise<{
181
+ getNetwork: () => Promise<{
166
182
  network: string;
167
- networkPassphrase: string;
183
+ passphrase: string;
168
184
  }>;
169
185
  signMessage?: (message: string, options?: {
170
186
  networkPassphrase?: string;
@@ -183,3 +199,4 @@ export interface WalletInterface {
183
199
  signerPublicKey?: string;
184
200
  }>;
185
201
  }
202
+ export {};
@@ -0,0 +1,3 @@
1
+ import { WalletInterface } from "../types";
2
+ declare const setWalletNetwork: (wallet: WalletInterface, networks: string[]) => Promise<string>;
3
+ export default setWalletNetwork;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bluxcc/react",
3
3
  "author": "Blux team",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "homepage": "https://blux.cc",
6
6
  "description": "Connecting to the Stellar Ecosystem and Beyond",
7
7
  "repository": {