wagmi + Next.js example
Install
pnpm add @lithosphere/sdk wagmi viem @tanstack/react-queryConfigure wagmi
// app/wagmi.ts
'use client';
import { http, createConfig } from 'wagmi';
import { injected } from 'wagmi/connectors';
import { defineChain } from 'viem';
import { NETWORKS } from '@lithosphere/sdk';
const net = NETWORKS.mainnet;
export const lithosphere = defineChain({
id: net.chainId,
name: 'Lithosphere',
nativeCurrency: {
name: net.currency.name,
symbol: net.currency.symbol,
decimals: net.currency.decimals,
},
rpcUrls: {
default: { http: [net.rpcUrl] },
},
blockExplorers: {
default: { name: 'Makalu Explorer', url: net.explorerUrl ?? '' },
},
});
export const config = createConfig({
chains: [lithosphere],
connectors: [injected()],
transports: {
[lithosphere.id]: http(),
},
});Wrap the app
Balance + Transfer page
Run it
Notes
Last updated