@use-glyph/sdk-react 2.2.2 → 2.2.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.
@@ -9,6 +9,7 @@ interface WalletTradePendingViewProps {
9
9
  sellAmount: number;
10
10
  buyAmount: number;
11
11
  isTxApproved: boolean;
12
+ statusError?: string;
12
13
  }
13
14
  declare const _default: import('react').NamedExoticComponent<WalletTradePendingViewProps>;
14
15
  export default _default;
@@ -7,5 +7,5 @@ export declare class GlyphDataRequestError extends Error {
7
7
  readonly status: number;
8
8
  constructor(status: number);
9
9
  }
10
- export declare function fetchScopedGlyphData<T>(apiFetch: GlyphApiFetch | null, path: string, signal: AbortSignal, isCurrent: () => boolean, scope: string): Promise<ScopedGlyphData<T>>;
10
+ export declare function fetchScopedGlyphData<T>(apiFetch: GlyphApiFetch | null, path: string, signal: AbortSignal, isCurrent: () => boolean, scope: string, decode?: (value: unknown) => T): Promise<ScopedGlyphData<T>>;
11
11
  export declare function shouldRetryGlyphData(error: Error, failureCount: number, limit: number): boolean;
@@ -38,6 +38,7 @@ export type ActivityGroup = {
38
38
  export declare function useActivity(pageSize?: number, filter?: {
39
39
  types: ActivityType[];
40
40
  }): {
41
+ refreshKey: string;
41
42
  transactionGroups: ActivityGroup[];
42
43
  fetchTransactions: (reset?: boolean) => Promise<ActivityGroup[] | null>;
43
44
  loadMore: () => Promise<boolean>;
@@ -1,2 +1,164 @@
1
1
  import { GlyphWidgetBalances } from '../types';
2
- export declare function useBalancesForChain(chainId?: number | "all"): import('@tanstack/react-query').UseQueryResult<NoInfer<GlyphWidgetBalances | null>, Error>;
2
+ export declare function useBalancesForChain(chainId?: number | "all"): {
3
+ data: GlyphWidgetBalances | null;
4
+ error: Error;
5
+ isError: true;
6
+ isPending: false;
7
+ isLoading: false;
8
+ isLoadingError: false;
9
+ isRefetchError: true;
10
+ isSuccess: false;
11
+ isPlaceholderData: false;
12
+ status: "error";
13
+ dataUpdatedAt: number;
14
+ errorUpdatedAt: number;
15
+ failureCount: number;
16
+ failureReason: Error | null;
17
+ errorUpdateCount: number;
18
+ isFetched: boolean;
19
+ isFetchedAfterMount: boolean;
20
+ isFetching: boolean;
21
+ isInitialLoading: boolean;
22
+ isPaused: boolean;
23
+ isRefetching: boolean;
24
+ isStale: boolean;
25
+ isEnabled: boolean;
26
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
27
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
28
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
29
+ } | {
30
+ data: GlyphWidgetBalances | null;
31
+ error: null;
32
+ isError: false;
33
+ isPending: false;
34
+ isLoading: false;
35
+ isLoadingError: false;
36
+ isRefetchError: false;
37
+ isSuccess: true;
38
+ isPlaceholderData: false;
39
+ status: "success";
40
+ dataUpdatedAt: number;
41
+ errorUpdatedAt: number;
42
+ failureCount: number;
43
+ failureReason: Error | null;
44
+ errorUpdateCount: number;
45
+ isFetched: boolean;
46
+ isFetchedAfterMount: boolean;
47
+ isFetching: boolean;
48
+ isInitialLoading: boolean;
49
+ isPaused: boolean;
50
+ isRefetching: boolean;
51
+ isStale: boolean;
52
+ isEnabled: boolean;
53
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
54
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
55
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
56
+ } | {
57
+ data: GlyphWidgetBalances | null;
58
+ error: Error;
59
+ isError: true;
60
+ isPending: false;
61
+ isLoading: false;
62
+ isLoadingError: true;
63
+ isRefetchError: false;
64
+ isSuccess: false;
65
+ isPlaceholderData: false;
66
+ status: "error";
67
+ dataUpdatedAt: number;
68
+ errorUpdatedAt: number;
69
+ failureCount: number;
70
+ failureReason: Error | null;
71
+ errorUpdateCount: number;
72
+ isFetched: boolean;
73
+ isFetchedAfterMount: boolean;
74
+ isFetching: boolean;
75
+ isInitialLoading: boolean;
76
+ isPaused: boolean;
77
+ isRefetching: boolean;
78
+ isStale: boolean;
79
+ isEnabled: boolean;
80
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
81
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
82
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
83
+ } | {
84
+ data: GlyphWidgetBalances | null;
85
+ error: null;
86
+ isError: false;
87
+ isPending: true;
88
+ isLoading: true;
89
+ isLoadingError: false;
90
+ isRefetchError: false;
91
+ isSuccess: false;
92
+ isPlaceholderData: false;
93
+ status: "pending";
94
+ dataUpdatedAt: number;
95
+ errorUpdatedAt: number;
96
+ failureCount: number;
97
+ failureReason: Error | null;
98
+ errorUpdateCount: number;
99
+ isFetched: boolean;
100
+ isFetchedAfterMount: boolean;
101
+ isFetching: boolean;
102
+ isInitialLoading: boolean;
103
+ isPaused: boolean;
104
+ isRefetching: boolean;
105
+ isStale: boolean;
106
+ isEnabled: boolean;
107
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
108
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
109
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
110
+ } | {
111
+ data: GlyphWidgetBalances | null;
112
+ error: null;
113
+ isError: false;
114
+ isPending: true;
115
+ isLoadingError: false;
116
+ isRefetchError: false;
117
+ isSuccess: false;
118
+ isPlaceholderData: false;
119
+ status: "pending";
120
+ dataUpdatedAt: number;
121
+ errorUpdatedAt: number;
122
+ failureCount: number;
123
+ failureReason: Error | null;
124
+ errorUpdateCount: number;
125
+ isFetched: boolean;
126
+ isFetchedAfterMount: boolean;
127
+ isFetching: boolean;
128
+ isLoading: boolean;
129
+ isInitialLoading: boolean;
130
+ isPaused: boolean;
131
+ isRefetching: boolean;
132
+ isStale: boolean;
133
+ isEnabled: boolean;
134
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
135
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
136
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
137
+ } | {
138
+ data: GlyphWidgetBalances | null;
139
+ isError: false;
140
+ error: null;
141
+ isPending: false;
142
+ isLoading: false;
143
+ isLoadingError: false;
144
+ isRefetchError: false;
145
+ isSuccess: true;
146
+ isPlaceholderData: true;
147
+ status: "success";
148
+ dataUpdatedAt: number;
149
+ errorUpdatedAt: number;
150
+ failureCount: number;
151
+ failureReason: Error | null;
152
+ errorUpdateCount: number;
153
+ isFetched: boolean;
154
+ isFetchedAfterMount: boolean;
155
+ isFetching: boolean;
156
+ isInitialLoading: boolean;
157
+ isPaused: boolean;
158
+ isRefetching: boolean;
159
+ isStale: boolean;
160
+ isEnabled: boolean;
161
+ refetch: (options?: import('@tanstack/react-query').RefetchOptions) => Promise<import('@tanstack/react-query').QueryObserverResult<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>, Error>>;
162
+ fetchStatus: import('@tanstack/react-query').FetchStatus;
163
+ promise: Promise<NoInfer<import('../context/glyphDataQuery').ScopedGlyphData<GlyphWidgetBalances>>>;
164
+ };
@@ -0,0 +1,11 @@
1
+ /** Opaque lifetime for private reads; credentials never enter query keys. */
2
+ export declare function useGlyphReadScope(identity?: unknown): {
3
+ scope: {
4
+ key: `${string}-${string}-${string}-${string}-${string}`;
5
+ glyphUrl: string;
6
+ identity: unknown;
7
+ apiFetch: import('../context/GlyphContext').GlyphApiFetch | null;
8
+ active: boolean;
9
+ };
10
+ isCurrent: () => boolean;
11
+ };
@@ -0,0 +1,6 @@
1
+ import { GlyphWidgetBalances } from '../types';
2
+ export declare class GlyphBalancesDecodeError extends Error {
3
+ constructor();
4
+ }
5
+ /** Decode only explicitly negotiated NFT image references; legacy arrays pass through unchanged. */
6
+ export declare function decodeGlyphBalances(value: unknown): GlyphWidgetBalances;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@use-glyph/sdk-react",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "type": "module",
5
5
  "license": "GLYPH-1.0",
6
6
  "sideEffects": false,