@bluxcc/react 0.1.3 → 0.1.4

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.
@@ -1,5 +1,7 @@
1
1
  import { Horizon } from '@stellar/stellar-sdk';
2
- import { HorizonApi } from '@stellar/stellar-sdk/lib/horizon';
2
+ import { Url } from '../utils/network/url';
3
+ import { Fallback } from '../utils/network/fallback';
4
+ import { History } from '../utils/stellar/getTransactions';
3
5
  /**
4
6
  * Enum representing the supported wallets in the system.
5
7
  */
@@ -23,15 +25,15 @@ export declare enum WalletNetwork {
23
25
  export interface AccountData {
24
26
  id: string;
25
27
  sequence: string;
28
+ xlmBalance: string;
26
29
  subentry_count: number;
27
- thresholds: Horizon.HorizonApi.AccountThresholds;
28
30
  balances: Horizon.HorizonApi.BalanceLine[];
29
- xlmBalance: string;
30
- transactions?: Horizon.ServerApi.TransactionRecord[];
31
+ thresholds: Horizon.HorizonApi.AccountThresholds;
32
+ transactions?: History[];
31
33
  }
32
34
  interface IServers {
33
- horizon?: string;
34
- soroban?: string;
35
+ horizon?: Url | Fallback;
36
+ soroban?: Url | Fallback;
35
37
  }
36
38
  export type ITransports = Record<string, IServers>;
37
39
  /**
@@ -39,7 +41,6 @@ export type ITransports = Record<string, IServers>;
39
41
  */
40
42
  export interface IProviderConfig {
41
43
  appName: string;
42
- appLogo?: string;
43
44
  networks: string[];
44
45
  appearance: IAppearance;
45
46
  transports?: ITransports;
@@ -88,7 +89,7 @@ export interface IAppearance {
88
89
  textColor: string;
89
90
  font: SupportedFonts;
90
91
  cornerRadius: CornerRadius;
91
- cover: string;
92
+ logo?: React.ImgHTMLAttributes<HTMLImageElement>['src'];
92
93
  }
93
94
  /**
94
95
  * Structure of the global context values.
@@ -104,8 +105,8 @@ export interface ContextInterface {
104
105
  waitingStatus: 'connecting' | 'signing';
105
106
  signTransaction: {
106
107
  xdr: string;
107
- resolver: ((value: HorizonApi.SubmitTransactionResponse) => void) | null;
108
- result: HorizonApi.SubmitTransactionResponse | null;
108
+ resolver: ((value: Horizon.HorizonApi.SubmitTransactionResponse) => void) | null;
109
+ result: Horizon.HorizonApi.SubmitTransactionResponse | null;
109
110
  };
110
111
  }
111
112
  /**
@@ -0,0 +1,3 @@
1
+ import { WalletInterface } from '../types';
2
+ declare const getWalletNetwork: (wallet: WalletInterface, networks: string[]) => Promise<string>;
3
+ export default getWalletNetwork;
@@ -0,0 +1,13 @@
1
+ import { Url } from './url';
2
+ export interface FallbackOptions {
3
+ retryCount?: number;
4
+ retryDelay?: number;
5
+ }
6
+ export interface Fallback extends FallbackOptions {
7
+ urls: Url[];
8
+ }
9
+ export declare const fallback: (urls: Url[], options?: FallbackOptions) => {
10
+ retryCount?: number;
11
+ retryDelay?: number;
12
+ urls: Url[];
13
+ };
@@ -0,0 +1,12 @@
1
+ export interface UrlOptions {
2
+ allowHttp?: boolean;
3
+ appName?: string;
4
+ appVersion?: string;
5
+ authToken?: string;
6
+ retryCount?: number;
7
+ retryDelay?: number;
8
+ }
9
+ export interface Url extends UrlOptions {
10
+ url: string;
11
+ }
12
+ export declare const url: (urlStr: string, options?: UrlOptions) => Url;
@@ -1,5 +1,5 @@
1
1
  declare const getTransactionDetails: (xdr: 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";
2
+ action: "payment" | "createAccount" | "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
3
  operations: number;
4
4
  sender: string;
5
5
  estimatedFee: number;
@@ -0,0 +1,7 @@
1
+ import { Horizon } from '@stellar/stellar-sdk';
2
+ export type History = {
3
+ title: string;
4
+ description: string;
5
+ others?: any;
6
+ };
7
+ export declare const getTransactions: (server: Horizon.Server, publicKey: string) => Promise<History[]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bluxcc/react",
3
3
  "author": "Blux team",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "homepage": "https://blux.cc",
6
6
  "description": "Connecting to the Stellar Ecosystem and Beyond",
7
7
  "repository": {