@skip-go/widget-web-component 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.
Files changed (119) hide show
  1. package/CHANGELOG.md +232 -0
  2. package/README.md +3 -0
  3. package/package.json +7 -11
  4. package/build/chains/index.d.ts +0 -5
  5. package/build/constants/abis.d.ts +0 -61
  6. package/build/constants/defaults.d.ts +0 -5
  7. package/build/constants/finality.d.ts +0 -2
  8. package/build/constants/gas.d.ts +0 -3
  9. package/build/constants/ledger-warning.d.ts +0 -2
  10. package/build/constants/swap-venues.d.ts +0 -4
  11. package/build/constants/wagmi.d.ts +0 -2
  12. package/build/hooks/use-account.d.ts +0 -46
  13. package/build/hooks/use-assets.d.ts +0 -3
  14. package/build/hooks/use-auto-set-address.d.ts +0 -12
  15. package/build/hooks/use-balances-by-chain.d.ts +0 -16
  16. package/build/hooks/use-bridges.d.ts +0 -8
  17. package/build/hooks/use-broadcasted-txs.d.ts +0 -26
  18. package/build/hooks/use-chains.d.ts +0 -11
  19. package/build/hooks/use-finality-time-estimate.d.ts +0 -2
  20. package/build/hooks/use-inject-fonts-to-document-head.d.ts +0 -1
  21. package/build/hooks/use-make-wallets.d.ts +0 -26
  22. package/build/hooks/use-route.d.ts +0 -21
  23. package/build/hooks/use-skip-client.d.ts +0 -10
  24. package/build/hooks/use-swap-widget.d.ts +0 -81
  25. package/build/hooks/use-usd-value.d.ts +0 -9
  26. package/build/index.d.ts +0 -5
  27. package/build/lib/cosmos-kit.d.ts +0 -3
  28. package/build/lib/react-query.d.ts +0 -2
  29. package/build/lib/solana-adapter.d.ts +0 -2
  30. package/build/lib/viem/chains.d.ts +0 -66
  31. package/build/lib/wagmi.d.ts +0 -2
  32. package/build/provider/assets.d.ts +0 -16
  33. package/build/provider/index.d.ts +0 -29
  34. package/build/provider/skip-provider.d.ts +0 -12
  35. package/build/provider/wallet/cosmos.d.ts +0 -6
  36. package/build/provider/wallet/evm.d.ts +0 -8
  37. package/build/provider/wallet/solana.d.ts +0 -6
  38. package/build/store/callbacks.d.ts +0 -31
  39. package/build/store/disclosures.d.ts +0 -44
  40. package/build/store/settings.d.ts +0 -17
  41. package/build/store/swap-widget.d.ts +0 -98
  42. package/build/store/track-wallet.d.ts +0 -24
  43. package/build/store/tx-history.d.ts +0 -36
  44. package/build/styles/fonts.d.ts +0 -1
  45. package/build/ui/AdaptiveLink.d.ts +0 -5
  46. package/build/ui/AssetInput.d.ts +0 -20
  47. package/build/ui/AssetSelect/AssetSelectContent.d.ts +0 -16
  48. package/build/ui/AssetSelect/index.d.ts +0 -11
  49. package/build/ui/AssetValue.d.ts +0 -7
  50. package/build/ui/Button/HistoryButton.d.ts +0 -2
  51. package/build/ui/Button/SettingsButton.d.ts +0 -2
  52. package/build/ui/Button/ShareButton.d.ts +0 -3
  53. package/build/ui/ChainSelect/ChainSelectContent.d.ts +0 -8
  54. package/build/ui/ChainSelect/ChainSelectTrigger.d.ts +0 -7
  55. package/build/ui/ChainSelect/index.d.ts +0 -9
  56. package/build/ui/ChainSymbol.d.ts +0 -5
  57. package/build/ui/ConnectedWalletButton.d.ts +0 -8
  58. package/build/ui/ConversionRate.d.ts +0 -22
  59. package/build/ui/CraftedBySkip.d.ts +0 -1
  60. package/build/ui/Dialog/Dialog.d.ts +0 -7
  61. package/build/ui/Dialog/DialogContent.d.ts +0 -7
  62. package/build/ui/Dialog/DialogTrigger.d.ts +0 -5
  63. package/build/ui/Dialog/context.d.ts +0 -7
  64. package/build/ui/HistoryDialog/DescriptionList.d.ts +0 -5
  65. package/build/ui/HistoryDialog/HistoryClearButton.d.ts +0 -4
  66. package/build/ui/HistoryDialog/HistoryList.d.ts +0 -14
  67. package/build/ui/HistoryDialog/RenderDate.d.ts +0 -5
  68. package/build/ui/HistoryDialog/SyncState.d.ts +0 -4
  69. package/build/ui/HistoryDialog/index.d.ts +0 -1
  70. package/build/ui/Icon/ExpandArrow.d.ts +0 -2
  71. package/build/ui/Icon/GearIcon.d.ts +0 -1
  72. package/build/ui/Icon/HistoryIcon.d.ts +0 -2
  73. package/build/ui/Icon/ShareIcon.d.ts +0 -1
  74. package/build/ui/Icon/SkipLogo.d.ts +0 -2
  75. package/build/ui/Icon/SpinnerIcon.d.ts +0 -2
  76. package/build/ui/JsonDialog.d.ts +0 -1
  77. package/build/ui/PreviewRoute/AlertCollapse.d.ts +0 -13
  78. package/build/ui/PreviewRoute/ChainStep.d.ts +0 -30
  79. package/build/ui/PreviewRoute/SetAddressDialog.d.ts +0 -12
  80. package/build/ui/PreviewRoute/index.d.ts +0 -25
  81. package/build/ui/PreviewRoute/make-actions.d.ts +0 -29
  82. package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +0 -11
  83. package/build/ui/PreviewRoute/make-step-state.d.ts +0 -17
  84. package/build/ui/PreviewRoute/types.d.ts +0 -21
  85. package/build/ui/PriceImpactWarning.d.ts +0 -7
  86. package/build/ui/SettingsDialog/GasSetting.d.ts +0 -1
  87. package/build/ui/SettingsDialog/PurgeSetting.d.ts +0 -1
  88. package/build/ui/SettingsDialog/SaveIndicator.d.ts +0 -1
  89. package/build/ui/SettingsDialog/SlippageSetting.d.ts +0 -1
  90. package/build/ui/SettingsDialog/index.d.ts +0 -1
  91. package/build/ui/SimpleTooltip.d.ts +0 -11
  92. package/build/ui/StyledComponents/Buttons.d.ts +0 -3
  93. package/build/ui/StyledComponents/Input.d.ts +0 -2
  94. package/build/ui/StyledComponents/Theme.d.ts +0 -8
  95. package/build/ui/SwapDetails.d.ts +0 -11
  96. package/build/ui/TransactionDialog.d.ts +0 -13
  97. package/build/ui/UsdValue.d.ts +0 -27
  98. package/build/ui/WalletModal/PraxWalletIndex.d.ts +0 -4
  99. package/build/ui/WalletModal/WalletListItem.d.ts +0 -9
  100. package/build/ui/WalletModal/WalletModal.d.ts +0 -10
  101. package/build/ui/WalletModal/context.d.ts +0 -13
  102. package/build/ui/WalletModal/index.d.ts +0 -3
  103. package/build/ui/Widget.d.ts +0 -6
  104. package/build/ui/WithStyledShadowDom.d.ts +0 -4
  105. package/build/ui/index.d.ts +0 -12
  106. package/build/ui/theme.d.ts +0 -20
  107. package/build/utils/assert.d.ts +0 -2
  108. package/build/utils/clients.d.ts +0 -4
  109. package/build/utils/error.d.ts +0 -1
  110. package/build/utils/intl.d.ts +0 -4
  111. package/build/utils/ledger-warning.d.ts +0 -3
  112. package/build/utils/link.d.ts +0 -4
  113. package/build/utils/number.d.ts +0 -4
  114. package/build/utils/os.d.ts +0 -3
  115. package/build/utils/random.d.ts +0 -1
  116. package/build/utils/ui.d.ts +0 -2
  117. package/build/utils/usd.d.ts +0 -5
  118. package/build/utils/wallet.d.ts +0 -7
  119. package/build/web-component.d.ts +0 -15
