Copy <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Terminal</title>
<link rel="stylesheet" href="https://archive.cetus.zone/assets/terminal/style.css">
<script src="https://archive.cetus.zone/assets/terminal/main.js"></script>
</head>
<body>
<div id="cetus-terminal"></div>
<script>
window.CetusSwap.init({
containerId: "cetus-terminal",
independentWallet: true,
displayMode: 'Integrated',
});
</script>
</body>
</html>
Replace the script section with the code snippet generated in your own demo to get your html code.
Install from NPM and use it in your react project
Copy import { createNetworkConfig, SuiClientProvider, WalletProvider } from'@mysten/dapp-kit';
import { getFullnodeUrl } from'@mysten/sui/client';
import { QueryClient, QueryClientProvider } from'@tanstack/react-query';
// Config options for the networks you want to connect to
const { networkConfig } =createNetworkConfig({
mainnet: { url:getFullnodeUrl('mainnet') },
});
constqueryClient=newQueryClient();
functionApp() {
return (
<QueryClientProviderclient={queryClient}>
<SuiClientProvidernetworks={networkConfig} defaultNetwork="localnet">
<WalletProvider>
<YourApp />
</WalletProvider>
</SuiClientProvider>
</QueryClientProvider>
);
}