@initia/interwovenkit-react 2.0.0-rc.5 → 2.0.0-rc.7

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/index.d.ts CHANGED
@@ -18,7 +18,6 @@ import { SimulateResponse } from 'cosmjs-types/cosmos/tx/v1beta1/service';
18
18
  import { StdSignDoc } from '@cosmjs/amino';
19
19
  import { UseQueryResult } from '@tanstack/react-query';
20
20
  import { Wallet } from '@rainbow-me/rainbowkit';
21
- import { z } from 'zod';
22
21
 
23
22
  declare interface Config {
24
23
  defaultChainId: string;
@@ -30,45 +29,24 @@ declare interface Config {
30
29
  usernamesModuleAddress: string;
31
30
  theme: "light" | "dark";
32
31
  container?: HTMLElement;
32
+ disableAnalytics?: boolean;
33
33
  }
34
34
 
35
35
  export declare const DEFAULT_GAS_ADJUSTMENT = 1.4;
36
36
 
37
- export declare const DEFAULT_GAS_PRICE_MULTIPLIER = 1.03;
38
-
39
- declare type FormValues = z.infer<typeof FormValuesSchema>;
40
-
41
- declare const FormValuesSchema: z.ZodObject<{
42
- srcChainId: z.ZodString;
43
- srcDenom: z.ZodString;
44
- dstChainId: z.ZodString;
45
- dstDenom: z.ZodString;
46
- quantity: z.ZodString;
47
- sender: z.ZodString;
48
- cosmosWalletName: z.ZodOptional<z.ZodString>;
49
- recipient: z.ZodString;
50
- slippagePercent: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
52
- srcChainId: string;
53
- srcDenom: string;
54
- dstChainId: string;
55
- dstDenom: string;
56
- quantity: string;
57
- sender: string;
58
- recipient: string;
59
- slippagePercent: string;
60
- cosmosWalletName?: string | undefined;
61
- }, {
37
+ export declare const DEFAULT_GAS_PRICE_MULTIPLIER = 1.05;
38
+
39
+ declare interface FormValues {
62
40
  srcChainId: string;
63
41
  srcDenom: string;
64
42
  dstChainId: string;
65
43
  dstDenom: string;
66
44
  quantity: string;
67
45
  sender: string;
46
+ cosmosWalletName?: string;
68
47
  recipient: string;
69
48
  slippagePercent: string;
70
- cosmosWalletName?: string | undefined;
71
- }>;
49
+ }
72
50
 
73
51
  export declare const initiaPrivyWallet: () => Wallet;
74
52
 
@@ -106,6 +84,37 @@ declare class OfflineSigner implements OfflineAminoSigner {
106
84
  signAmino(signerAddress: string, signDoc: StdSignDoc): Promise<AminoSignResponse>;
107
85
  }
108
86
 
87
+ declare interface PortfolioAssetGroup extends PortfolioAssetGroupInfo {
88
+ assets: Array<PortfolioAssetItem>;
89
+ }
90
+
91
+ declare interface PortfolioAssetGroupInfo {
92
+ symbol: string;
93
+ logoUrl: string;
94
+ }
95
+
96
+ declare interface PortfolioAssetItem extends PortfolioAssetGroupInfo {
97
+ amount: string;
98
+ denom: string;
99
+ decimals: number;
100
+ quantity: string;
101
+ price?: number;
102
+ value?: number;
103
+ address?: string;
104
+ unlisted?: boolean;
105
+ chain: PortfolioChainInfo;
106
+ }
107
+
108
+ declare interface PortfolioChainInfo {
109
+ chainId: string;
110
+ name: string;
111
+ logoUrl: string;
112
+ }
113
+
114
+ declare interface PortfolioChainItem extends PortfolioChainInfo {
115
+ value: number;
116
+ }
117
+
109
118
  export declare const TESTNET: Config;
110
119
 
111
120
  declare interface TxRequest {
@@ -142,10 +151,21 @@ export declare function useInterwovenKit(): {
142
151
  hexAddress: string;
143
152
  username: string | null | undefined;
144
153
  offlineSigner: OfflineSigner;
154
+ isConnected: boolean;
145
155
  isOpen: boolean;
146
156
  openConnect: () => void;
147
157
  openWallet: () => void;
148
158
  openBridge: (defaultValues?: Partial<FormValues>) => void;
159
+ disconnect: () => void;
160
+ };
161
+
162
+ export declare function usePortfolio(): {
163
+ isLoading: boolean;
164
+ refetch: () => void;
165
+ chainsByValue: PortfolioChainItem[];
166
+ assetGroups: PortfolioAssetGroup[];
167
+ unlistedAssets: PortfolioAssetItem[];
168
+ totalValue: number;
149
169
  };
150
170
 
151
171
  export declare function useUsernameQuery(): UseQueryResult<string | null, Error>;