@orbs-network/spot-react 0.1.0 → 1.0.0
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/ccip-bPFWIGtu.js +149 -0
- package/dist/index-Jq763Rdi.js +45137 -0
- package/dist/index.d.ts +2 -2
- package/dist/spot-react/package.json.d.ts +63 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts +9 -0
- package/dist/spot-react/src/components/TokenLogo.d.ts.map +1 -0
- package/dist/spot-react/src/components/format-number.d.ts +10 -0
- package/dist/spot-react/src/components/format-number.d.ts.map +1 -0
- package/dist/spot-react/src/components/order-details.d.ts +75 -0
- package/dist/spot-react/src/components/order-details.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/order-fills.d.ts +8 -0
- package/dist/spot-react/src/components/orders/order-fills.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/order-preview.d.ts +3 -0
- package/dist/spot-react/src/components/orders/order-preview.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders-list.d.ts +2 -0
- package/dist/spot-react/src/components/orders/orders-list.d.ts.map +1 -0
- package/dist/spot-react/src/components/orders/orders.d.ts +2 -0
- package/dist/spot-react/src/components/orders/orders.d.ts.map +1 -0
- package/dist/spot-react/src/components/portal.d.ts +6 -0
- package/dist/spot-react/src/components/portal.d.ts.map +1 -0
- package/dist/spot-react/src/components/submit-order-panel.d.ts +10 -0
- package/dist/spot-react/src/components/submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/consts.d.ts +8 -0
- package/dist/spot-react/src/consts.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts +438 -0
- package/dist/spot-react/src/hooks/helper-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts +39 -0
- package/dist/spot-react/src/hooks/order-hooks.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-addresses.d.ts +4 -0
- package/dist/spot-react/src/hooks/use-addresses.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-amounts-usd.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts +90 -0
- package/dist/spot-react/src/hooks/use-build-order-info.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-deadline.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-default-values.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-disclaimer-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts +11 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts +7 -0
- package/dist/spot-react/src/hooks/use-dst-token-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts +25 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fees.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-fees.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +19 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-get-transaction-receipt.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-history-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-input-errors.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts +18 -0
- package/dist/spot-react/src/hooks/use-input-with-percentage.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts +8 -0
- package/dist/spot-react/src/hooks/use-invert-trade-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-limit-price-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-order.d.ts +121 -0
- package/dist/spot-react/src/hooks/use-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-partner-chains.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts +37 -0
- package/dist/spot-react/src/hooks/use-repermit-order-data.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts +6 -0
- package/dist/spot-react/src/hooks/use-src-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts +31 -0
- package/dist/spot-react/src/hooks/use-submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-toggle-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-trade-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts +32 -0
- package/dist/spot-react/src/hooks/use-trades.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts +3 -0
- package/dist/spot-react/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts +28 -0
- package/dist/spot-react/src/hooks/use-trigger-price-panel.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts +25 -0
- package/dist/spot-react/src/hooks/use-trigger-price.d.ts.map +1 -0
- package/dist/spot-react/src/i18n/en.json.d.ts +99 -0
- package/dist/spot-react/src/index.d.ts +38 -0
- package/dist/spot-react/src/index.d.ts.map +1 -0
- package/dist/spot-react/src/spot-context.d.ts +6 -0
- package/dist/spot-react/src/spot-context.d.ts.map +1 -0
- package/dist/spot-react/src/store.d.ts +11 -0
- package/dist/spot-react/src/store.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +487 -0
- package/dist/spot-react/src/types.d.ts.map +1 -0
- package/dist/spot-react/src/utils.d.ts +26 -0
- package/dist/spot-react/src/utils.d.ts.map +1 -0
- package/dist/spot-react.js +133 -0
- package/dist/spot-react.umd.cjs +126 -0
- package/dist/spot-ui/src/index.d.ts +14 -0
- package/dist/spot-ui/src/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/abi/erc20.json.d.ts +291 -0
- package/dist/spot-ui/src/lib/abi/index.d.ts +260 -0
- package/dist/spot-ui/src/lib/abi/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/abi/iweth.json.d.ts +41 -0
- package/dist/spot-ui/src/lib/abi/repermit.json.d.ts +315 -0
- package/dist/spot-ui/src/lib/analytics.d.ts +108 -0
- package/dist/spot-ui/src/lib/analytics.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts +55 -0
- package/dist/spot-ui/src/lib/build-repermit-order-data.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/consts.d.ts +118 -0
- package/dist/spot-ui/src/lib/consts.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/lib.d.ts +67 -0
- package/dist/spot-ui/src/lib/lib.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/networks.d.ts +445 -0
- package/dist/spot-ui/src/lib/networks.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/index.d.ts +11 -0
- package/dist/spot-ui/src/lib/orders/index.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts +34 -0
- package/dist/spot-ui/src/lib/orders/v1-orders.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts +10 -0
- package/dist/spot-ui/src/lib/orders/v2-orders.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/submit-order.d.ts +3 -0
- package/dist/spot-ui/src/lib/submit-order.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/types.d.ts +308 -0
- package/dist/spot-ui/src/lib/types.d.ts.map +1 -0
- package/dist/spot-ui/src/lib/utils.d.ts +458 -0
- package/dist/spot-ui/src/lib/utils.d.ts.map +1 -0
- package/package.json +41 -19
- package/dist/index.cjs.js +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.es.js +0 -626
- package/dist/wallet-info.d.ts +0 -7
- package/dist/wallet-info.d.ts.map +0 -1
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { default as BN } from 'bignumber.js';
|
|
2
|
+
import { Config, Order, Partners, TimeDuration, TimeUnit } from './types';
|
|
3
|
+
export declare const getTheGraphUrl: (chainId?: number) => string | undefined;
|
|
4
|
+
export declare const groupBy: (array: any | undefined, key: string) => any;
|
|
5
|
+
type KeyByArray<T> = {
|
|
6
|
+
[key: string]: T;
|
|
7
|
+
};
|
|
8
|
+
export declare const keyBy: <T>(array: T[], key: keyof T) => KeyByArray<T>;
|
|
9
|
+
export declare const compact: <T>(array: (T | null | undefined | false | "")[]) => T[];
|
|
10
|
+
export declare const orderBy: <T>(array: T[], key: (item: T) => any, order?: "asc" | "desc") => T[];
|
|
11
|
+
export declare const amountUi: (decimals?: number, amount?: string) => string;
|
|
12
|
+
export declare const amountBN: (decimals?: number, amount?: string) => string;
|
|
13
|
+
export declare const zero: BN;
|
|
14
|
+
export declare const one: BN;
|
|
15
|
+
export declare const ten: BN;
|
|
16
|
+
export declare const ether: BN;
|
|
17
|
+
export declare function bn(n: BN.Value, base?: number): BN;
|
|
18
|
+
export declare function convertDecimals(n: BN.Value, sourceDecimals: number, targetDecimals: number): BN;
|
|
19
|
+
export declare function eqIgnoreCase(a: string, b: string): boolean;
|
|
20
|
+
export declare function parsebn(n: BN.Value, defaultValue?: BN, fmt?: BN.Format): BN;
|
|
21
|
+
export declare const isNativeAddress: (address?: string) => boolean;
|
|
22
|
+
export declare function delay(ms: number): Promise<unknown>;
|
|
23
|
+
export declare function findTimeUnit(_millis: number): TimeUnit;
|
|
24
|
+
export declare const getTimeDurationMillis: (duration?: TimeDuration) => number;
|
|
25
|
+
export declare const safeInteger: (value?: string) => string;
|
|
26
|
+
export declare const safeBNString: (value?: string | number) => string;
|
|
27
|
+
export declare const safeBNNumber: (value?: string | number) => number;
|
|
28
|
+
export declare const getNetwork: (chainId?: number) => {
|
|
29
|
+
id: number;
|
|
30
|
+
name: string;
|
|
31
|
+
shortname: string;
|
|
32
|
+
native: {
|
|
33
|
+
address: string;
|
|
34
|
+
symbol: string;
|
|
35
|
+
decimals: number;
|
|
36
|
+
logoUrl: string;
|
|
37
|
+
};
|
|
38
|
+
wToken: {
|
|
39
|
+
symbol: string;
|
|
40
|
+
address: string;
|
|
41
|
+
decimals: number;
|
|
42
|
+
logoUrl: string;
|
|
43
|
+
};
|
|
44
|
+
publicRpcUrl: string;
|
|
45
|
+
logoUrl: string;
|
|
46
|
+
explorer: string;
|
|
47
|
+
eip1559: boolean;
|
|
48
|
+
} | {
|
|
49
|
+
id: number;
|
|
50
|
+
name: string;
|
|
51
|
+
shortname: string;
|
|
52
|
+
native: {
|
|
53
|
+
address: string;
|
|
54
|
+
symbol: string;
|
|
55
|
+
decimals: number;
|
|
56
|
+
logoUrl: string;
|
|
57
|
+
};
|
|
58
|
+
wToken: {
|
|
59
|
+
symbol: string;
|
|
60
|
+
address: string;
|
|
61
|
+
decimals: number;
|
|
62
|
+
logoUrl: string;
|
|
63
|
+
};
|
|
64
|
+
publicRpcUrl: string;
|
|
65
|
+
logoUrl: string;
|
|
66
|
+
explorer: string;
|
|
67
|
+
eip1559: boolean;
|
|
68
|
+
} | {
|
|
69
|
+
id: number;
|
|
70
|
+
name: string;
|
|
71
|
+
shortname: string;
|
|
72
|
+
native: {
|
|
73
|
+
address: string;
|
|
74
|
+
symbol: string;
|
|
75
|
+
decimals: number;
|
|
76
|
+
logoUrl: string;
|
|
77
|
+
};
|
|
78
|
+
wToken: {
|
|
79
|
+
symbol: string;
|
|
80
|
+
address: string;
|
|
81
|
+
decimals: number;
|
|
82
|
+
logoUrl: string;
|
|
83
|
+
};
|
|
84
|
+
publicRpcUrl: string;
|
|
85
|
+
logoUrl: string;
|
|
86
|
+
explorer: string;
|
|
87
|
+
eip1559: boolean;
|
|
88
|
+
} | {
|
|
89
|
+
id: number;
|
|
90
|
+
name: string;
|
|
91
|
+
shortname: string;
|
|
92
|
+
native: {
|
|
93
|
+
address: string;
|
|
94
|
+
symbol: string;
|
|
95
|
+
decimals: number;
|
|
96
|
+
logoUrl: string;
|
|
97
|
+
};
|
|
98
|
+
wToken: {
|
|
99
|
+
symbol: string;
|
|
100
|
+
address: string;
|
|
101
|
+
decimals: number;
|
|
102
|
+
logoUrl: string;
|
|
103
|
+
};
|
|
104
|
+
publicRpcUrl: string;
|
|
105
|
+
logoUrl: string;
|
|
106
|
+
explorer: string;
|
|
107
|
+
eip1559: boolean;
|
|
108
|
+
} | {
|
|
109
|
+
id: number;
|
|
110
|
+
name: string;
|
|
111
|
+
shortname: string;
|
|
112
|
+
native: {
|
|
113
|
+
address: string;
|
|
114
|
+
symbol: string;
|
|
115
|
+
decimals: number;
|
|
116
|
+
logoUrl: string;
|
|
117
|
+
};
|
|
118
|
+
wToken: {
|
|
119
|
+
symbol: string;
|
|
120
|
+
address: string;
|
|
121
|
+
decimals: number;
|
|
122
|
+
logoUrl: string;
|
|
123
|
+
};
|
|
124
|
+
publicRpcUrl: string;
|
|
125
|
+
logoUrl: string;
|
|
126
|
+
explorer: string;
|
|
127
|
+
eip1559: boolean;
|
|
128
|
+
} | {
|
|
129
|
+
id: number;
|
|
130
|
+
name: string;
|
|
131
|
+
shortname: string;
|
|
132
|
+
native: {
|
|
133
|
+
address: string;
|
|
134
|
+
symbol: string;
|
|
135
|
+
decimals: number;
|
|
136
|
+
logoUrl: string;
|
|
137
|
+
};
|
|
138
|
+
wToken: {
|
|
139
|
+
symbol: string;
|
|
140
|
+
address: string;
|
|
141
|
+
decimals: number;
|
|
142
|
+
logoUrl: string;
|
|
143
|
+
};
|
|
144
|
+
publicRpcUrl: string;
|
|
145
|
+
logoUrl: string;
|
|
146
|
+
explorer: string;
|
|
147
|
+
eip1559: boolean;
|
|
148
|
+
} | {
|
|
149
|
+
id: number;
|
|
150
|
+
name: string;
|
|
151
|
+
shortname: string;
|
|
152
|
+
native: {
|
|
153
|
+
address: string;
|
|
154
|
+
symbol: string;
|
|
155
|
+
decimals: number;
|
|
156
|
+
logoUrl: string;
|
|
157
|
+
};
|
|
158
|
+
wToken: {
|
|
159
|
+
symbol: string;
|
|
160
|
+
address: string;
|
|
161
|
+
decimals: number;
|
|
162
|
+
logoUrl: string;
|
|
163
|
+
};
|
|
164
|
+
publicRpcUrl: string;
|
|
165
|
+
logoUrl: string;
|
|
166
|
+
explorer: string;
|
|
167
|
+
eip1559: boolean;
|
|
168
|
+
} | {
|
|
169
|
+
id: number;
|
|
170
|
+
name: string;
|
|
171
|
+
shortname: string;
|
|
172
|
+
native: {
|
|
173
|
+
address: string;
|
|
174
|
+
symbol: string;
|
|
175
|
+
decimals: number;
|
|
176
|
+
logoUrl: string;
|
|
177
|
+
};
|
|
178
|
+
wToken: {
|
|
179
|
+
symbol: string;
|
|
180
|
+
address: string;
|
|
181
|
+
decimals: number;
|
|
182
|
+
logoUrl: string;
|
|
183
|
+
};
|
|
184
|
+
publicRpcUrl: string;
|
|
185
|
+
logoUrl: string;
|
|
186
|
+
explorer: string;
|
|
187
|
+
eip1559: boolean;
|
|
188
|
+
} | {
|
|
189
|
+
id: number;
|
|
190
|
+
name: string;
|
|
191
|
+
shortname: string;
|
|
192
|
+
native: {
|
|
193
|
+
address: string;
|
|
194
|
+
symbol: string;
|
|
195
|
+
decimals: number;
|
|
196
|
+
logoUrl: string;
|
|
197
|
+
};
|
|
198
|
+
wToken: {
|
|
199
|
+
symbol: string;
|
|
200
|
+
address: string;
|
|
201
|
+
decimals: number;
|
|
202
|
+
logoUrl: string;
|
|
203
|
+
};
|
|
204
|
+
publicRpcUrl: string;
|
|
205
|
+
logoUrl: string;
|
|
206
|
+
explorer: string;
|
|
207
|
+
eip1559: boolean;
|
|
208
|
+
} | {
|
|
209
|
+
id: number;
|
|
210
|
+
name: string;
|
|
211
|
+
shortname: string;
|
|
212
|
+
native: {
|
|
213
|
+
address: string;
|
|
214
|
+
symbol: string;
|
|
215
|
+
decimals: number;
|
|
216
|
+
logoUrl: string;
|
|
217
|
+
};
|
|
218
|
+
wToken: {
|
|
219
|
+
symbol: string;
|
|
220
|
+
address: string;
|
|
221
|
+
decimals: number;
|
|
222
|
+
logoUrl: string;
|
|
223
|
+
};
|
|
224
|
+
publicRpcUrl: string;
|
|
225
|
+
logoUrl: string;
|
|
226
|
+
explorer: string;
|
|
227
|
+
eip1559: boolean;
|
|
228
|
+
} | {
|
|
229
|
+
id: number;
|
|
230
|
+
name: string;
|
|
231
|
+
shortname: string;
|
|
232
|
+
native: {
|
|
233
|
+
address: string;
|
|
234
|
+
symbol: string;
|
|
235
|
+
decimals: number;
|
|
236
|
+
logoUrl: string;
|
|
237
|
+
};
|
|
238
|
+
wToken: {
|
|
239
|
+
symbol: string;
|
|
240
|
+
address: string;
|
|
241
|
+
decimals: number;
|
|
242
|
+
logoUrl: string;
|
|
243
|
+
};
|
|
244
|
+
publicRpcUrl: string;
|
|
245
|
+
logoUrl: string;
|
|
246
|
+
explorer: string;
|
|
247
|
+
eip1559: boolean;
|
|
248
|
+
} | {
|
|
249
|
+
id: number;
|
|
250
|
+
name: string;
|
|
251
|
+
shortname: string;
|
|
252
|
+
native: {
|
|
253
|
+
address: string;
|
|
254
|
+
symbol: string;
|
|
255
|
+
decimals: number;
|
|
256
|
+
logoUrl: string;
|
|
257
|
+
};
|
|
258
|
+
wToken: {
|
|
259
|
+
symbol: string;
|
|
260
|
+
address: string;
|
|
261
|
+
decimals: number;
|
|
262
|
+
logoUrl: string;
|
|
263
|
+
};
|
|
264
|
+
publicRpcUrl: string;
|
|
265
|
+
logoUrl: string;
|
|
266
|
+
explorer: string;
|
|
267
|
+
eip1559: boolean;
|
|
268
|
+
} | {
|
|
269
|
+
id: number;
|
|
270
|
+
name: string;
|
|
271
|
+
shortname: string;
|
|
272
|
+
native: {
|
|
273
|
+
address: string;
|
|
274
|
+
symbol: string;
|
|
275
|
+
decimals: number;
|
|
276
|
+
logoUrl: string;
|
|
277
|
+
};
|
|
278
|
+
wToken: {
|
|
279
|
+
symbol: string;
|
|
280
|
+
address: string;
|
|
281
|
+
decimals: number;
|
|
282
|
+
logoUrl: string;
|
|
283
|
+
};
|
|
284
|
+
publicRpcUrl: string;
|
|
285
|
+
logoUrl: string;
|
|
286
|
+
explorer: string;
|
|
287
|
+
eip1559: boolean;
|
|
288
|
+
} | {
|
|
289
|
+
id: number;
|
|
290
|
+
name: string;
|
|
291
|
+
shortname: string;
|
|
292
|
+
native: {
|
|
293
|
+
address: string;
|
|
294
|
+
symbol: string;
|
|
295
|
+
decimals: number;
|
|
296
|
+
logoUrl: string;
|
|
297
|
+
};
|
|
298
|
+
wToken: {
|
|
299
|
+
symbol: string;
|
|
300
|
+
address: string;
|
|
301
|
+
decimals: number;
|
|
302
|
+
logoUrl: string;
|
|
303
|
+
};
|
|
304
|
+
publicRpcUrl: string;
|
|
305
|
+
logoUrl: string;
|
|
306
|
+
explorer: string;
|
|
307
|
+
eip1559: boolean;
|
|
308
|
+
} | {
|
|
309
|
+
id: number;
|
|
310
|
+
name: string;
|
|
311
|
+
shortname: string;
|
|
312
|
+
native: {
|
|
313
|
+
address: string;
|
|
314
|
+
symbol: string;
|
|
315
|
+
decimals: number;
|
|
316
|
+
logoUrl: string;
|
|
317
|
+
};
|
|
318
|
+
wToken: {
|
|
319
|
+
symbol: string;
|
|
320
|
+
address: string;
|
|
321
|
+
decimals: number;
|
|
322
|
+
logoUrl: string;
|
|
323
|
+
};
|
|
324
|
+
publicRpcUrl: string;
|
|
325
|
+
logoUrl: string;
|
|
326
|
+
explorer: string;
|
|
327
|
+
eip1559: boolean;
|
|
328
|
+
} | {
|
|
329
|
+
id: number;
|
|
330
|
+
name: string;
|
|
331
|
+
shortname: string;
|
|
332
|
+
native: {
|
|
333
|
+
address: string;
|
|
334
|
+
symbol: string;
|
|
335
|
+
decimals: number;
|
|
336
|
+
logoUrl: string;
|
|
337
|
+
};
|
|
338
|
+
wToken: {
|
|
339
|
+
symbol: string;
|
|
340
|
+
address: string;
|
|
341
|
+
decimals: number;
|
|
342
|
+
logoUrl: string;
|
|
343
|
+
};
|
|
344
|
+
publicRpcUrl: string;
|
|
345
|
+
logoUrl: string;
|
|
346
|
+
explorer: string;
|
|
347
|
+
eip1559: boolean;
|
|
348
|
+
} | {
|
|
349
|
+
id: number;
|
|
350
|
+
name: string;
|
|
351
|
+
shortname: string;
|
|
352
|
+
native: {
|
|
353
|
+
address: string;
|
|
354
|
+
symbol: string;
|
|
355
|
+
decimals: number;
|
|
356
|
+
logoUrl: string;
|
|
357
|
+
};
|
|
358
|
+
wToken: {
|
|
359
|
+
symbol: string;
|
|
360
|
+
address: string;
|
|
361
|
+
decimals: number;
|
|
362
|
+
logoUrl: string;
|
|
363
|
+
};
|
|
364
|
+
publicRpcUrl: string;
|
|
365
|
+
logoUrl: string;
|
|
366
|
+
explorer: string;
|
|
367
|
+
eip1559: boolean;
|
|
368
|
+
} | {
|
|
369
|
+
id: number;
|
|
370
|
+
name: string;
|
|
371
|
+
shortname: string;
|
|
372
|
+
native: {
|
|
373
|
+
address: string;
|
|
374
|
+
symbol: string;
|
|
375
|
+
decimals: number;
|
|
376
|
+
logoUrl: string;
|
|
377
|
+
};
|
|
378
|
+
wToken: {
|
|
379
|
+
symbol: string;
|
|
380
|
+
address: string;
|
|
381
|
+
decimals: number;
|
|
382
|
+
logoUrl: string;
|
|
383
|
+
};
|
|
384
|
+
publicRpcUrl: string;
|
|
385
|
+
logoUrl: string;
|
|
386
|
+
explorer: string;
|
|
387
|
+
eip1559: boolean;
|
|
388
|
+
} | {
|
|
389
|
+
id: number;
|
|
390
|
+
name: string;
|
|
391
|
+
shortname: string;
|
|
392
|
+
native: {
|
|
393
|
+
address: string;
|
|
394
|
+
symbol: string;
|
|
395
|
+
decimals: number;
|
|
396
|
+
logoUrl: string;
|
|
397
|
+
};
|
|
398
|
+
wToken: {
|
|
399
|
+
symbol: string;
|
|
400
|
+
address: string;
|
|
401
|
+
decimals: number;
|
|
402
|
+
logoUrl: string;
|
|
403
|
+
};
|
|
404
|
+
publicRpcUrl: string;
|
|
405
|
+
logoUrl: string;
|
|
406
|
+
explorer: string;
|
|
407
|
+
eip1559: boolean;
|
|
408
|
+
} | {
|
|
409
|
+
id: number;
|
|
410
|
+
name: string;
|
|
411
|
+
shortname: string;
|
|
412
|
+
native: {
|
|
413
|
+
address: string;
|
|
414
|
+
symbol: string;
|
|
415
|
+
decimals: number;
|
|
416
|
+
logoUrl: string;
|
|
417
|
+
};
|
|
418
|
+
wToken: {
|
|
419
|
+
symbol: string;
|
|
420
|
+
address: string;
|
|
421
|
+
decimals: number;
|
|
422
|
+
logoUrl: string;
|
|
423
|
+
};
|
|
424
|
+
publicRpcUrl: string;
|
|
425
|
+
logoUrl: string;
|
|
426
|
+
explorer: string;
|
|
427
|
+
eip1559: boolean;
|
|
428
|
+
} | {
|
|
429
|
+
id: number;
|
|
430
|
+
name: string;
|
|
431
|
+
shortname: string;
|
|
432
|
+
native: {
|
|
433
|
+
address: string;
|
|
434
|
+
symbol: string;
|
|
435
|
+
decimals: number;
|
|
436
|
+
logoUrl: string;
|
|
437
|
+
};
|
|
438
|
+
wToken: {
|
|
439
|
+
symbol: string;
|
|
440
|
+
address: string;
|
|
441
|
+
decimals: number;
|
|
442
|
+
logoUrl: string;
|
|
443
|
+
};
|
|
444
|
+
publicRpcUrl: string;
|
|
445
|
+
logoUrl: string;
|
|
446
|
+
explorer: string;
|
|
447
|
+
eip1559: boolean;
|
|
448
|
+
} | undefined;
|
|
449
|
+
export declare const getExchanges: (config?: Config[]) => string[] | undefined;
|
|
450
|
+
export declare const numberToHex: (value: number | bigint, padding?: number) => string;
|
|
451
|
+
export declare const getOrderFillDelayMillis: (order: Order, config: Config) => number;
|
|
452
|
+
export declare const getQueryParam: (name: string) => string | null;
|
|
453
|
+
export declare const getPartnerChains: (partner: Partners) => number[];
|
|
454
|
+
export declare const getOrderExecutionRate: (srcAmountFilled?: string, dstAmountFilled?: string, srcTokenDecimals?: number, dstTokenDecimals?: number) => string;
|
|
455
|
+
export declare const getOrderLimitPriceRate: (order: Order, srcTokenDecimals: number, dstTokenDecimals: number) => string;
|
|
456
|
+
export declare const getTriggerPricePerTrade: (order: Order, srcTokenDecimals: number, dstTokenDecimals: number) => string;
|
|
457
|
+
export {};
|
|
458
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../spot-ui/src/lib/utils.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,37 +1,59 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orbs-network/spot-react",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Spot React Components - React components for Spot SDK",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/spot-react.umd.cjs",
|
|
7
|
+
"module": "./dist/spot-react.js",
|
|
7
8
|
"types": "./dist/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/
|
|
12
|
-
"require": "./dist/
|
|
13
|
-
}
|
|
12
|
+
"import": "./dist/spot-react.js",
|
|
13
|
+
"require": "./dist/spot-react.umd.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./dist/style.css"
|
|
14
16
|
},
|
|
15
17
|
"files": [
|
|
16
|
-
"dist"
|
|
18
|
+
"dist",
|
|
19
|
+
".cursor"
|
|
17
20
|
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"spot",
|
|
23
|
+
"ui",
|
|
24
|
+
"react",
|
|
25
|
+
"components"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
18
28
|
"peerDependencies": {
|
|
19
|
-
"react": "^18.0.0",
|
|
20
|
-
"react-dom": "^18.0.0"
|
|
29
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
30
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
21
31
|
},
|
|
22
32
|
"dependencies": {
|
|
23
|
-
"@orbs-network/
|
|
33
|
+
"@orbs-network/swap-ui": "^0.0.61",
|
|
34
|
+
"@react-icons/all-files": "^4.1.0",
|
|
35
|
+
"@tanstack/react-query": "^5.90.12",
|
|
36
|
+
"bignumber.js": "^9.3.1",
|
|
37
|
+
"moment": "^2.30.1",
|
|
38
|
+
"react-error-boundary": "^6.0.0",
|
|
39
|
+
"react-number-format": "^5.4.4",
|
|
40
|
+
"react-virtuoso": "^4.17.0",
|
|
41
|
+
"viem": "^2.43.3",
|
|
42
|
+
"zustand": "^5.0.9",
|
|
43
|
+
"@orbs-network/spot-ui": "1.0.0"
|
|
24
44
|
},
|
|
25
45
|
"devDependencies": {
|
|
26
|
-
"
|
|
27
|
-
"@
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
46
|
+
"@types/react": "^19.0.2",
|
|
47
|
+
"@types/react-dom": "^19.0.2",
|
|
48
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
49
|
+
"react": "^19.0.0",
|
|
50
|
+
"react-dom": "^19.0.0",
|
|
51
|
+
"typescript": "^5.7.2",
|
|
52
|
+
"vite": "^6.0.5",
|
|
53
|
+
"vite-plugin-dts": "^4.4.0"
|
|
32
54
|
},
|
|
33
55
|
"scripts": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
56
|
+
"dev": "vite build --watch",
|
|
57
|
+
"build": "tsc && vite build"
|
|
36
58
|
}
|
|
37
59
|
}
|
package/dist/index.cjs.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ce=require("react"),Oe=require("@orbs-network/spot-ui");var U={exports:{}},D={};var Se;function dr(){if(Se)return D;Se=1;var y=Ce,C=Symbol.for("react.element"),N=Symbol.for("react.fragment"),T=Object.prototype.hasOwnProperty,F=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,I={key:!0,ref:!0,__self:!0,__source:!0};function j(E,f,O){var p,b={},R=null,W=null;O!==void 0&&(R=""+O),f.key!==void 0&&(R=""+f.key),f.ref!==void 0&&(W=f.ref);for(p in f)T.call(f,p)&&!I.hasOwnProperty(p)&&(b[p]=f[p]);if(E&&E.defaultProps)for(p in f=E.defaultProps,f)b[p]===void 0&&(b[p]=f[p]);return{$$typeof:C,type:E,key:R,ref:W,props:b,_owner:F.current}}return D.Fragment=N,D.jsx=j,D.jsxs=j,D}var A={};var Pe;function vr(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&(function(){var y=Ce,C=Symbol.for("react.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),E=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),Z=Symbol.iterator,je="@@iterator";function xe(e){if(e===null||typeof e!="object")return null;var r=Z&&e[Z]||e[je];return typeof r=="function"?r:null}var S=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ke("error",e,t)}}function ke(e,r,t){{var n=S.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var De=!1,Ae=!1,Fe=!1,Ie=!1,We=!1,Q;Q=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===T||e===I||We||e===F||e===O||e===p||Ie||e===W||De||Ae||Fe||typeof e=="object"&&e!==null&&(e.$$typeof===R||e.$$typeof===b||e.$$typeof===j||e.$$typeof===E||e.$$typeof===f||e.$$typeof===Q||e.getModuleId!==void 0))}function Ye(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ee(e){return e.displayName||"Context"}function h(e){if(e==null)return null;if(typeof e.tag=="number"&&c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case F:return"StrictMode";case O:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case E:var r=e;return ee(r)+".Consumer";case j:var t=e;return ee(t._context)+".Provider";case f:return Ye(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:h(e.type)||"Memo";case R:{var o=e,u=o._payload,i=o._init;try{return h(i(u))}catch{return null}}}return null}var _=Object.assign,x=0,re,te,ne,ae,ie,oe,ue;function se(){}se.__reactDisabledLog=!0;function Le(){{if(x===0){re=console.log,te=console.info,ne=console.warn,ae=console.error,ie=console.group,oe=console.groupCollapsed,ue=console.groupEnd;var e={configurable:!0,enumerable:!0,value:se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}x++}}function Me(){{if(x--,x===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:re}),info:_({},e,{value:te}),warn:_({},e,{value:ne}),error:_({},e,{value:ae}),group:_({},e,{value:ie}),groupCollapsed:_({},e,{value:oe}),groupEnd:_({},e,{value:ue})})}x<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=S.ReactCurrentDispatcher,B;function $(e,r,t){{if(B===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);B=n&&n[1]||""}return`
|
|
2
|
-
`+B+e}}var J=!1,Y;{var Ue=typeof WeakMap=="function"?WeakMap:Map;Y=new Ue}function le(e,r){if(!e||J)return"";{var t=Y.get(e);if(t!==void 0)return t}var n;J=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Le();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
|
|
3
|
-
`),d=n.stack.split(`
|
|
4
|
-
`),s=a.length-1,l=d.length-1;s>=1&&l>=0&&a[s]!==d[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==d[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==d[l]){var g=`
|
|
5
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,g),g}while(s>=1&&l>=0);break}}}finally{J=!1,q.current=u,Me(),Error.prepareStackTrace=o}var w=e?e.displayName||e.name:"",m=w?$(w):"";return typeof e=="function"&&Y.set(e,m),m}function Ve(e,r,t){return le(e,!1)}function Ne(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function L(e,r,t){if(e==null)return"";if(typeof e=="function")return le(e,Ne(e));if(typeof e=="string")return $(e);switch(e){case O:return $("Suspense");case p:return $("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Ve(e.render);case b:return L(e.type,r,t);case R:{var n=e,o=n._payload,u=n._init;try{return L(u(o),r,t)}catch{}}}return""}var k=Object.prototype.hasOwnProperty,fe={},ce=S.ReactDebugCurrentFrame;function M(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);ce.setExtraStackFrame(t)}else ce.setExtraStackFrame(null)}function qe(e,r,t,n,o){{var u=Function.call.bind(k);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var d=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(M(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),M(null)),a instanceof Error&&!(a.message in fe)&&(fe[a.message]=!0,M(o),c("Failed %s type: %s",t,a.message),M(null))}}}var Be=Array.isArray;function K(e){return Be(e)}function Je(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ke(e){try{return de(e),!1}catch{return!0}}function de(e){return""+e}function ve(e){if(Ke(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Je(e)),de(e)}var pe=S.ReactCurrentOwner,Ge={key:!0,ref:!0,__self:!0,__source:!0},ge,be;function ze(e){if(k.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Xe(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function He(e,r){typeof e.ref=="string"&&pe.current}function Ze(e,r){{var t=function(){ge||(ge=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function Qe(e,r){{var t=function(){be||(be=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var er=function(e,r,t,n,o,u,i){var a={$$typeof:C,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function rr(e,r,t,n,o){{var u,i={},a=null,d=null;t!==void 0&&(ve(t),a=""+t),Xe(r)&&(ve(r.key),a=""+r.key),ze(r)&&(d=r.ref,He(r,o));for(u in r)k.call(r,u)&&!Ge.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||d){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ze(i,l),d&&Qe(i,l)}return er(e,a,d,o,n,pe.current,i)}}var G=S.ReactCurrentOwner,he=S.ReactDebugCurrentFrame;function P(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}var z;z=!1;function X(e){return typeof e=="object"&&e!==null&&e.$$typeof===C}function ye(){{if(G.current){var e=h(G.current.type);if(e)return`
|
|
6
|
-
|
|
7
|
-
Check the render method of \``+e+"`."}return""}}function tr(e){return""}var Ee={};function nr(e){{var r=ye();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
8
|
-
|
|
9
|
-
Check the top-level render call using <`+t+">.")}return r}}function Re(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=nr(r);if(Ee[t])return;Ee[t]=!0;var n="";e&&e._owner&&e._owner!==G.current&&(n=" It was passed a child from "+h(e._owner.type)+"."),P(e),c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),P(null)}}function _e(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];X(n)&&Re(n,r)}else if(X(e))e._store&&(e._store.validated=!0);else if(e){var o=xe(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)X(i.value)&&Re(i.value,r)}}}function ar(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===f||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=h(r);qe(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!z){z=!0;var o=h(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ir(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){P(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),P(null);break}}e.ref!==null&&(P(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),P(null))}}var me={};function Te(e,r,t,n,o,u){{var i=$e(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var d=tr();d?a+=d:a+=ye();var s;e===null?s="null":K(e)?s="array":e!==void 0&&e.$$typeof===C?(s="<"+(h(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=rr(e,r,t,o,u);if(l==null)return l;if(i){var g=r.children;if(g!==void 0)if(n)if(K(g)){for(var w=0;w<g.length;w++)_e(g[w],e);Object.freeze&&Object.freeze(g)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _e(g,e)}if(k.call(r,"key")){var m=h(e),v=Object.keys(r).filter(function(cr){return cr!=="key"}),H=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!me[m+H]){var fr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
|
|
10
|
-
let props = %s;
|
|
11
|
-
<%s {...props} />
|
|
12
|
-
React keys must be passed directly to JSX without using spread:
|
|
13
|
-
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,H,m,fr,m),me[m+H]=!0}}return e===T?ir(l):ar(l),l}}function or(e,r,t){return Te(e,r,t,!0)}function ur(e,r,t){return Te(e,r,t,!1)}var sr=ur,lr=or;A.Fragment=T,A.jsx=sr,A.jsxs=lr})()),A}var we;function pr(){return we||(we=1,process.env.NODE_ENV==="production"?U.exports=dr():U.exports=vr()),U.exports}var V=pr();const gr=({user:y})=>y?V.jsxs("div",{style:{border:"1px solid #ddd",padding:"12px",borderRadius:8},children:[V.jsxs("div",{children:["Address: ",Oe.formatAddress(y.address)]}),V.jsxs("div",{children:["Balance: ",Oe.formatBalance(y.balance)]})]}):V.jsx("div",{children:"No wallet connected"});exports.WalletInfo=gr;
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|