@cetusprotocol/terminal 0.1.0 → 0.1.2
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 +27 -23
- package/dist/cetus-swap.cjs.js +32 -32
- package/dist/cetus-swap.cjs.js.gz +0 -0
- package/dist/cetus-swap.es.js +9099 -9015
- package/dist/cetus-swap.es.js.gz +0 -0
- package/dist/cetus-swap.umd.js +33 -33
- package/dist/cetus-swap.umd.js.gz +0 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/provider.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Cetus Terminal
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Client dApp using the following tools:
|
|
3
|
+
Visit our Demo / Playground over at [https://terminal.cetus.zone](https://terminal.cetus.zone)
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
- [TypeScript](https://www.typescriptlang.org/) for type checking
|
|
8
|
-
- [Vite](https://vitejs.dev/) for build tooling
|
|
9
|
-
- [Radix UI](https://www.radix-ui.com/) for pre-built UI components
|
|
10
|
-
- [ESLint](https://eslint.org/)
|
|
11
|
-
- [`@mysten/dapp-kit`](https://sdk.mystenlabs.com/dapp-kit) for connecting to
|
|
12
|
-
wallets and loading data
|
|
13
|
-
- [pnpm](https://pnpm.io/) for package management
|
|
5
|
+
## Install from NPM and use it in your react project
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
To install dependencies you can run
|
|
7
|
+
To install
|
|
18
8
|
|
|
19
9
|
```bash
|
|
20
|
-
|
|
10
|
+
npm install @cetusprotocol/terminal
|
|
21
11
|
```
|
|
22
12
|
|
|
23
|
-
To start your dApp in development mode run
|
|
24
13
|
|
|
25
|
-
```bash
|
|
26
|
-
pnpm dev
|
|
27
|
-
```
|
|
28
14
|
|
|
29
|
-
|
|
15
|
+
To use the components in the @cetusprotocol/terminal, wrap your app with the providers shown in the following example. The props available on the providers are covered in more detail in their respective pages.
|
|
30
16
|
|
|
31
|
-
|
|
17
|
+
```jsx
|
|
18
|
+
import { createNetworkConfig, SuiClientProvider, WalletProvider } from'@mysten/dapp-kit';
|
|
19
|
+
import { getFullnodeUrl } from'@mysten/sui/client';
|
|
20
|
+
import { QueryClient, QueryClientProvider } from'@tanstack/react-query';
|
|
32
21
|
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
// Config options for the networks you want to connect to
|
|
23
|
+
const { networkConfig } =createNetworkConfig({
|
|
24
|
+
mainnet: { url:getFullnodeUrl('mainnet') },
|
|
25
|
+
});
|
|
26
|
+
constqueryClient=newQueryClient();
|
|
27
|
+
|
|
28
|
+
functionApp() {
|
|
29
|
+
return (
|
|
30
|
+
<QueryClientProviderclient={queryClient}>
|
|
31
|
+
<SuiClientProvidernetworks={networkConfig} defaultNetwork="localnet">
|
|
32
|
+
<WalletProvider>
|
|
33
|
+
<YourApp />
|
|
34
|
+
</WalletProvider>
|
|
35
|
+
</SuiClientProvider>
|
|
36
|
+
</QueryClientProvider>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
35
39
|
```
|