@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 CHANGED
@@ -1,35 +1,39 @@
1
- # Sui dApp Starter Template
1
+ # Cetus Terminal
2
2
 
3
- This dApp was created using `@mysten/create-dapp` that sets up a basic React
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
- - [React](https://react.dev/) as the UI framework
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
- ## Starting your dApp
16
-
17
- To install dependencies you can run
7
+ To install
18
8
 
19
9
  ```bash
20
- pnpm install
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
- ## Building
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
- To build your app for deployment you can run
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
- ```bash
34
- pnpm build
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
  ```