Skip to Content

Connect Wallets

The Lombard SDK supports multiple blockchain wallet types. Configure providers for each chain your application needs.


EVM Wallets

Any wallet implementing the EIP-1193 interface works with the SDK:

const config = createConfig({ env: Env.testnet, providers: { evm: () => window.ethereum, }, });

With Wagmi

import { getWalletClient } from '@wagmi/core'; const config = createConfig({ env: Env.testnet, providers: { evm: async () => { const walletClient = await getWalletClient(); return walletClient; }, }, });

Bitcoin Wallets

Currently supports OKX Wallet for Bitcoin operations:

const config = createConfig({ env: Env.testnet, providers: { bitcoin: () => window.okxwallet?.bitcoin, }, });

The BtcProvider interface requires three methods:

  • getAccounts() — retrieves wallet accounts
  • signMessage(message, type) — signs messages with ECDSA or BIP322 format
  • signPsbt(psbtHex, options) — signs PSBTs (Partially Signed Bitcoin Transactions)

Solana Wallets

const config = createConfig({ env: Env.testnet, providers: { solana: () => window.solana, }, });

The Solana provider must expose a publicKey and support message and transaction signing capabilities.


Sui Wallets

const config = createConfig({ env: Env.testnet, providers: { sui: () => window.suiWallet, }, });

Starknet Wallets

const config = createConfig({ env: Env.testnet, providers: { starknet: () => window.starknet, }, });

Async Provider Initialization

Providers support asynchronous initialization, allowing wallets to complete connection before returning:

const config = createConfig({ env: Env.testnet, providers: { evm: async () => { await window.ethereum.request({ method: 'eth_requestAccounts' }); return window.ethereum; }, }, });

Multiple Providers

Configure all providers your application needs in a single config:

const config = createConfig({ env: Env.testnet, providers: { evm: () => window.ethereum, bitcoin: () => window.okxwallet?.bitcoin, solana: () => window.solana, sui: () => window.suiWallet, starknet: () => window.starknet, }, });
Last updated on