Lightweight wallet connection library for Epix Chain dApps. Zero dependencies, single file, works with any EVM wallet.
Handles wallet discovery (EIP-6963), modal UI, chain switching, and connect/disconnect. Bring your own provider wrapper (ethers.js, viem, web3.js, etc).
<script src="https://cdn.jsdelivr.net/gh/EpixZone/epixkit@main/epixkit.js"></script>
<script>
EpixKit.init({
chainId: "0x77D",
chainName: "Epix Testnet",
nativeCurrency: { name: "EPIX", symbol: "EPIX", decimals: 18 },
rpcUrls: ["https://evmrpc.testnet.epix.zone"],
blockExplorerUrls: ["https://testscan.epix.zone"],
// excludeWallets: ["someOtherWallet"] // optional, Phantom excluded by default
})
document.getElementById("connect-btn").onclick = async function() {
var result = await EpixKit.connect()
// result.provider = raw EIP-1193 provider
// result.address = connected address
// result.walletName = "MetaMask", "Keplr", etc.
// result.walletIcon = wallet icon data URI (or null)
console.log("Connected:", result.address, "via", result.walletName)
}
</script>var result = await EpixKit.connect()
var provider = new ethers.BrowserProvider(result.provider)
var signer = await provider.getSigner()
// Now use signer to send transactions, interact with contracts, etc.Configure the library. Call once before connect().
| Option | Type | Description |
|---|---|---|
chainId |
string |
Hex chain ID (required). "0x77D" for testnet, "0x77C" for mainnet |
chainName |
string |
Human-readable chain name |
rpcUrls |
string[] |
RPC endpoints for wallet_addEthereumChain |
blockExplorerUrls |
string[] |
Block explorer URLs |
nativeCurrency |
object |
{ name, symbol, decimals } |
excludeWallets |
string[] |
Additional wallet names or RDNS strings to hide. Phantom is excluded by default. |
Opens the wallet picker modal (if multiple wallets detected) and connects. Returns the raw EIP-1193 provider, connected address, wallet name, and icon.
- If only one wallet is installed, it auto-selects without showing the modal.
- If no wallets are detected, the promise rejects with an error.
- If the user closes the modal, the promise rejects.
Clears internal connection state.
Returns the raw EIP-1193 provider from the connected wallet.
Returns all discovered wallets (after filtering excluded ones) without connecting.
| Network | Chain ID | Hex |
|---|---|---|
| Epix Mainnet | 1916 | 0x77C |
| Epix Testnet | 1917 | 0x77D |
- On load, EpixKit listens for EIP-6963 wallet announcements
- When
connect()is called, it collects all discovered wallets (withwindow.ethereumfallback) - Filters out excluded wallets, shows a picker modal if 2+ wallets are available
- Requests accounts, switches to the configured chain, and returns the provider + address
- CSS and modal HTML are injected into the DOM on first use (prefixed
epixkit-*classes)