Wallet Integration
HOT Network is non-custodial. Connect your Solana wallet to authenticate and interact with the platform.
Supported Wallets
Popular
Phantom
Popular
Solflare
BackpackNon-Custodial
Only you control your private keys. HOT Network never accesses funds.
Signature Validation
All actions require explicit wallet signature for security.
Secure Payments
Payments are executed only after wallet-level approval.
Transaction Verification
All transactions are validated on the Solana blockchain.
Testing Wallet Integration
- Install a Solana wallet extension.
- Switch wallet to Devnet.
- Use Solana Faucet: Solana Faucet
- Load the HOT app and click Connect Wallet.
- Test payments or on-chain actions.
- Verify results using Solana Explorer (Devnet).
Solana Wallet Adapter Setup
Install dependencies:
npm install @solana/wallet-adapter-react @solana/wallet-adapter-wallets @solana/wallet-adapter-react-ui @solana/web3.js
Provider Setup:
// app/providers.tsx
"use client"
import { ConnectionProvider, WalletProvider } from "@solana/wallet-adapter-react"
import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"
import { PhantomWalletAdapter, SolflareWalletAdapter, BackpackWalletAdapter } from "@solana/wallet-adapter-wallets"
import { clusterApiUrl } from "@solana/web3.js"
import { useMemo } from "react"
export function SolanaProviders({ children }) {
const endpoint = clusterApiUrl("devnet")
const wallets = useMemo(
() => [new PhantomWalletAdapter(), new SolflareWalletAdapter(), new BackpackWalletAdapter()],
[]
)
return (
<ConnectionProvider endpoint={endpoint}>
<WalletProvider wallets={wallets} autoConnect>
<WalletModalProvider>{children}</WalletModalProvider>
</WalletProvider>
</ConnectionProvider>
)
}Connect Button
import { useWallet } from "@solana/wallet-adapter-react";
export function ConnectButton() {
const { connected, connect } = useWallet();
return <button onClick={connect} disabled={connected}>{connected ? "Connected" : "Connect Wallet"}</button>;
}Disconnect Button
import { useWallet } from "@solana/wallet-adapter-react";
export function DisconnectButton() {
const { disconnect } = useWallet();
return <button onClick={disconnect}>Disconnect</button>;
}On-Chain SOL Transfer
import { useWallet } from "@solana/wallet-adapter-react";
import { Connection, LAMPORTS_PER_SOL, SystemProgram, Transaction } from "@solana/web3.js";
export function SendSol() {
const { publicKey, sendTransaction } = useWallet();
const connection = new Connection("https://api.devnet.solana.com");
async function send() {
if (!publicKey) return;
const tx = new Transaction().add(
SystemProgram.transfer({
fromPubkey: publicKey,
toPubkey: publicKey,
lamports: 0.01 * LAMPORTS_PER_SOL,
})
);
const sig = await sendTransaction(tx, connection);
console.log("Transaction:", sig);
}
return <button onClick={send}>Send 0.01 SOL</button>;
}Send SPL Token
import { getAssociatedTokenAddress, createTransferInstruction } from "@solana/spl-token";
import { useWallet } from "@solana/wallet-adapter-react";
import { Connection, Transaction } from "@solana/web3.js";
export function SendSplToken({ mint, amount, recipient }) {
const { publicKey, sendTransaction } = useWallet();
const connection = new Connection("https://api.devnet.solana.com");
async function send() {
const fromATA = await getAssociatedTokenAddress(mint, publicKey);
const toATA = await getAssociatedTokenAddress(mint, recipient);
const ix = createTransferInstruction(fromATA, toATA, publicKey, amount);
const tx = new Transaction().add(ix);
const sig = await sendTransaction(tx, connection);
console.log("SPL Sent:", sig);
}
return <button onClick={send}>Send Token</button>;
}Sign and Verify Message
import { useWallet } from "@solana/wallet-adapter-react";
import nacl from "tweetnacl";
export function SignMessage() {
const { publicKey, signMessage } = useWallet();
async function sign() {
const message = new TextEncoder().encode("HOT Network verification message");
const sig = await signMessage(message);
console.log("Signature:", sig);
console.log("Signer:", publicKey.toBase58());
}
return <button onClick={sign}>Sign Message</button>;
}
// Verification
export function verify(message, signature, publicKey) {
const encoded = new TextEncoder().encode(message);
return nacl.sign.detached.verify(encoded, signature, publicKey.toBytes());
}Authentication Integration
HOT Network uses Privy.io for Web3-native authentication layers. Wallet connection automatically creates a secure identity.
Coming Soon: Clerk authentication support.