package/CHANGELOG.md ADDED
@@ -0,0 +1,232 @@
1
+ # @skip-go/widget
2
+
3
+ ## 2.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 17277e3: not showing 0 transaction remaining
8
+
9
+ ## 2.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 52f410a: prax wallet support
14
+ - aabf5aa: sei destination address evm wallet support
15
+
16
+ ## 2.4.1
17
+
18
+ ### Patch Changes
19
+
20
+ - 9a23c8c: added wagmiConfig param in provider
21
+
22
+ ## 2.4.0
23
+
24
+ ### Minor Changes
25
+
26
+ - 014c913: Add chainIDsToAffiliates to SkipRouterOptions
27
+
28
+ ## 2.3.8
29
+
30
+ ### Patch Changes
31
+
32
+ - bc44148: use @skip-go/client package
33
+
34
+ ## 2.3.7
35
+
36
+ ### Patch Changes
37
+
38
+ - 97837ef: Use monospace font for address input
39
+
40
+ ## 2.3.6
41
+
42
+ ### Patch Changes
43
+
44
+ - 9207d3e: Show last swap when there are multiple on a chain in transaction preview
45
+
46
+ ## 2.3.5
47
+
48
+ ### Patch Changes
49
+
50
+ - c6690de: clarify noble cctp ledger warning
51
+
52
+ ## 2.3.4
53
+
54
+ ### Patch Changes
55
+
56
+ - 640eafa: add pretty name in asset selection
57
+
58
+ ## 2.3.3
59
+
60
+ ### Patch Changes
61
+
62
+ - 9f2fd06: remove error toast parsing gas asset
63
+
64
+ ## 2.3.2
65
+
66
+ ### Patch Changes
67
+
68
+ - d98865b: Update CCTP Warning message
69
+
70
+ ## 2.3.1
71
+
72
+ ### Patch Changes
73
+
74
+ - d90ddd5: add source chain id in getAddress
75
+
76
+ ## 2.3.0
77
+
78
+ ### Minor Changes
79
+
80
+ - 7fb01d3: add makeDestinationWallets param to provider
81
+
82
+ ## 2.2.4
83
+
84
+ ### Patch Changes
85
+
86
+ - cca30c1: expose provider props
87
+
88
+ ## 2.2.3
89
+
90
+ ### Patch Changes
91
+
92
+ - bb83c5f: use chain name if pretty name empty
93
+
94
+ ## 2.2.2
95
+
96
+ ### Patch Changes
97
+
98
+ - a3a03f0: increase API chains data usage
99
+
100
+ ## 2.2.1
101
+
102
+ ### Patch Changes
103
+
104
+ - 81833e6: remove chains codegen
105
+
106
+ ## 2.2.0
107
+
108
+ ### Minor Changes
109
+
110
+ - 52e827f: Add prop persistSwapWidgetState
111
+
112
+ ## 2.1.1
113
+
114
+ ### Patch Changes
115
+
116
+ - 5533dbe: Add missing toast styles for toast.error
117
+
118
+ ## 2.1.0
119
+
120
+ ### Minor Changes
121
+
122
+ - b22d262: Revert shadow dom implentation to use react-shadow-scope
123
+
124
+ ## 2.0.1
125
+
126
+ ### Patch Changes
127
+
128
+ - f621037: Update misc styling in widget
129
+
130
+ ## 2.0.0
131
+
132
+ ### Major Changes
133
+
134
+ - e10995d: Add theme prop to enable custom styling
135
+
136
+ ### Patch Changes
137
+
138
+ - 0eccea4: Fix auto selecting input fields in shadow-dom
139
+
140
+ ## 1.3.1
141
+
142
+ ### Patch Changes
143
+
144
+ - 6acd8e2: enable iframe wallets
145
+
146
+ ## 1.3.0
147
+
148
+ ### Minor Changes
149
+
150
+ - dcb144b: Export SwapWidgetWithoutProvider
151
+
152
+ ### Patch Changes
153
+
154
+ - 6eb6740: source chain forma validate gas balance off
155
+
156
+ ## 1.2.6
157
+
158
+ ### Patch Changes
159
+
160
+ - 8250a67: Add cssReset to widget
161
+
162
+ ## 1.2.5
163
+
164
+ ### Patch Changes
165
+
166
+ - 6a46c11: fix defaultRoute regression
167
+
168
+ ## 1.2.4
169
+
170
+ ### Patch Changes
171
+
172
+ - c1d1880: Update README to mention polyfilling node core modules and wrapping widget with fixed container
173
+
174
+ ## 1.2.3
175
+
176
+ ### Patch Changes
177
+
178
+ - 1e173c3: Remove extra SwapWidgetProvider wrapping the web-component
179
+
180
+ ## 1.2.2
181
+
182
+ ### Patch Changes
183
+
184
+ - 7240d7b: Update widget README
185
+
186
+ ## 1.2.1
187
+
188
+ ### Patch Changes
189
+
190
+ - 4939650: source/destination chains/assets filtering
191
+
192
+ ## 1.2.0
193
+
194
+ ### Minor Changes
195
+
196
+ - 6c4e611: Move widget to within shadow DOM
197
+
198
+ ## 1.1.1
199
+
200
+ ### Patch Changes
201
+
202
+ - 6c044e1: Use latest core version and update readme
203
+
204
+ ## 1.1.0
205
+
206
+ ### Minor Changes
207
+
208
+ - 2c7e965: change url
209
+
210
+ ## 1.0.0
211
+
212
+ ### Major Changes
213
+
214
+ - 0380db6: change fonts and logo
215
+
216
+ ## 0.1.1
217
+
218
+ ### Patch Changes
219
+
220
+ - 1e84585: prefixwrap css styles
221
+
222
+ ## 0.1.0
223
+
224
+ ### Minor Changes
225
+
226
+ - e05771b: Add web-component
227
+
228
+ ## 0.0.1
229
+
230
+ ### Patch Changes
231
+
232
+ - bf1cf72: release 0.0.1
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Skip Go Widget
2
+
3
+ We document everything about Skip Go Widget in [docs.skip.build/go/widget](https://docs.skip.build/go/widget)
package/package.json CHANGED
@@ -1,23 +1,19 @@
1
1
  {
2
2
  "name": "@skip-go/widget-web-component",
3
+ "version": "0.0.6",
3
4
  "description": "Swap widget web component",
4
- "version": "0.0.4",
5
- "repository": "https://github.com/skip-mev/widget",
6
- "type": "module",
7
5
  "exports": {
8
6
  ".": {
9
7
  "import": "./build/index.js"
10
8
  }
11
9
  },
12
- "types": "./build/index.d.ts",
13
- "files": [
14
- "build",
15
- "README.md"
16
- ],
10
+ "types": "./types.d.ts",
17
11
  "scripts": {
18
12
  "publish": "npm publish"
19
13
  },
20
- "publishConfig": {
21
- "access": "public"
22
- }
14
+ "files": [
15
+ "build",
16
+ "README.md",
17
+ "CHANGELOG.md"
18
+ ]
23
19
  }
@@ -1,5 +0,0 @@
1
- import { Chain, Asset, AssetList } from '@chain-registry/types';
2
- export declare const chains: Chain[];
3
- export declare const assets: AssetList[];
4
- export declare function chainIdToName(chainId: string): string;
5
- export declare function getAssets(chainId: string): Asset[];
@@ -1,61 +0,0 @@
1
- import { Abi } from 'viem';
2
- export declare const multicall3ABI: Abi;
3
- export declare const seiPrecompileAddrABI: readonly [{
4
- readonly inputs: readonly [{
5
- readonly internalType: "string";
6
- readonly name: "v";
7
- readonly type: "string";
8
- }, {
9
- readonly internalType: "string";
10
- readonly name: "r";
11
- readonly type: "string";
12
- }, {
13
- readonly internalType: "string";
14
- readonly name: "s";
15
- readonly type: "string";
16
- }, {
17
- readonly internalType: "string";
18
- readonly name: "customMessage";
19
- readonly type: "string";
20
- }];
21
- readonly name: "associate";
22
- readonly outputs: readonly [{
23
- readonly internalType: "string";
24
- readonly name: "seiAddr";
25
- readonly type: "string";
26
- }, {
27
- readonly internalType: "address";
28
- readonly name: "evmAddr";
29
- readonly type: "address";
30
- }];
31
- readonly stateMutability: "nonpayable";
32
- readonly type: "function";
33
- }, {
34
- readonly inputs: readonly [{
35
- readonly internalType: "address";
36
- readonly name: "addr";
37
- readonly type: "address";
38
- }];
39
- readonly name: "getSeiAddr";
40
- readonly outputs: readonly [{
41
- readonly internalType: "string";
42
- readonly name: "response";
43
- readonly type: "string";
44
- }];
45
- readonly stateMutability: "view";
46
- readonly type: "function";
47
- }, {
48
- readonly inputs: readonly [{
49
- readonly internalType: "string";
50
- readonly name: "addr";
51
- readonly type: "string";
52
- }];
53
- readonly name: "getEvmAddr";
54
- readonly outputs: readonly [{
55
- readonly internalType: "address";
56
- readonly name: "response";
57
- readonly type: "address";
58
- }];
59
- readonly stateMutability: "view";
60
- readonly type: "function";
61
- }];
@@ -1,5 +0,0 @@
1
- export declare const endpointOptions: {
2
- getRpcEndpointForChain: (chainID: string) => Promise<string>;
3
- getRestEndpointForChain: (chainID: string) => Promise<string>;
4
- };
5
- export declare const apiURL = "https://go.skip.build/api/widget/skip";
@@ -1,2 +0,0 @@
1
- /** @see https://docs.axelar.dev/learn/txduration#common-finality-time-for-interchain-transactions */
2
- export declare function getFinalityTime(id: string | number): string;
@@ -1,3 +0,0 @@
1
- export declare const DEFAULT_GAS_AMOUNT: string;
2
- export declare const EVMOS_GAS_AMOUNT: string;
3
- export declare function isChainIdEvmos(chainID: string): boolean;
@@ -1,2 +0,0 @@
1
- export declare const knownBrokenCCTPLedgerChainIds: string[];
2
- export declare const knownEthermintLedgerChainIds: string[];
@@ -1,4 +0,0 @@
1
- export interface SwapVenueConfig {
2
- prettyName: string;
3
- }
4
- export declare const SWAP_VENUES: Record<string, SwapVenueConfig>;
@@ -1,2 +0,0 @@
1
- import { Chain } from 'wagmi/chains';
2
- export declare const EVM_CHAINS: Chain[];
@@ -1,46 +0,0 @@
1
- export declare function useAccount(chainID?: string): {
2
- address: string | undefined;
3
- isWalletConnected: boolean;
4
- wallet: {
5
- walletName: string;
6
- walletPrettyName: string;
7
- walletInfo: {
8
- logo: string | {
9
- major: string;
10
- minor: string;
11
- } | undefined;
12
- };
13
- isLedger: boolean | null | undefined;
14
- } | undefined;
15
- chainType: string;
16
- connect: () => Promise<void>;
17
- disconnect: () => Promise<void>;
18
- } | {
19
- address: `0x${string}` | undefined;
20
- isWalletConnected: boolean;
21
- wallet: {
22
- walletName: string;
23
- walletPrettyName: string;
24
- walletInfo: {
25
- logo: string | undefined;
26
- };
27
- isLedger?: undefined;
28
- } | undefined;
29
- chainType: string;
30
- connect: () => Promise<void> | undefined;
31
- disconnect: () => Promise<void> | undefined;
32
- } | {
33
- address: string | undefined;
34
- isWalletConnected: boolean | undefined;
35
- wallet: {
36
- walletName: import("@solana/wallet-adapter-base").WalletName<string>;
37
- walletPrettyName: import("@solana/wallet-adapter-base").WalletName<string>;
38
- walletInfo: {
39
- logo: string;
40
- };
41
- isLedger?: undefined;
42
- } | undefined;
43
- chainType: string;
44
- connect: () => Promise<void> | undefined;
45
- disconnect: () => Promise<void> | undefined;
46
- } | undefined;
@@ -1,3 +0,0 @@
1
- import { Asset, AssetsRequest } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- export declare function useAssets(options?: AssetsRequest): UseQueryResult<Record<string, Asset[]>>;
@@ -1,12 +0,0 @@
1
- import { Chain } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- import { ChainAddresses, SetChainAddressesParam } from '../ui/PreviewRoute/types';
4
- export declare const useAutoSetAddress: ({ chain, chainID, index, enabled, signRequired, chainAddresses, setChainAddresses, }: {
5
- chain?: Chain | undefined;
6
- chainID: string;
7
- index: number;
8
- enabled?: boolean | undefined;
9
- signRequired?: boolean | undefined;
10
- chainAddresses: ChainAddresses;
11
- setChainAddresses: (v: SetChainAddressesParam) => void;
12
- }) => UseQueryResult;
@@ -1,16 +0,0 @@
1
- import { Asset, SkipClient } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- import { PublicClient } from 'viem';
4
- import { Chain } from './use-chains';
5
- interface Args {
6
- address?: string;
7
- chain?: Chain;
8
- assets?: Asset[];
9
- enabled?: boolean;
10
- solanaRpcUrl?: string;
11
- }
12
- export declare function useBalancesByChain({ address, chain, assets, enabled, }: Args): UseQueryResult<Record<string, string> | undefined>;
13
- export declare function getBalancesByChain(rpcURL: string, address: string, chainID: string, assets: Asset[]): Promise<Record<string, string>>;
14
- export declare function getEvmChainBalances(skipClient: SkipClient, publicClient: PublicClient, address: string, chainID: string): Promise<Record<string, string>>;
15
- export declare const getSvmChainBalances: (rpcUrl: string, address: string, chainID: string, assets: Asset[]) => Promise<Record<string, string>>;
16
- export {};
@@ -1,8 +0,0 @@
1
- import { Bridge } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- export type UseBridgesQueryArgs<T = Bridge[]> = {
4
- enabled?: boolean;
5
- select?: (arr?: Bridge[]) => T;
6
- };
7
- export declare function useBridges<T = Bridge[]>(args?: UseBridgesQueryArgs<T>): UseQueryResult<T>;
8
- export declare function useBridgeByID(bridgeID?: Bridge['id']): UseQueryResult<Bridge | undefined>;
@@ -1,26 +0,0 @@
1
- import { ChainTransaction, TransferState, StatusState } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- interface TransferSequence {
4
- srcChainID: string;
5
- destChainID: string;
6
- txs: {
7
- sendTx: ChainTransaction | null;
8
- receiveTx: ChainTransaction | null;
9
- };
10
- state: TransferState;
11
- }
12
- interface TxsStatus {
13
- isSuccess: boolean;
14
- isSettled: boolean;
15
- transferSequence: TransferSequence[];
16
- states: StatusState[];
17
- }
18
- export declare const useBroadcastedTxsStatus: ({ txs, txsRequired, enabled, }: {
19
- txsRequired: number;
20
- txs: {
21
- chainID: string;
22
- txHash: string;
23
- }[] | undefined;
24
- enabled?: boolean | undefined;
25
- }) => UseQueryResult<TxsStatus>;
26
- export {};
@@ -1,11 +0,0 @@
1
- import { Chain as SkipChain } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- export type Chain = SkipChain & {
4
- prettyName: string;
5
- };
6
- export type UseChainsQueryArgs<T = Chain[]> = {
7
- enabled?: boolean;
8
- select?: (arr?: Chain[]) => T;
9
- };
10
- export declare function useChains<T = Chain[]>(args?: UseChainsQueryArgs<T>): UseQueryResult<T>;
11
- export declare function useChainByID(chainID?: string): UseQueryResult<Chain | undefined>;
@@ -1,2 +0,0 @@
1
- import { RouteResponse } from '@skip-go/client';
2
- export declare function useFinalityTimeEstimate(route: RouteResponse): string;
@@ -1 +0,0 @@
1
- export declare const useInjectFontsToDocumentHead: () => void;
@@ -1,26 +0,0 @@
1
- export interface MinimalWallet {
2
- walletName: string;
3
- walletPrettyName: string;
4
- walletChainType: 'evm' | 'cosmos' | 'svm';
5
- walletInfo: {
6
- logo?: string | {
7
- major: string;
8
- minor: string;
9
- };
10
- };
11
- connect: () => Promise<void>;
12
- disconnect: () => Promise<void>;
13
- isWalletConnected: boolean;
14
- isAvailable?: boolean;
15
- getAddress?: (props: {
16
- signRequired?: boolean;
17
- context?: 'recovery' | 'destination';
18
- praxWallet?: {
19
- index?: number;
20
- sourceChainID?: string;
21
- };
22
- }) => Promise<string | undefined>;
23
- }
24
- export declare const useMakeWallets: () => {
25
- makeWallets: (chainID: string) => MinimalWallet[];
26
- };
@@ -1,21 +0,0 @@
1
- import { BridgeType, ExperimentalFeature, RouteResponse, SmartSwapOptions, SwapVenueRequest } from '@skip-go/client';
2
- import { UseQueryResult } from '@tanstack/react-query';
3
- export interface RouteConfig {
4
- experimentalFeatures?: ExperimentalFeature[];
5
- allowMultiTx?: boolean;
6
- allowUnsafe?: boolean;
7
- bridges?: BridgeType[];
8
- swapVenues?: SwapVenueRequest[];
9
- smartSwapOptions?: SmartSwapOptions;
10
- }
11
- interface UseRouteArgs extends RouteConfig {
12
- direction: 'swap-in' | 'swap-out';
13
- amount: string;
14
- sourceAsset?: string;
15
- sourceAssetChainID?: string;
16
- destinationAsset?: string;
17
- destinationAssetChainID?: string;
18
- enabled?: boolean;
19
- }
20
- export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): UseQueryResult<RouteResponse | undefined>;
21
- export {};
@@ -1,10 +0,0 @@
1
- export declare function useSkipClient(): import("@skip-go/client").SkipClient;
2
- export declare function useSkipConfig(): {
3
- apiURL: string | undefined;
4
- endpointOptions: {
5
- endpoints?: Record<string, import("@skip-go/client").EndpointOptions> | undefined;
6
- getRpcEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
7
- getRestEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
8
- } | undefined;
9
- makeDestinationWallets: ((chainID: string) => import("./use-make-wallets").MinimalWallet[]) | undefined;
10
- };
@@ -1,81 +0,0 @@
1
- import { GasPrice } from '@cosmjs/stargate';
2
- import { Asset, BridgeType } from '@skip-go/client';
3
- import { MouseEvent } from 'react';
4
- import { Chain } from './use-chains';
5
- export interface DefaultRouteConfig {
6
- amountIn?: number;
7
- amountOut?: number;
8
- srcChainID?: string;
9
- srcAssetDenom?: string;
10
- destChainID?: string;
11
- destAssetDenom?: string;
12
- }
13
- export declare function useSwapWidget(persistSwapWidgetState?: boolean): {
14
- amountIn: string;
15
- amountOut: string;
16
- bridges: BridgeType[];
17
- destinationAsset: Asset | undefined;
18
- destinationChain: Chain | undefined;
19
- direction: "swap-in" | "swap-out";
20
- isAmountError: string | boolean;
21
- noRouteFound: boolean;
22
- numberOfTransactions: number;
23
- onAllTransactionComplete: () => void;
24
- onBridgeChange: (bridges: BridgeType[]) => void;
25
- onDestinationAmountChange: (amount: string) => void;
26
- onDestinationAssetChange: (asset: Asset) => void;
27
- onDestinationChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
28
- onInvertDirection: () => Promise<void>;
29
- onSourceAmountChange: (amount: string) => void;
30
- onSourceAmountMax: <T extends HTMLElement>(event: MouseEvent<T, globalThis.MouseEvent>) => false | undefined;
31
- onSourceAssetChange: (asset: Asset) => void;
32
- onSourceChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
33
- priceImpactThresholdReached: boolean;
34
- route: import("@skip-go/client/dist/shared-CpfDn0H3").R | undefined;
35
- routeError: string;
36
- routeLoading: boolean;
37
- routeWarningMessage: string | undefined;
38
- routeWarningTitle: string | undefined;
39
- sourceAsset: Asset | undefined;
40
- sourceChain: Chain | undefined;
41
- sourceFeeAmount: string | undefined;
42
- sourceFeeAsset: Asset | undefined;
43
- swapPriceImpactPercent: number | undefined;
44
- usdDiffPercent: number | undefined;
45
- shareable: {
46
- link: string;
47
- };
48
- };
49
- export interface SwapWidgetStore {
50
- amountIn: string;
51
- amountOut: string;
52
- sourceChain?: Chain;
53
- sourceAsset?: Asset;
54
- sourceFeeAsset?: Asset;
55
- sourceGasPrice?: GasPrice;
56
- destinationChain?: Chain;
57
- destinationAsset?: Asset;
58
- direction: 'swap-in' | 'swap-out';
59
- gasRequired?: string;
60
- bridges: BridgeType[];
61
- }
62
- export declare const defaultValues: SwapWidgetStore;
63
- export declare const useSwapWidgetStore: import("zustand/traditional").UseBoundStoreWithEqualityFn<Omit<Omit<import("zustand").StoreApi<SwapWidgetStore>, "subscribe"> & {
64
- subscribe: {
65
- (listener: (selectedState: SwapWidgetStore, previousSelectedState: SwapWidgetStore) => void): () => void;
66
- <U>(selector: (state: SwapWidgetStore) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
67
- equalityFn?: ((a: U, b: U) => boolean) | undefined;
68
- fireImmediately?: boolean | undefined;
69
- } | undefined): () => void;
70
- };
71
- }, "persist"> & {
72
- persist: {
73
- setOptions: (options: Partial<import("zustand/middleware").PersistOptions<SwapWidgetStore, unknown>>) => void;
74
- clearStorage: () => void;
75
- rehydrate: () => void | Promise<void>;
76
- hasHydrated: () => boolean;
77
- onHydrate: (fn: (state: SwapWidgetStore) => void) => () => void;
78
- onFinishHydration: (fn: (state: SwapWidgetStore) => void) => () => void;
79
- getOptions: () => Partial<import("zustand/middleware").PersistOptions<SwapWidgetStore, unknown>>;
80
- };
81
- }>;
@@ -1,9 +0,0 @@
1
- import { UseQueryResult } from '@tanstack/react-query';
2
- export type Args = {
3
- chainId: string;
4
- denom: string;
5
- coingeckoID?: string;
6
- value: string;
7
- };
8
- export declare function useUsdValue(args: Args): UseQueryResult<number>;
9
- export declare function useUsdDiffValue([args1, args2]: [Args, Args]): UseQueryResult<number, Error>;
package/build/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { SwapWidgetProvider, SwapWidgetProviderProps } from './provider';
2
- export { SwapWidget, SwapWidgetProps, SwapWidgetWithoutProviders, SwapWidgetWithoutProvidersProps, } from './ui';
3
- export { useAssets } from './provider/assets';
4
- export { useChains, useChainByID } from './hooks/use-chains';
5
- export { MinimalWallet } from './hooks/use-make-wallets';
@@ -1,3 +0,0 @@
1
- import { WalletClient } from '@cosmos-kit/core';
2
- export declare const wallets: (import("@cosmos-kit/keplr-extension").KeplrExtensionWallet | import("@cosmos-kit/cosmostation-extension").CosmostationExtensionWallet | import("@cosmos-kit/leap-extension").LeapExtensionWallet | import("@cosmos-kit/okxwallet-extension").OkxwalletExtensionWallet | import("@cosmos-kit/station-extension").StationExtensionWallet | import("@cosmos-kit/vectis-extension").VectisExtensionWallet)[];
3
- export type MergedWalletClient = import('@cosmos-kit/cosmostation-extension/cjs/extension/client').CosmostationClient | import('@cosmos-kit/keplr-extension/cjs/extension/client').KeplrClient | import('@cosmos-kit/leap-extension/cjs/extension/client').LeapClient | import('@cosmos-kit/okxwallet-extension/cjs/extension/client').OkxwalletClient | import('@cosmos-kit/station-extension/cjs/extension/client').StationClient | import('@cosmos-kit/vectis-extension/cjs/extension/client').VectisClient | WalletClient;
@@ -1,2 +0,0 @@
1
- import { QueryClient } from '@tanstack/react-query';
2
- export declare const queryClient: QueryClient;