Account Management
connectAccount
Connect account for signing transactions. Accepts either a private key or wallet provider (EIP-1193). Automatically performs SIWE authentication.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
connectAccount(account: string | any, chainId?: SupportedChainId): Promise<Address>
| Parameter | Type | Required | Description | |
|---|---|---|---|---|
account | string | any | ✅ | Private key string or wallet provider object |
chainId | SupportedChainId | ❌ | Target chain ID (default: 8453 - Base) |
type Address = `0x${string}`;
// With private key
const address = await sdk.connectAccount('0x...');
// With wallet provider (e.g., from wagmi, web3-react)
const provider = await connector.getProvider();
const address = await sdk.connectAccount(provider, 8453);