@multiplatform.one/web3
v6.7.0
Published
Web3 wallet integration for multiplatform.one ecosystem with ConnectKit and wagmi
Downloads
75
Readme
@multiplatform.one/web3
Web3 wallet integration for multiplatform.one — wagmi + viem wired into the connectkit modal, with EVM/Solana/Sui support, native (WebView bridge) builds, and ready-made wallet UI components.
Install
pnpm add @multiplatform.one/web3Peers: react, @tanstack/react-query.
What it owns
WalletProvider— wagmi + connectkit setup from oneWeb3Config(walletConnectProjectId,appName,chains,enableTestnets,localnetfor a hardhat dev chain, Solana/Sui RPC URLs)- Hooks —
useWallet()(unified state + actions),useContractRead,useContractWrite, plus re-exported wagmi hooks (useAccount,useBalance,useConnect,useSignMessage,useSwitchChain, …) - Components —
ConnectKitButton,WalletButton,WalletAvatar,WalletStatus,NetworkSwitcher - Subpaths —
./native(WebView wallet bridge),./connectkit
What it must not do
- No modal shell — the modal UI lives in
@multiplatform.one/connectkit; this package registers its wallet screens into it - No auth/session — Keycloak wallet-claim helpers live in
@multiplatform.one/keycloak
Usage
import { ConnectKitButton, WalletProvider, useWallet } from "@multiplatform.one/web3";
function Balance() {
const { address, isConnected } = useWallet();
return isConnected ? <span>{address}</span> : <ConnectKitButton />;
}
export function App() {
return (
<WalletProvider config={{ walletConnectProjectId: "…", appName: "My App" }}>
<Balance />
</WalletProvider>
);
}License
Apache-2.0
