EthosConnect example using Next.js
This is a Next.js app written with TypeScript implementing EthosConnect, the easiest way to connect with any wallet on Sui.
For a start to finish guide, check out the EthosConnect docs.
Here are the places in the code that implement EthosConnect:
The EthosConnectProvider
wraps the whole app:
function MyApp({ Component, pageProps }: AppProps) {
return (
<EthosConnectProvider>
<Component {...pageProps} />
</EthosConnectProvider>
);
}
This is the rest of the app. It's a simple app for signing in with a wallet, funding the wallet with the DevNet faucet, and minting an NFT.
It uses the EthosConnect
hooks:
const { status, wallet } = ethos.useWallet();
The SignInButton
component:
<SignInButton />
...and more!