Checkmate-Escrow supports Freighter and Albedo for transaction signing. No private keys are ever stored or transmitted — all signing happens inside the wallet extension or popup.
| Wallet | Type | Install |
|---|---|---|
| Freighter | Browser extension | freighter.app |
| Albedo | Web popup | No install needed |
Manages connection state for either wallet.
import { useWallet } from './hooks/useWallet';
const { connected, publicKey, type, error, connect, disconnect } = useWallet();
// Connect
await connect('freighter'); // or 'albedo'
// Disconnect
disconnect();State resets cleanly on disconnect; switching wallets does not require a page reload — just call connect with the new wallet type.
Fetches the account's native XLM balance from Horizon and refreshes every 10 seconds.
import { useBalance } from './hooks/useBalance';
const { balance, loading, error } = useBalance(publicKey);Configure the Horizon endpoint via VITE_HORIZON_URL (defaults to testnet).
Signs a transaction XDR using the active wallet.
import { useTransaction } from './hooks/useTransaction';
const { sign, signing, error } = useTransaction(walletType);
const signedXdr = await sign(xdr);Returns null on cancellation or error; error is set with the message.
Renders connect buttons when disconnected; shows a truncated public key and a disconnect button when connected.
import { WalletConnector } from './components/wallet';
const wallet = useWallet();
<WalletConnector wallet={wallet} />Shows the live XLM balance for the connected account. Renders nothing when publicKey is null.
<BalanceDisplay publicKey={wallet.publicKey} />Button that triggers signing and calls onSigned(signedXdr) on success. Disabled until a wallet is connected.
<TransactionSigner
walletType={wallet.type}
xdr={unsignedXdr}
onSigned={(signed) => submitToStellar(signed)}
/>Wraps wallet UI to catch unexpected render errors.
import { WalletErrorBoundary } from './components/wallet/WalletErrorBoundary';
<WalletErrorBoundary>
<WalletConnector wallet={wallet} />
</WalletErrorBoundary>| Variable | Default | Description |
|---|---|---|
VITE_STELLAR_NETWORK |
testnet |
testnet or mainnet |
VITE_HORIZON_URL |
https://horizon-testnet.stellar.org |
Horizon server URL |
- Private keys are never accessed, stored, or transmitted by the frontend.
- All signing is delegated to the wallet (Freighter extension or Albedo popup).
- XDR is passed to the wallet as-is; the wallet shows the user what they are signing.