Developer skill for integrating Bitget Wallet into DApps. Use this skill whenever the user mentions Bitget Wallet, window.bitkeep, wallet connection, signing transactions, or building a DApp on any of these chains: EVM (Ethereum, BSC, Polygon, Arbitrum, Base), Solana, Bitcoin, TON, Aptos, Cosmos, Tron, or Sui. Also use for adapter libraries (Wagmi, RainbowKit, WalletConnect, TonConnect), Telegram Mini Apps, and mobile DeepLinks. Use proactively any time wallet provider APIs, chain-specific signing, or window.bitkeep.* integration comes up — even if the user doesn't say "Bitget Wallet" explicitly. Do NOT use for server-side blockchain operations without wallet interaction, or for wallet-internal development. Pair with `dapp-common-skill` for DApp architecture patterns (layout, transfer forms, chain selector UI, signing panels, transaction lifecycle).
47:T375f,
Developer skill for integrating Bitget Wallet into DApps. Covers 8 blockchains, 5 adapter frameworks, Telegram Mini Apps, and DeepLinks.
Determine the chain, platform, and framework, then route to the right references.
Routing Table:
| User Intent | Load References |
|---|---|
| "Connect EVM / MetaMask-compatible wallet" | detection-and-setup.md + evm.md |
| "Solana DApp" | detection-and-setup.md + solana.md |
| "Bitcoin / Ordinals / BRC-20" | detection-and-setup.md + bitcoin.md |
| "TON application" | detection-and-setup.md + ton.md |
| "Aptos DApp" | detection-and-setup.md + aptos.md |
| "Cosmos / IBC" | detection-and-setup.md + cosmos.md |
| "Tron DApp" | detection-and-setup.md + tron.md |
| "Sui DApp" | detection-and-setup.md + sui.md |
| "Use Wagmi / RainbowKit" | adapters.md (adapter handles detection) |
| "Add Bitget Wallet to recommended / default wallet list" | adapters.md → see "How to Put Bitget Wallet in the Recommended / Default Wallet List" section |
| "Multi-chain DApp" | detection-and-setup.md + each chain reference |
| "Telegram Mini App" | telegram-miniapp.md |
| "Open Bitget Swap" | bitget-exclusive.md |
| "DeepLink / open in App" | deeplink.md |
Routing wildcard rule: When the user mentions any chain name not listed above, default to loading
detection-and-setup.md+{chain}.md.
Decision Tree — JS Bridge vs Adapter:
React project + EVM only → adapters.md (recommend Wagmi/RainbowKit)
React project + multi-chain → detection-and-setup.md + chain references
Vue / Angular / Vanilla JS → detection-and-setup.md + chain references
Telegram Mini App → telegram-miniapp.md
Existing ethers.js / web3.js → evm.md (use Provider directly)
If the user is building a complete DApp (not just a wallet integration snippet), also load dapp-common-skill. It provides:
This skill (Bitget Wallet Developer Skill) tells the agent how to call wallet APIs. The DApp Common Skill tells the agent how to build good DApp UX. Both are needed for a complete DApp.
Load only the references you need. Each file is self-contained with full code examples.
Infrastructure:
references/detection-and-setup.md — Provider detection, install prompts, EIP-6963, environment detectionChain Integration (by chain):
references/evm.md — Ethereum, BSC, Polygon, Arbitrum, Base, and all EVM chainsreferences/solana.md — Solana (Phantom-compatible)references/bitcoin.md — Bitcoin (UniSat protocol)references/ton.md — TON (OpenMask/TonKeeper compatible + TonConnect)references/aptos.md — Aptos (Petra-compatible)references/cosmos.md — Cosmos (Keplr protocol)references/tron.md — Tron (TronLink protocol)references/sui.md — Sui (Wallet Standard)Framework Integration (by adapter):
references/adapters.md — Wagmi, RainbowKit, WalletConnect, TonConnect, Web3-OnboardExtended Scenarios:
references/telegram-miniapp.md — Telegram Mini App (TonConnect)references/deeplink.md — DeepLink navigation + App invocationreferences/bitget-exclusive.md — Open Bitget Wallet's built-in Swap page| Chain | Must Confirm |
|---|---|
| EVM | Target chain? Need chain switching? Using ethers.js or viem? |
| Solana | Legacy or Versioned Transaction? |
| Bitcoin | Need Ordinals/Inscriptions? PSBT signing? |
| TON | Use JS Bridge or TonConnect? |
| Aptos | Mainnet or Testnet? |
| All chains | Use JS Bridge (window.bitkeep) or Adapter (Wagmi etc.)? |
Follow the patterns in the reference files. Key rules:
detection-and-setup.md or rely on the adapter's built-in detection.Standard error codes across all chains:
| Code | Meaning | Action |
|---|---|---|
| 4001 | User rejected request | Show retry prompt. Do NOT auto-retry. |
| 4100 | Unauthorized | Call connect() first. |
| 4200 | Unsupported method | Verify method name and chain compatibility. |
| 4900 | Disconnected | Reconnect the wallet. |
| 4901 | Chain disconnected | Switch to a connected chain. |
| -32000 | Invalid input | Check parameter format. |
| -32602 | Invalid params | Check parameter types and values. |
| -32603 | Internal error | Check RPC node status, retry with backoff. |
interface WalletError {
code: number;
message: string;
}
function handleWalletError(error: WalletError): void {
switch (error.code) {
case 4001:
console.log('User rejected the request. Please try again.');
break;
case 4100:
console.log('Unauthorized. Please connect your wallet first.');
break;
case -32603:
console.log('Internal error. Please check your network connection.');
break;
default:
console.error(`Wallet error ${error.code}: ${error.message}`);
}
}
| Chain | Provider | Compatible With |
|---|---|---|
| EVM | window.bitkeep.ethereum | MetaMask (window.ethereum) |
| Solana | window.bitkeep.solana | Phantom (window.solana) |
| Bitcoin | window.bitkeep.unisat | UniSat (window.unisat) |
| TON | window.bitkeep.ton | OpenMask (window.ton) |
| Aptos | window.bitkeep.aptos | Petra (window.aptos, window.petra) |
| Cosmos | window.bitkeep.keplr | Keplr (window.keplr) |
| Tron | window.bitkeep.tronWeb / .tronLink | TronLink |
| Sui | window.bitkeep.suiWallet | Wallet Standard |
// EVM — most common
const accounts: string[] = await window.bitkeep.ethereum.request({
method: 'eth_requestAccounts'
});
// Solana
await window.bitkeep.solana.connect();
const pubkey: string = window.bitkeep.solana.publicKey.toString();
// Bitcoin
const btcAccounts: string[] = await window.bitkeep.unisat.requestAccounts();
Name: Bitget Wallet
Namespace: window.bitkeep
Website: https://web3.bitget.com
Extension: https://chromewebstore.google.com/detail/jiidiaalihmmhddjgbnbgdfflelocpak
EIP-6963 RDNS: com.bitget.web3
Developer Docs: https://web3.bitget.com/en/docs/
Demo Repo: https://github.com/bitgetwallet/dapp-integration-demos
const provider = window.bitkeep?.ethereum;
if (!provider) {
window.open('https://web3.bitget.com/en/wallet-download');
}
For DApps needing 2-3 chains, use this pattern to connect all providers:
interface WalletConnections {
evm?: string;
solana?: string;
bitcoin?: string;
}
async function connectMultiChain(): Promise<WalletConnections> {
const connections: WalletConnections = {};
if (window.bitkeep?.ethereum) {
const [evmAddr] = await window.bitkeep.ethereum.request({
method: 'eth_requestAccounts'
});
connections.evm = evmAddr;
}
if (window.bitkeep?.solana) {
await window.bitkeep.solana.connect();
connections.solana = window.bitkeep.solana.publicKey.toString();
}
if (window.bitkeep?.unisat) {
const [btcAddr] = await window.bitkeep.unisat.requestAccounts();
connections.bitcoin = btcAddr;
}
return connections;
}
For React multi-chain DApps, use one Context per chain and compose them at the app level.
Import each chain's hook from the corresponding reference (e.g., useWallet from evm.md, useSolanaWallet from solana.md).
// src/providers/MultiChainProvider.tsx
import { createContext, useContext, ReactNode } from 'react';
import { useWallet } from '../hooks/useWallet'; // from evm.md
import { useSolanaWallet } from '../hooks/useSolanaWallet'; // from solana.md
import { useBitcoinWallet } from '../hooks/useBitcoinWallet'; // from bitcoin.md
interface MultiChainState {
evm: ReturnType<typeof useWallet>;
solana: ReturnType<typeof useSolanaWallet>;
bitcoin: ReturnType<typeof useBitcoinWallet>;
}
const MultiChainContext = createContext<MultiChainState | null>(null);
export function MultiChainProvider({ children }: { children: ReactNode }) {
const evm = useWallet();
const solana = useSolanaWallet();
const bitcoin = useBitcoinWallet();
return (
<MultiChainContext.Provider value={{ evm, solana, bitcoin }}>
{children}
</MultiChainContext.Provider>
);
}
export const useMultiChain = () => {
const ctx = useContext(MultiChainContext);
if (!ctx) throw new Error('Wrap with <MultiChainProvider>');
return ctx;
};
// src/components/Portfolio.tsx — aggregated view
import { useMultiChain } from '../providers/MultiChainProvider';
export function Portfolio() {
const { evm, solana, bitcoin } = useMultiChain();
const chains = [
{ name: 'Ethereum', address: evm.account, connected: evm.isConnected, connect: evm.connect, balance: evm.balance },
{ name: 'Solana', address: solana.publicKey, connected: solana.isConnected, connect: solana.connect },
{ name: 'Bitcoin', address: bitcoin.account, connected: bitcoin.isConnected, connect: bitcoin.connect, balance: bitcoin.balance },
];
return (
<div>
{chains.map((c) => (
<div key={c.name}>
<h3>{c.name}</h3>
{c.connected
? <p>{c.address} {c.balance && `— ${c.balance}`}</p>
: <button onClick={c.connect}>Connect {c.name}</button>}
</div>
))}
</div>
);
}
// src/App.tsx
import { MultiChainProvider } from './providers/MultiChainProvider';
import { Portfolio } from './components/Portfolio';
export default function App() {
return (
<MultiChainProvider>
<h1>Multi-Chain Portfolio</h1>
<Portfolio />
</MultiChainProvider>
);
}
User says: "Create a Next.js app that connects to Bitget Wallet on Ethereum"
Actions:
references/detection-and-setup.md and references/evm.mdeth_requestAccountsUser says: "Build a multi-chain DApp supporting ETH, SOL, and BTC"
Actions:
references/detection-and-setup.md, references/evm.md, references/solana.md, references/bitcoin.mdwindow.bitkeepUser says: "Add Bitget Wallet to my existing Wagmi project"
Actions:
references/adapters.mdinjected() connector in Wagmicom.bitget.web3)User says: "Build a Solana NFT minting page with Bitget Wallet"
Actions:
references/detection-and-setup.md and references/solana.mdwindow.bitkeep.solana.connect()signAndSendTransactionUser says: "Create a TON Mini App with wallet connection"
Actions:
references/telegram-miniapp.md and references/ton.mdUser says: "Send a Bitcoin transaction using Bitget Wallet"
Actions:
references/detection-and-setup.md and references/bitcoin.mdwindow.bitkeep.unisat.requestAccounts()sendBitcoin(toAddress, satoshis) or PSBT signingUser says: "Build a token-gated page for ERC-20 holders"
Actions:
references/detection-and-setup.md and references/evm.mdUser says: "Switch between Ethereum and BSC in my DApp"
Actions:
references/evm.mdwallet_switchEthereumChain with appropriate chainIdwallet_addEthereumChain if chain not yet addedchainChanged eventUser says: "Add Aptos Move contract interaction with wallet signing"
Actions:
references/detection-and-setup.md and references/aptos.mdwindow.bitkeep.aptos.connect()signAndSubmitTransactionUser says: "Create a Telegram Mini App with Bitget Wallet"
Actions:
references/telegram-miniapp.md