pods-sdk 0.2.58
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/README.md +760 -0
- package/dist/api/actions.api.d.ts +433 -0
- package/dist/api/actions.api.d.ts.map +1 -0
- package/dist/api/history.api.d.ts +311 -0
- package/dist/api/history.api.d.ts.map +1 -0
- package/dist/api/tokens.api.d.ts +985 -0
- package/dist/api/tokens.api.d.ts.map +1 -0
- package/dist/components/earn/GroupedStrategyList.d.ts +21 -0
- package/dist/components/earn/GroupedStrategyList.d.ts.map +1 -0
- package/dist/components/earn/StrategyDetailsView.d.ts +14 -0
- package/dist/components/earn/StrategyDetailsView.d.ts.map +1 -0
- package/dist/components/earn/desktop/EarnPageDesktop.d.ts +13 -0
- package/dist/components/earn/desktop/EarnPageDesktop.d.ts.map +1 -0
- package/dist/components/earn/desktop/ExploreStrategiesGrid.d.ts +30 -0
- package/dist/components/earn/desktop/ExploreStrategiesGrid.d.ts.map +1 -0
- package/dist/components/earn/desktop/InvestedStrategiesSection.d.ts +22 -0
- package/dist/components/earn/desktop/InvestedStrategiesSection.d.ts.map +1 -0
- package/dist/components/earn/desktop/InvestmentSummaryDesktop.d.ts +27 -0
- package/dist/components/earn/desktop/InvestmentSummaryDesktop.d.ts.map +1 -0
- package/dist/components/earn/desktop/RecentTransactions.d.ts +32 -0
- package/dist/components/earn/desktop/RecentTransactions.d.ts.map +1 -0
- package/dist/components/earn/desktop/StrategyGridCard.d.ts +35 -0
- package/dist/components/earn/desktop/StrategyGridCard.d.ts.map +1 -0
- package/dist/constants/analytics.d.ts +92 -0
- package/dist/constants/analytics.d.ts.map +1 -0
- package/dist/constants/error-monitoring.d.ts +2 -0
- package/dist/constants/error-monitoring.d.ts.map +1 -0
- package/dist/domain/swap/deriveAmountInForSwap.d.ts +11 -0
- package/dist/domain/swap/deriveAmountInForSwap.d.ts.map +1 -0
- package/dist/domain/swap/deriveTokenPriceUSD.d.ts +10 -0
- package/dist/domain/swap/deriveTokenPriceUSD.d.ts.map +1 -0
- package/dist/domain/swap/getAmountInUSD.d.ts +12 -0
- package/dist/domain/swap/getAmountInUSD.d.ts.map +1 -0
- package/dist/domain/swap/getQuoteOutputUI.d.ts +14 -0
- package/dist/domain/swap/getQuoteOutputUI.d.ts.map +1 -0
- package/dist/domain/swap/getQuoteOutputUSD.d.ts +12 -0
- package/dist/domain/swap/getQuoteOutputUSD.d.ts.map +1 -0
- package/dist/domain/swap/index.d.ts +11 -0
- package/dist/domain/swap/index.d.ts.map +1 -0
- package/dist/domain/swap/isPositiveNumberString.d.ts +5 -0
- package/dist/domain/swap/isPositiveNumberString.d.ts.map +1 -0
- package/dist/domain/swap/isQuoteMatchingInput.d.ts +24 -0
- package/dist/domain/swap/isQuoteMatchingInput.d.ts.map +1 -0
- package/dist/domain/swap/normalizeSwapAddress.d.ts +6 -0
- package/dist/domain/swap/normalizeSwapAddress.d.ts.map +1 -0
- package/dist/domain/swap/resolveEffectivePrice.d.ts +14 -0
- package/dist/domain/swap/resolveEffectivePrice.d.ts.map +1 -0
- package/dist/domain/swap/resolveInputAmountBase.d.ts +11 -0
- package/dist/domain/swap/resolveInputAmountBase.d.ts.map +1 -0
- package/dist/hooks/useAnalytics.d.ts +9 -0
- package/dist/hooks/useAnalytics.d.ts.map +1 -0
- package/dist/hooks/useDimensions.d.ts +15 -0
- package/dist/hooks/useDimensions.d.ts.map +1 -0
- package/dist/hooks/useGlobalCurrency.d.ts +17 -0
- package/dist/hooks/useGlobalCurrency.d.ts.map +1 -0
- package/dist/hooks/useGlobalHistory.d.ts +22 -0
- package/dist/hooks/useGlobalHistory.d.ts.map +1 -0
- package/dist/hooks/useGroupedStrategies.d.ts +4 -0
- package/dist/hooks/useGroupedStrategies.d.ts.map +1 -0
- package/dist/hooks/useI18n.d.ts +12 -0
- package/dist/hooks/useI18n.d.ts.map +1 -0
- package/dist/hooks/useStrategyTokens.d.ts +15 -0
- package/dist/hooks/useStrategyTokens.d.ts.map +1 -0
- package/dist/hooks/useSwapFlowLogic.d.ts +198 -0
- package/dist/hooks/useSwapFlowLogic.d.ts.map +1 -0
- package/dist/hooks/useTokenGroups.d.ts +14 -0
- package/dist/hooks/useTokenGroups.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +13 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/messages.d.ts +307 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/pages/SwapFlow/SwapFormContext.d.ts +6 -0
- package/dist/pages/SwapFlow/SwapFormContext.d.ts.map +1 -0
- package/dist/pages/SwapFlow/SwapHistoryScreen.d.ts +4 -0
- package/dist/pages/SwapFlow/SwapHistoryScreen.d.ts.map +1 -0
- package/dist/pages/TransactionProcessingDetails/StepDisplay.d.ts +10 -0
- package/dist/pages/TransactionProcessingDetails/StepDisplay.d.ts.map +1 -0
- package/dist/pages/TransactionProcessingDetails/StepStatusIcon.d.ts +11 -0
- package/dist/pages/TransactionProcessingDetails/StepStatusIcon.d.ts.map +1 -0
- package/dist/pages/TransactionProcessingDetails/StepStatusText.d.ts +10 -0
- package/dist/pages/TransactionProcessingDetails/StepStatusText.d.ts.map +1 -0
- package/dist/pages/TransactionProcessingDetails/index.d.ts +4 -0
- package/dist/pages/TransactionProcessingDetails/index.d.ts.map +1 -0
- package/dist/pages/TransactionProcessingDetails.d.ts +22 -0
- package/dist/pages/TransactionProcessingDetails.d.ts.map +1 -0
- package/dist/pages/TransactionStepValue.d.ts +12 -0
- package/dist/pages/TransactionStepValue.d.ts.map +1 -0
- package/dist/services/analyticsService.d.ts +11 -0
- package/dist/services/analyticsService.d.ts.map +1 -0
- package/dist/services/errorMonitoringService.d.ts +17 -0
- package/dist/services/errorMonitoringService.d.ts.map +1 -0
- package/dist/services/scrubPii.d.ts +3 -0
- package/dist/services/scrubPii.d.ts.map +1 -0
- package/dist/test-utils/grouped-strategies-dummy.d.ts +6 -0
- package/dist/test-utils/grouped-strategies-dummy.d.ts.map +1 -0
- package/dist/test-utils/history-dummy.d.ts +34 -0
- package/dist/test-utils/history-dummy.d.ts.map +1 -0
- package/dist/test-utils/investment-summary-dummy.d.ts +17 -0
- package/dist/test-utils/investment-summary-dummy.d.ts.map +1 -0
- package/dist/test-utils/strategies-dummy.d.ts +8 -0
- package/dist/test-utils/strategies-dummy.d.ts.map +1 -0
- package/dist/test-utils/strategies-with-apy-dummy.d.ts +32 -0
- package/dist/test-utils/strategies-with-apy-dummy.d.ts.map +1 -0
- package/dist/test-utils/swap-dummy.d.ts +35 -0
- package/dist/test-utils/swap-dummy.d.ts.map +1 -0
- package/dist/test-utils/swap-form-view-dummy.d.ts +21 -0
- package/dist/test-utils/swap-form-view-dummy.d.ts.map +1 -0
- package/dist/types/analytics.d.ts +17 -0
- package/dist/types/analytics.d.ts.map +1 -0
- package/dist/types/currency.d.ts +2 -0
- package/dist/types/currency.d.ts.map +1 -0
- package/dist/types/dimensions.d.ts +7 -0
- package/dist/types/dimensions.d.ts.map +1 -0
- package/dist/types/grouped-strategies.d.ts +42 -0
- package/dist/types/grouped-strategies.d.ts.map +1 -0
- package/dist/types/sdk-error-context.d.ts +10 -0
- package/dist/types/sdk-error-context.d.ts.map +1 -0
- package/dist/types/strategy-with-apy.d.ts +8 -0
- package/dist/types/strategy-with-apy.d.ts.map +1 -0
- package/dist/types/tokengroups.d.ts +47 -0
- package/dist/types/tokengroups.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +14 -0
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/ui/action-sheet/ChooseAStrategyActionsheetView.d.ts +14 -0
- package/dist/ui/action-sheet/ChooseAStrategyActionsheetView.d.ts.map +1 -0
- package/dist/ui/action-sheet/ChooseWithdrawAssetActionsheet.d.ts +16 -0
- package/dist/ui/action-sheet/ChooseWithdrawAssetActionsheet.d.ts.map +1 -0
- package/dist/ui/chip/Chip.d.ts +30 -0
- package/dist/ui/chip/Chip.d.ts.map +1 -0
- package/dist/ui/chip/ChipGroup.d.ts +43 -0
- package/dist/ui/chip/ChipGroup.d.ts.map +1 -0
- package/dist/ui/chip/index.d.ts +5 -0
- package/dist/ui/chip/index.d.ts.map +1 -0
- package/dist/ui/group-label/GroupLabel.d.ts +17 -0
- package/dist/ui/group-label/GroupLabel.d.ts.map +1 -0
- package/dist/ui/group-label/index.d.ts +3 -0
- package/dist/ui/group-label/index.d.ts.map +1 -0
- package/dist/ui/loading/LoadingDots.d.ts +11 -0
- package/dist/ui/loading/LoadingDots.d.ts.map +1 -0
- package/dist/ui/loading/index.d.ts +2 -0
- package/dist/ui/loading/index.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapAdvancedSettings.d.ts +9 -0
- package/dist/ui/swap-form/SwapAdvancedSettings.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapAmountInputView.d.ts +11 -0
- package/dist/ui/swap-form/SwapAmountInputView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapNetworkSelectorView.d.ts +10 -0
- package/dist/ui/swap-form/SwapNetworkSelectorView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapOutputAmountView.d.ts +8 -0
- package/dist/ui/swap-form/SwapOutputAmountView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapQuoteBlockchainCostsView.d.ts +9 -0
- package/dist/ui/swap-form/SwapQuoteBlockchainCostsView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapQuoteErrorsView.d.ts +7 -0
- package/dist/ui/swap-form/SwapQuoteErrorsView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapQuoteHeaderView.d.ts +7 -0
- package/dist/ui/swap-form/SwapQuoteHeaderView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapSlippageToleranceButtonsView.d.ts +7 -0
- package/dist/ui/swap-form/SwapSlippageToleranceButtonsView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapTokenSelectorView.d.ts +11 -0
- package/dist/ui/swap-form/SwapTokenSelectorView.d.ts.map +1 -0
- package/dist/ui/swap-form/SwapTransactionDetails.d.ts +6 -0
- package/dist/ui/swap-form/SwapTransactionDetails.d.ts.map +1 -0
- package/dist/ui/transaction-screen/history/HistoryDepositDetailsView.d.ts +25 -0
- package/dist/ui/transaction-screen/history/HistoryDepositDetailsView.d.ts.map +1 -0
- package/dist/ui/transaction-screen/history/HistoryDetailsNotFound.d.ts +5 -0
- package/dist/ui/transaction-screen/history/HistoryDetailsNotFound.d.ts.map +1 -0
- package/dist/ui/transaction-screen/history/HistorySwapDetailsScreen.d.ts +8 -0
- package/dist/ui/transaction-screen/history/HistorySwapDetailsScreen.d.ts.map +1 -0
- package/dist/ui/transaction-screen/history/HistoryWithdrawDetailsView.d.ts +5 -0
- package/dist/ui/transaction-screen/history/HistoryWithdrawDetailsView.d.ts.map +1 -0
- package/dist/ui/transaction-screen/swap/SwapCrossChainProcessingScreen.d.ts +3 -0
- package/dist/ui/transaction-screen/swap/SwapCrossChainProcessingScreen.d.ts.map +1 -0
- package/dist/ui/transaction-screen/withdraw/WithdrawSuccess.d.ts +24 -0
- package/dist/ui/transaction-screen/withdraw/WithdrawSuccess.d.ts.map +1 -0
- package/dist/utils/addressUtils.d.ts +7 -0
- package/dist/utils/addressUtils.d.ts.map +1 -0
- package/dist/utils/analytics.d.ts +5 -0
- package/dist/utils/analytics.d.ts.map +1 -0
- package/dist/utils/currency.d.ts +11 -0
- package/dist/utils/currency.d.ts.map +1 -0
- package/dist/utils/errorMapping.d.ts +19 -0
- package/dist/utils/errorMapping.d.ts.map +1 -0
- package/dist/utils/filterStrategies.d.ts +21 -0
- package/dist/utils/filterStrategies.d.ts.map +1 -0
- package/dist/utils/fontLoader.d.ts +9 -0
- package/dist/utils/fontLoader.d.ts.map +1 -0
- package/dist/utils/historyMappers.d.ts +71 -0
- package/dist/utils/historyMappers.d.ts.map +1 -0
- package/dist/utils/strategyCategories.d.ts +25 -0
- package/dist/utils/strategyCategories.d.ts.map +1 -0
- package/dist/utils/tokenSorting.d.ts +30 -0
- package/dist/utils/tokenSorting.d.ts.map +1 -0
- package/dist/utils/tokengroups.d.ts +11 -0
- package/dist/utils/tokengroups.d.ts.map +1 -0
- package/package.json +132 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ApiToken } from '../types/tokengroups';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a map of token ObjectId to symbol (uppercase) for quick lookup.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createTokenIdToSymbolMap(tokens: ApiToken[]): Map<string, string>;
|
|
6
|
+
/**
|
|
7
|
+
* Extracts unique symbols from a list of token IDs, preserving order.
|
|
8
|
+
* Skips IDs that are not found in the map.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractUniqueSymbolsFromGroup(tokenIds: string[], tokenIdToSymbol: Map<string, string>): string[];
|
|
11
|
+
//# sourceMappingURL=tokengroups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokengroups.d.ts","sourceRoot":"","sources":["../../src/utils/tokengroups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAMhF;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,MAAM,EAAE,CAaV"}
|
package/package.json
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pods-sdk",
|
|
3
|
+
"version": "0.2.58",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"packageManager": "pnpm@9.0.0",
|
|
6
|
+
"description": "UI Components for Deframe integration on the frontend",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=18.0.0",
|
|
9
|
+
"pnpm": ">=9.0.0"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/index.cjs.js",
|
|
12
|
+
"module": "dist/index.esm.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.esm.js",
|
|
21
|
+
"require": "./dist/index.cjs.js"
|
|
22
|
+
},
|
|
23
|
+
"./web": "./dist/deframe-web.js",
|
|
24
|
+
"./deframe-web.js": "./dist/deframe-web.js",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": true,
|
|
28
|
+
"lint-staged": {
|
|
29
|
+
"*.{ts,tsx}": [
|
|
30
|
+
"tsc --noEmit --skipLibCheck"
|
|
31
|
+
],
|
|
32
|
+
"examples/earn-widget/**/*.{ts,tsx}": [
|
|
33
|
+
"cd examples/earn-widget && tsc --noEmit --skipLibCheck"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"preinstall": "npx only-allow pnpm",
|
|
38
|
+
"build": "rollup -c",
|
|
39
|
+
"dev": "rollup -c -w",
|
|
40
|
+
"test": "vitest",
|
|
41
|
+
"storybook": "storybook dev -p 6006 --no-open",
|
|
42
|
+
"build-storybook": "storybook build",
|
|
43
|
+
"deploy-storybook": "pnpm run build-storybook",
|
|
44
|
+
"clean": "rm -rf node_modules package-lock.json pnpm-lock.yaml",
|
|
45
|
+
"fresh-install": "pnpm run clean && pnpm install",
|
|
46
|
+
"lint": "tsc --noEmit",
|
|
47
|
+
"lint:fix": "tsc --noEmit",
|
|
48
|
+
"check:earn-widget": "cd examples/earn-widget && pnpm run build",
|
|
49
|
+
"check:all": "pnpm run lint && pnpm run build && pnpm run check:earn-widget",
|
|
50
|
+
"prepare": "husky"
|
|
51
|
+
},
|
|
52
|
+
"author": "Bruno Eleodoro Roza",
|
|
53
|
+
"license": "ISC",
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@babel/preset-react": "^7.27.1",
|
|
56
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
57
|
+
"@deframe-sdk/components": "0.1.73",
|
|
58
|
+
"@reduxjs/toolkit": "^2.9.0",
|
|
59
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
60
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
61
|
+
"@rollup/plugin-node-resolve": "^16.0.2",
|
|
62
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
63
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
64
|
+
"@rollup/plugin-url": "^8.0.2",
|
|
65
|
+
"@storybook/addon-docs": "^9.1.5",
|
|
66
|
+
"@storybook/addon-onboarding": "^9.1.5",
|
|
67
|
+
"@storybook/react-vite": "^9.1.5",
|
|
68
|
+
"@tsconfig/recommended": "^1.0.10",
|
|
69
|
+
"@types/node": "^24.5.0",
|
|
70
|
+
"@types/react": "^19.2.2",
|
|
71
|
+
"@types/react-dom": "^19.2.1",
|
|
72
|
+
"autoprefixer": "^10.4.21",
|
|
73
|
+
"husky": "^9.1.7",
|
|
74
|
+
"postcss": "^8.5.6",
|
|
75
|
+
"react": "^19.1.1",
|
|
76
|
+
"react-dom": "^19.1.1",
|
|
77
|
+
"react-redux": "^9.2.0",
|
|
78
|
+
"redux": "^5.0.1",
|
|
79
|
+
"rollup": "^2.79.2",
|
|
80
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
81
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
82
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
83
|
+
"rollup-plugin-svg": "^2.0.0",
|
|
84
|
+
"storybook": "^9.1.5",
|
|
85
|
+
"tailwindcss": "^3.4.17",
|
|
86
|
+
"tslib": "^2.6.2",
|
|
87
|
+
"typescript": "^5.9.2",
|
|
88
|
+
"vitest": "4.0.4"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@deframe-sdk/components": "*",
|
|
92
|
+
"@reduxjs/toolkit": "^2.0.0",
|
|
93
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
94
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
95
|
+
"react-redux": "^8.0.0 || ^9.0.0",
|
|
96
|
+
"redux": "^4.0.0 || ^5.0.0"
|
|
97
|
+
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"@deframe-sdk/components": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"@reduxjs/toolkit": {
|
|
103
|
+
"optional": true
|
|
104
|
+
},
|
|
105
|
+
"react-redux": {
|
|
106
|
+
"optional": true
|
|
107
|
+
},
|
|
108
|
+
"redux": {
|
|
109
|
+
"optional": true
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"dependencies": {
|
|
113
|
+
"@hookform/resolvers": "^5.2.2",
|
|
114
|
+
"@sentry/browser": "^10.38.0",
|
|
115
|
+
"clsx": "^2.1.1",
|
|
116
|
+
"framer-motion": "^12.23.24",
|
|
117
|
+
"react-hook-form": "^7.65.0",
|
|
118
|
+
"react-icons": "^5.5.0",
|
|
119
|
+
"zod": "^4.1.12"
|
|
120
|
+
},
|
|
121
|
+
"overrides": {
|
|
122
|
+
"chalk": "4.1.2",
|
|
123
|
+
"strip-ansi": "7.1.0",
|
|
124
|
+
"color-convert": "2.0.1",
|
|
125
|
+
"color-name": "1.1.4",
|
|
126
|
+
"is-core-module": "2.13.1",
|
|
127
|
+
"error-ex": "1.3.2",
|
|
128
|
+
"has-ansi": "5.0.1",
|
|
129
|
+
"simple-swizzle": "0.2.2",
|
|
130
|
+
"ansi-styles": "4.3.0"
|
|
131
|
+
}
|
|
132
|
+
}
|