@orbs-network/spot-react 0.0.4 → 0.0.6
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-CtSUe45L.js +149 -0
- package/dist/index-vzISTdG1.js +42004 -0
- package/dist/spot-react/package.json.d.ts +63 -0
- package/dist/spot-react/src/chains.d.ts +3 -0
- package/dist/spot-react/src/chains.d.ts.map +1 -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/order-details.d.ts +79 -0
- package/dist/spot-react/src/components/order-details.d.ts.map +1 -0
- package/dist/spot-react/src/consts.d.ts +13 -0
- package/dist/spot-react/src/consts.d.ts.map +1 -0
- package/dist/spot-react/src/context/twap-context.d.ts +6 -0
- package/dist/spot-react/src/context/twap-context.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 +212 -0
- package/dist/spot-react/src/hooks/order-hooks.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-base-order.d.ts +79 -0
- package/dist/spot-react/src/hooks/use-base-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.ts.d.ts +37 -0
- package/dist/spot-react/src/hooks/use-build-repermit-order-data-callback.ts.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts +5 -0
- package/dist/spot-react/src/hooks/use-cancel-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-current-order.d.ts +74 -0
- package/dist/spot-react/src/hooks/use-current-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 +10 -0
- package/dist/spot-react/src/hooks/use-dst-amount.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts +18 -0
- package/dist/spot-react/src/hooks/use-duration.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-fill-delay.d.ts +18 -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 +99 -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 +4 -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 +17 -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.d.ts +40 -0
- package/dist/spot-react/src/hooks/use-limit-price.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-market-price.d.ts +8 -0
- package/dist/spot-react/src/hooks/use-market-price.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.d.ts +2 -0
- package/dist/spot-react/src/hooks/use-submit-order.d.ts.map +1 -0
- package/dist/spot-react/src/hooks/use-submit-swap-panel.d.ts +104 -0
- package/dist/spot-react/src/hooks/use-submit-swap-panel.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-token-panel.d.ts +27 -0
- package/dist/spot-react/src/hooks/use-token-panel.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 +24 -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.d.ts +37 -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 +94 -0
- package/dist/spot-react/src/index.d.ts +9 -4
- package/dist/spot-react/src/index.d.ts.map +1 -1
- package/dist/spot-react/src/lib.d.ts +7 -0
- package/dist/spot-react/src/lib.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/order-preview.d.ts +3 -0
- package/dist/spot-react/src/twap/components/orders/order-preview.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/orders-list.d.ts +2 -0
- package/dist/spot-react/src/twap/components/orders/orders-list.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/orders/orders.d.ts +2 -0
- package/dist/spot-react/src/twap/components/orders/orders.d.ts.map +1 -0
- package/dist/spot-react/src/twap/components/submit-order-panel.d.ts +10 -0
- package/dist/spot-react/src/twap/components/submit-order-panel.d.ts.map +1 -0
- package/dist/spot-react/src/twap/twap.d.ts +22 -0
- package/dist/spot-react/src/twap/twap.d.ts.map +1 -0
- package/dist/spot-react/src/types.d.ts +418 -0
- package/dist/spot-react/src/types.d.ts.map +1 -0
- package/dist/spot-react/src/useTwapStore.d.ts +11 -0
- package/dist/spot-react/src/useTwapStore.d.ts.map +1 -0
- package/dist/spot-react/src/utils.d.ts +27 -0
- package/dist/spot-react/src/utils.d.ts.map +1 -0
- package/dist/spot-react.js +54 -64
- package/dist/spot-react.umd.cjs +63 -1
- package/package.json +13 -2
- package/dist/spot-react/src/components/SpotEventList.d.ts +0 -7
- package/dist/spot-react/src/components/SpotEventList.d.ts.map +0 -1
- package/dist/spot-react/src/components/SpotTracker.d.ts +0 -9
- package/dist/spot-react/src/components/SpotTracker.d.ts.map +0 -1
- package/dist/spot-react/src/context/SpotContext.d.ts +0 -16
- package/dist/spot-react/src/context/SpotContext.d.ts.map +0 -1
- package/dist/spot-react.css +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "@orbs-network/spot-react",
|
|
3
|
+
"version": "0.0.6",
|
|
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",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/spot-react.js",
|
|
13
|
+
"require": "./dist/spot-react.umd.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite build --watch",
|
|
22
|
+
"build": "tsc && vite build",
|
|
23
|
+
"prepublishOnly": "pnpm run build"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"spot",
|
|
27
|
+
"ui",
|
|
28
|
+
"react",
|
|
29
|
+
"components"
|
|
30
|
+
],
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
34
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@orbs-network/spot": "^1.9.0",
|
|
38
|
+
"@orbs-network/spot-sdk": "workspace:*",
|
|
39
|
+
"@orbs-network/swap-ui": "^0.0.61",
|
|
40
|
+
"@react-icons/all-files": "^4.1.0",
|
|
41
|
+
"@tanstack/react-query": "^5.90.12",
|
|
42
|
+
"bignumber.js": "^9.3.1",
|
|
43
|
+
"moment": "^2.30.1",
|
|
44
|
+
"react-error-boundary": "^6.0.0",
|
|
45
|
+
"react-number-format": "^5.4.4",
|
|
46
|
+
"react-virtuoso": "^4.17.0",
|
|
47
|
+
"viem": "^2.43.3",
|
|
48
|
+
"zustand": "^5.0.9"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/react": "^19.0.2",
|
|
52
|
+
"@types/react-dom": "^19.0.2",
|
|
53
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
54
|
+
"react": "^19.0.0",
|
|
55
|
+
"react-dom": "^19.0.0",
|
|
56
|
+
"typescript": "^5.7.2",
|
|
57
|
+
"vite": "^6.0.5",
|
|
58
|
+
"vite-plugin-dts": "^4.4.0"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
;
|
|
62
|
+
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../src/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAe,MAAM,MAAM,CAAC;AA4D1C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAIxC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
declare function TokenLogo({ logo, className, style, alt }: {
|
|
3
|
+
logo?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
alt?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TokenLogo;
|
|
9
|
+
//# sourceMappingURL=TokenLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TokenLogo.d.ts","sourceRoot":"","sources":["../../../../src/components/TokenLogo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,OAAO,CAAC;AAG3D,iBAAS,SAAS,CAAC,EAAE,IAAI,EAAE,SAAc,EAAE,KAAU,EAAE,GAAkB,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,2CAYtJ;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { default as React, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { Token } from '../types';
|
|
3
|
+
export declare function OrderDetails({ children, className }: {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace OrderDetails {
|
|
8
|
+
var Deadline: ({ deadline, label, tooltip }: {
|
|
9
|
+
deadline?: number;
|
|
10
|
+
label: string;
|
|
11
|
+
tooltip: string;
|
|
12
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
var Fees: ({ fees, label, usd, dstTokenSymbol }: {
|
|
14
|
+
fees?: string;
|
|
15
|
+
label: string;
|
|
16
|
+
usd?: string;
|
|
17
|
+
dstTokenSymbol?: string;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
var TradeSize: ({ tradeSize, srcToken, trades, label, tooltip }: {
|
|
20
|
+
tradeSize?: string;
|
|
21
|
+
srcToken?: Token;
|
|
22
|
+
trades: number;
|
|
23
|
+
label: string;
|
|
24
|
+
tooltip: string;
|
|
25
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
var MinDestAmount: ({ dstToken, dstMinAmountOut, label, tooltip, usd }: {
|
|
27
|
+
dstToken?: Token;
|
|
28
|
+
dstMinAmountOut?: string;
|
|
29
|
+
label: string;
|
|
30
|
+
tooltip: string;
|
|
31
|
+
usd?: string;
|
|
32
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
var TradesAmount: ({ trades, label, tooltip }: {
|
|
34
|
+
trades?: number;
|
|
35
|
+
label: string;
|
|
36
|
+
tooltip: string;
|
|
37
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
+
var Recipient: () => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
var TradeInterval: ({ fillDelayMillis, chunks, label, tooltip }: {
|
|
40
|
+
fillDelayMillis?: number;
|
|
41
|
+
chunks?: number;
|
|
42
|
+
label: string;
|
|
43
|
+
tooltip: string;
|
|
44
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
45
|
+
var DetailRow: ({ title, tooltip, children, className, onClick, style, }: {
|
|
46
|
+
title: string;
|
|
47
|
+
tooltip?: string;
|
|
48
|
+
children?: React.ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
onClick?: () => void;
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
var TriggerPrice: ({ price, dstToken, label, tooltip, usd }: {
|
|
54
|
+
price?: string;
|
|
55
|
+
dstToken?: Token;
|
|
56
|
+
label: string;
|
|
57
|
+
tooltip: string;
|
|
58
|
+
usd?: string;
|
|
59
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
60
|
+
var LimitPrice: ({ price, dstToken, percentage, isMarketOrder }: {
|
|
61
|
+
price?: string;
|
|
62
|
+
dstToken?: Token;
|
|
63
|
+
percentage?: number;
|
|
64
|
+
isMarketOrder?: boolean;
|
|
65
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
66
|
+
var OrderID: ({ id }: {
|
|
67
|
+
id: string;
|
|
68
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
var Container: ({ children }: {
|
|
70
|
+
children: ReactNode;
|
|
71
|
+
}) => React.ReactNode;
|
|
72
|
+
var OrderVersion: ({ version }: {
|
|
73
|
+
version: number;
|
|
74
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
var USD: ({ value }: {
|
|
76
|
+
value?: string;
|
|
77
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=order-details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order-details.d.ts","sourceRoot":"","sources":["../../../../src/components/order-details.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAyKjC,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAc,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAEtG;yBAFe,YAAY;iDA7JoB;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;qDAqKjD;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;qEA/HvD;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;4EAUjF;QAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE;mDAarH;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;;qEA6B7B;QAAE,eAAe,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;8EAmBlJ;QACD,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB;iEA3G+D;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE;qEAc9E;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE;0BA2G7H;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE;kCA+BM;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE;oCARjC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;yBA9J9B;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Configs, ORBS_TWAP_FAQ_URL, ORBS_LOGO, ORBS_LOGO_FALLBACK, ORBS_WEBSITE_URL, DISCLAIMER_URL, TimeUnit } from '../../spot-sdk/src/index.ts';
|
|
2
|
+
export declare const REFETCH_ORDER_HISTORY = 20000;
|
|
3
|
+
export declare const MIN_NATIVE_BALANCE = 0.01;
|
|
4
|
+
export declare const SLIPPAGE_MULTIPLIER = 10;
|
|
5
|
+
export declare const LIMIT_TRIGGER_PRICE_DELTA_PERCENTAGE = 15;
|
|
6
|
+
export declare const TX_GAS_COST = 500000;
|
|
7
|
+
export { Configs, ORBS_TWAP_FAQ_URL, ORBS_LOGO, ORBS_LOGO_FALLBACK, ORBS_WEBSITE_URL, DISCLAIMER_URL };
|
|
8
|
+
export declare const DEFAULT_DURATION_OPTIONS: {
|
|
9
|
+
text: string;
|
|
10
|
+
value: TimeUnit;
|
|
11
|
+
}[];
|
|
12
|
+
export declare const PRICE_PROTECTION_SETTINGS = "The protocol uses an oracle price to help protect users from unfavorable executions. If the execution price is worse than the oracle price by more than the allowed percentage, the transaction will not be executed.";
|
|
13
|
+
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../src/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC/I,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAE5C,eAAO,MAAM,kBAAkB,OAAO,CAAC;AAEvC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAEvD,eAAO,MAAM,WAAW,SAAU,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAEvG,eAAO,MAAM,wBAAwB,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,EAavE,CAAC;AAEF,eAAO,MAAM,yBAAyB,0NACmL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TwapProps, TwapContextType } from '../types';
|
|
3
|
+
export declare const TwapContext: React.Context<TwapContextType>;
|
|
4
|
+
export declare const TwapProvider: (props: TwapProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const useTwapContext: () => TwapContextType;
|
|
6
|
+
//# sourceMappingURL=twap-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"twap-context.d.ts","sourceRoot":"","sources":["../../../../src/context/twap-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,eAAe,EAAwB,MAAM,UAAU,CAAC;AAuB5E,eAAO,MAAM,WAAW,gCAAuC,CAAC;AA2HhE,eAAO,MAAM,YAAY,GAAI,OAAO,SAAS,4CAM5C,CAAC;AAEF,eAAO,MAAM,cAAc,uBAK1B,CAAC"}
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
export declare const useAmountBN: (decimals?: number, value?: string) => string;
|
|
2
|
+
export declare const useAmountUi: (decimals?: number, value?: string) => string;
|
|
3
|
+
export declare const useNetwork: () => {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
shortname: string;
|
|
7
|
+
native: {
|
|
8
|
+
address: string;
|
|
9
|
+
symbol: string;
|
|
10
|
+
decimals: number;
|
|
11
|
+
logoUrl: string;
|
|
12
|
+
};
|
|
13
|
+
wToken: {
|
|
14
|
+
symbol: string;
|
|
15
|
+
address: string;
|
|
16
|
+
decimals: number;
|
|
17
|
+
logoUrl: string;
|
|
18
|
+
};
|
|
19
|
+
publicRpcUrl: string;
|
|
20
|
+
logoUrl: string;
|
|
21
|
+
explorer: string;
|
|
22
|
+
eip1559: boolean;
|
|
23
|
+
} | {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
shortname: string;
|
|
27
|
+
native: {
|
|
28
|
+
address: string;
|
|
29
|
+
symbol: string;
|
|
30
|
+
decimals: number;
|
|
31
|
+
logoUrl: string;
|
|
32
|
+
};
|
|
33
|
+
wToken: {
|
|
34
|
+
symbol: string;
|
|
35
|
+
address: string;
|
|
36
|
+
decimals: number;
|
|
37
|
+
logoUrl: string;
|
|
38
|
+
};
|
|
39
|
+
publicRpcUrl: string;
|
|
40
|
+
logoUrl: string;
|
|
41
|
+
explorer: string;
|
|
42
|
+
eip1559: boolean;
|
|
43
|
+
} | {
|
|
44
|
+
id: number;
|
|
45
|
+
name: string;
|
|
46
|
+
shortname: string;
|
|
47
|
+
native: {
|
|
48
|
+
address: string;
|
|
49
|
+
symbol: string;
|
|
50
|
+
decimals: number;
|
|
51
|
+
logoUrl: string;
|
|
52
|
+
};
|
|
53
|
+
wToken: {
|
|
54
|
+
symbol: string;
|
|
55
|
+
address: string;
|
|
56
|
+
decimals: number;
|
|
57
|
+
logoUrl: string;
|
|
58
|
+
};
|
|
59
|
+
publicRpcUrl: string;
|
|
60
|
+
logoUrl: string;
|
|
61
|
+
explorer: string;
|
|
62
|
+
eip1559: boolean;
|
|
63
|
+
} | {
|
|
64
|
+
id: number;
|
|
65
|
+
name: string;
|
|
66
|
+
shortname: string;
|
|
67
|
+
native: {
|
|
68
|
+
address: string;
|
|
69
|
+
symbol: string;
|
|
70
|
+
decimals: number;
|
|
71
|
+
logoUrl: string;
|
|
72
|
+
};
|
|
73
|
+
wToken: {
|
|
74
|
+
symbol: string;
|
|
75
|
+
address: string;
|
|
76
|
+
decimals: number;
|
|
77
|
+
logoUrl: string;
|
|
78
|
+
};
|
|
79
|
+
publicRpcUrl: string;
|
|
80
|
+
logoUrl: string;
|
|
81
|
+
explorer: string;
|
|
82
|
+
eip1559: boolean;
|
|
83
|
+
} | {
|
|
84
|
+
id: number;
|
|
85
|
+
name: string;
|
|
86
|
+
shortname: string;
|
|
87
|
+
native: {
|
|
88
|
+
address: string;
|
|
89
|
+
symbol: string;
|
|
90
|
+
decimals: number;
|
|
91
|
+
logoUrl: string;
|
|
92
|
+
};
|
|
93
|
+
wToken: {
|
|
94
|
+
symbol: string;
|
|
95
|
+
address: string;
|
|
96
|
+
decimals: number;
|
|
97
|
+
logoUrl: string;
|
|
98
|
+
};
|
|
99
|
+
publicRpcUrl: string;
|
|
100
|
+
logoUrl: string;
|
|
101
|
+
explorer: string;
|
|
102
|
+
eip1559: boolean;
|
|
103
|
+
} | {
|
|
104
|
+
id: number;
|
|
105
|
+
name: string;
|
|
106
|
+
shortname: string;
|
|
107
|
+
native: {
|
|
108
|
+
address: string;
|
|
109
|
+
symbol: string;
|
|
110
|
+
decimals: number;
|
|
111
|
+
logoUrl: string;
|
|
112
|
+
};
|
|
113
|
+
wToken: {
|
|
114
|
+
symbol: string;
|
|
115
|
+
address: string;
|
|
116
|
+
decimals: number;
|
|
117
|
+
logoUrl: string;
|
|
118
|
+
};
|
|
119
|
+
publicRpcUrl: string;
|
|
120
|
+
logoUrl: string;
|
|
121
|
+
explorer: string;
|
|
122
|
+
eip1559: boolean;
|
|
123
|
+
} | {
|
|
124
|
+
id: number;
|
|
125
|
+
name: string;
|
|
126
|
+
shortname: string;
|
|
127
|
+
native: {
|
|
128
|
+
address: string;
|
|
129
|
+
symbol: string;
|
|
130
|
+
decimals: number;
|
|
131
|
+
logoUrl: string;
|
|
132
|
+
};
|
|
133
|
+
wToken: {
|
|
134
|
+
symbol: string;
|
|
135
|
+
address: string;
|
|
136
|
+
decimals: number;
|
|
137
|
+
logoUrl: string;
|
|
138
|
+
};
|
|
139
|
+
publicRpcUrl: string;
|
|
140
|
+
logoUrl: string;
|
|
141
|
+
explorer: string;
|
|
142
|
+
eip1559: boolean;
|
|
143
|
+
} | {
|
|
144
|
+
id: number;
|
|
145
|
+
name: string;
|
|
146
|
+
shortname: string;
|
|
147
|
+
native: {
|
|
148
|
+
address: string;
|
|
149
|
+
symbol: string;
|
|
150
|
+
decimals: number;
|
|
151
|
+
logoUrl: string;
|
|
152
|
+
};
|
|
153
|
+
wToken: {
|
|
154
|
+
symbol: string;
|
|
155
|
+
address: string;
|
|
156
|
+
decimals: number;
|
|
157
|
+
logoUrl: string;
|
|
158
|
+
};
|
|
159
|
+
publicRpcUrl: string;
|
|
160
|
+
logoUrl: string;
|
|
161
|
+
explorer: string;
|
|
162
|
+
eip1559: boolean;
|
|
163
|
+
} | {
|
|
164
|
+
id: number;
|
|
165
|
+
name: string;
|
|
166
|
+
shortname: string;
|
|
167
|
+
native: {
|
|
168
|
+
address: string;
|
|
169
|
+
symbol: string;
|
|
170
|
+
decimals: number;
|
|
171
|
+
logoUrl: string;
|
|
172
|
+
};
|
|
173
|
+
wToken: {
|
|
174
|
+
symbol: string;
|
|
175
|
+
address: string;
|
|
176
|
+
decimals: number;
|
|
177
|
+
logoUrl: string;
|
|
178
|
+
};
|
|
179
|
+
publicRpcUrl: string;
|
|
180
|
+
logoUrl: string;
|
|
181
|
+
explorer: string;
|
|
182
|
+
eip1559: boolean;
|
|
183
|
+
} | {
|
|
184
|
+
id: number;
|
|
185
|
+
name: string;
|
|
186
|
+
shortname: string;
|
|
187
|
+
native: {
|
|
188
|
+
address: string;
|
|
189
|
+
symbol: string;
|
|
190
|
+
decimals: number;
|
|
191
|
+
logoUrl: string;
|
|
192
|
+
};
|
|
193
|
+
wToken: {
|
|
194
|
+
symbol: string;
|
|
195
|
+
address: string;
|
|
196
|
+
decimals: number;
|
|
197
|
+
logoUrl: string;
|
|
198
|
+
};
|
|
199
|
+
publicRpcUrl: string;
|
|
200
|
+
logoUrl: string;
|
|
201
|
+
explorer: string;
|
|
202
|
+
eip1559: boolean;
|
|
203
|
+
} | {
|
|
204
|
+
id: number;
|
|
205
|
+
name: string;
|
|
206
|
+
shortname: string;
|
|
207
|
+
native: {
|
|
208
|
+
address: string;
|
|
209
|
+
symbol: string;
|
|
210
|
+
decimals: number;
|
|
211
|
+
logoUrl: string;
|
|
212
|
+
};
|
|
213
|
+
wToken: {
|
|
214
|
+
symbol: string;
|
|
215
|
+
address: string;
|
|
216
|
+
decimals: number;
|
|
217
|
+
logoUrl: string;
|
|
218
|
+
};
|
|
219
|
+
publicRpcUrl: string;
|
|
220
|
+
logoUrl: string;
|
|
221
|
+
explorer: string;
|
|
222
|
+
eip1559: boolean;
|
|
223
|
+
} | {
|
|
224
|
+
id: number;
|
|
225
|
+
name: string;
|
|
226
|
+
shortname: string;
|
|
227
|
+
native: {
|
|
228
|
+
address: string;
|
|
229
|
+
symbol: string;
|
|
230
|
+
decimals: number;
|
|
231
|
+
logoUrl: string;
|
|
232
|
+
};
|
|
233
|
+
wToken: {
|
|
234
|
+
symbol: string;
|
|
235
|
+
address: string;
|
|
236
|
+
decimals: number;
|
|
237
|
+
logoUrl: string;
|
|
238
|
+
};
|
|
239
|
+
publicRpcUrl: string;
|
|
240
|
+
logoUrl: string;
|
|
241
|
+
explorer: string;
|
|
242
|
+
eip1559: boolean;
|
|
243
|
+
} | {
|
|
244
|
+
id: number;
|
|
245
|
+
name: string;
|
|
246
|
+
shortname: string;
|
|
247
|
+
native: {
|
|
248
|
+
address: string;
|
|
249
|
+
symbol: string;
|
|
250
|
+
decimals: number;
|
|
251
|
+
logoUrl: string;
|
|
252
|
+
};
|
|
253
|
+
wToken: {
|
|
254
|
+
symbol: string;
|
|
255
|
+
address: string;
|
|
256
|
+
decimals: number;
|
|
257
|
+
logoUrl: string;
|
|
258
|
+
};
|
|
259
|
+
publicRpcUrl: string;
|
|
260
|
+
logoUrl: string;
|
|
261
|
+
explorer: string;
|
|
262
|
+
eip1559: boolean;
|
|
263
|
+
} | {
|
|
264
|
+
id: number;
|
|
265
|
+
name: string;
|
|
266
|
+
shortname: string;
|
|
267
|
+
native: {
|
|
268
|
+
address: string;
|
|
269
|
+
symbol: string;
|
|
270
|
+
decimals: number;
|
|
271
|
+
logoUrl: string;
|
|
272
|
+
};
|
|
273
|
+
wToken: {
|
|
274
|
+
symbol: string;
|
|
275
|
+
address: string;
|
|
276
|
+
decimals: number;
|
|
277
|
+
logoUrl: string;
|
|
278
|
+
};
|
|
279
|
+
publicRpcUrl: string;
|
|
280
|
+
logoUrl: string;
|
|
281
|
+
explorer: string;
|
|
282
|
+
eip1559: boolean;
|
|
283
|
+
} | {
|
|
284
|
+
id: number;
|
|
285
|
+
name: string;
|
|
286
|
+
shortname: string;
|
|
287
|
+
native: {
|
|
288
|
+
address: string;
|
|
289
|
+
symbol: string;
|
|
290
|
+
decimals: number;
|
|
291
|
+
logoUrl: string;
|
|
292
|
+
};
|
|
293
|
+
wToken: {
|
|
294
|
+
symbol: string;
|
|
295
|
+
address: string;
|
|
296
|
+
decimals: number;
|
|
297
|
+
logoUrl: string;
|
|
298
|
+
};
|
|
299
|
+
publicRpcUrl: string;
|
|
300
|
+
logoUrl: string;
|
|
301
|
+
explorer: string;
|
|
302
|
+
eip1559: boolean;
|
|
303
|
+
} | {
|
|
304
|
+
id: number;
|
|
305
|
+
name: string;
|
|
306
|
+
shortname: string;
|
|
307
|
+
native: {
|
|
308
|
+
address: string;
|
|
309
|
+
symbol: string;
|
|
310
|
+
decimals: number;
|
|
311
|
+
logoUrl: string;
|
|
312
|
+
};
|
|
313
|
+
wToken: {
|
|
314
|
+
symbol: string;
|
|
315
|
+
address: string;
|
|
316
|
+
decimals: number;
|
|
317
|
+
logoUrl: string;
|
|
318
|
+
};
|
|
319
|
+
publicRpcUrl: string;
|
|
320
|
+
logoUrl: string;
|
|
321
|
+
explorer: string;
|
|
322
|
+
eip1559: boolean;
|
|
323
|
+
} | {
|
|
324
|
+
id: number;
|
|
325
|
+
name: string;
|
|
326
|
+
shortname: string;
|
|
327
|
+
native: {
|
|
328
|
+
address: string;
|
|
329
|
+
symbol: string;
|
|
330
|
+
decimals: number;
|
|
331
|
+
logoUrl: string;
|
|
332
|
+
};
|
|
333
|
+
wToken: {
|
|
334
|
+
symbol: string;
|
|
335
|
+
address: string;
|
|
336
|
+
decimals: number;
|
|
337
|
+
logoUrl: string;
|
|
338
|
+
};
|
|
339
|
+
publicRpcUrl: string;
|
|
340
|
+
logoUrl: string;
|
|
341
|
+
explorer: string;
|
|
342
|
+
eip1559: boolean;
|
|
343
|
+
} | {
|
|
344
|
+
id: number;
|
|
345
|
+
name: string;
|
|
346
|
+
shortname: string;
|
|
347
|
+
native: {
|
|
348
|
+
address: string;
|
|
349
|
+
symbol: string;
|
|
350
|
+
decimals: number;
|
|
351
|
+
logoUrl: string;
|
|
352
|
+
};
|
|
353
|
+
wToken: {
|
|
354
|
+
symbol: string;
|
|
355
|
+
address: string;
|
|
356
|
+
decimals: number;
|
|
357
|
+
logoUrl: string;
|
|
358
|
+
};
|
|
359
|
+
publicRpcUrl: string;
|
|
360
|
+
logoUrl: string;
|
|
361
|
+
explorer: string;
|
|
362
|
+
eip1559: boolean;
|
|
363
|
+
} | {
|
|
364
|
+
id: number;
|
|
365
|
+
name: string;
|
|
366
|
+
shortname: string;
|
|
367
|
+
native: {
|
|
368
|
+
address: string;
|
|
369
|
+
symbol: string;
|
|
370
|
+
decimals: number;
|
|
371
|
+
logoUrl: string;
|
|
372
|
+
};
|
|
373
|
+
wToken: {
|
|
374
|
+
symbol: string;
|
|
375
|
+
address: string;
|
|
376
|
+
decimals: number;
|
|
377
|
+
logoUrl: string;
|
|
378
|
+
};
|
|
379
|
+
publicRpcUrl: string;
|
|
380
|
+
logoUrl: string;
|
|
381
|
+
explorer: string;
|
|
382
|
+
eip1559: boolean;
|
|
383
|
+
} | {
|
|
384
|
+
id: number;
|
|
385
|
+
name: string;
|
|
386
|
+
shortname: string;
|
|
387
|
+
native: {
|
|
388
|
+
address: string;
|
|
389
|
+
symbol: string;
|
|
390
|
+
decimals: number;
|
|
391
|
+
logoUrl: string;
|
|
392
|
+
};
|
|
393
|
+
wToken: {
|
|
394
|
+
symbol: string;
|
|
395
|
+
address: string;
|
|
396
|
+
decimals: number;
|
|
397
|
+
logoUrl: string;
|
|
398
|
+
};
|
|
399
|
+
publicRpcUrl: string;
|
|
400
|
+
logoUrl: string;
|
|
401
|
+
explorer: string;
|
|
402
|
+
eip1559: boolean;
|
|
403
|
+
} | {
|
|
404
|
+
id: number;
|
|
405
|
+
name: string;
|
|
406
|
+
shortname: string;
|
|
407
|
+
native: {
|
|
408
|
+
address: string;
|
|
409
|
+
symbol: string;
|
|
410
|
+
decimals: number;
|
|
411
|
+
logoUrl: string;
|
|
412
|
+
};
|
|
413
|
+
wToken: {
|
|
414
|
+
symbol: string;
|
|
415
|
+
address: string;
|
|
416
|
+
decimals: number;
|
|
417
|
+
logoUrl: string;
|
|
418
|
+
};
|
|
419
|
+
publicRpcUrl: string;
|
|
420
|
+
logoUrl: string;
|
|
421
|
+
explorer: string;
|
|
422
|
+
eip1559: boolean;
|
|
423
|
+
} | undefined;
|
|
424
|
+
export declare const useExplorerLink: (txHash?: string) => string | undefined;
|
|
425
|
+
export declare const useUsdAmount: (amount?: string, usd?: string | number) => string;
|
|
426
|
+
export declare const useShouldOnlyWrap: () => boolean;
|
|
427
|
+
export declare const useShouldUnwrap: () => boolean;
|
|
428
|
+
export declare const useShouldWrapOrUnwrapOnly: () => boolean;
|
|
429
|
+
export declare const useDateFormat: (date?: number) => string;
|
|
430
|
+
export declare function useCopyToClipboard(): (text: string) => Promise<void>;
|
|
431
|
+
export declare const useFormatDecimals: (value?: string | number, decimalPlaces?: number) => string;
|
|
432
|
+
export declare const useFormatNumber: ({ value, decimalScale, prefix, suffix }: {
|
|
433
|
+
value?: string | number;
|
|
434
|
+
decimalScale?: number;
|
|
435
|
+
prefix?: string;
|
|
436
|
+
suffix?: string;
|
|
437
|
+
}) => string | undefined;
|
|
438
|
+
//# sourceMappingURL=helper-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helper-hooks.d.ts","sourceRoot":"","sources":["../../../../src/hooks/helper-hooks.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,WAE5D,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,WAE5D,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAGtB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,uBAM9C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,MAAM,MAAM,GAAG,MAAM,WAOlE,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAM7B,CAAC;AAEF,eAAO,MAAM,eAAe,eAM3B,CAAC;AAEF,eAAO,MAAM,yBAAyB,eAKrC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,WAQ1C,CAAC;AAEF,wBAAgB,kBAAkB,WAGjB,MAAM,mBAWtB;AAED,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,GAAG,MAAM,EAAE,gBAAgB,MAAM,WAEhF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,yCAA6C;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,uBAoBhK,CAAC"}
|