Sigma Auth
Key Backup

When you connect an EVM wallet (Ethereum, Base, etc.) to Sigma Auth, we derive a Bitcoin SV (BSV) address that you can use to receive funds. Understanding how to recover access to these funds is critical for maintaining full control over your assets.

Two Recovery Methods

The recovery process depends on your wallet type:

EOA Wallets (Externally Owned Accounts)

Wallets: MetaMask, Rabby, Rainbow Wallet, Ledger, Trezor, WalletConnect

Recovery Method: ✅ Direct Private Key Import

Your ETH private key directly controls your BSV address. This works because:

  1. Both ETH and BSV use the same elliptic curve (secp256k1)
  2. The same private key generates the same public key on both chains
  3. Only the address encoding differs between chains

How to recover:

# 1. Export your private key from MetaMask
# Settings → Security & Privacy → Reveal Private Key

# 2. Import into ANY BSV wallet
# ElectrumSV, HandCash, Money Button, etc.

# 3. Your BSV funds are now accessible
# The wallet will derive the same BSV address

Security Implication: This is user sovereignty - you own your private key and can access your BSV funds using any BSV wallet, completely independent of Sigma Auth.

Example Derivation:

  • ETH Address: 0xa640f4840e7002ba3c8c2677da6986a3a55db7b4
  • BSV Address: 195VnjXUbJ953Hcrkfc9boF5aDbQMrM4cF
  • Same private key controls both!

Smart Contract Wallets

Wallets: Coinbase Smart Wallet, Base Account, Safe, Argent

Recovery Method: ⚠️ BAP Backup + Smart Contract Address

Smart contract wallets cannot export private keys because they don't have traditional keypairs. Instead, we use deterministic derivation:

Derivation Formula:

BSV Private Key = SHA256(bapId:chainId:smartContractAddress)

How to recover:

  1. You need your BAP identity backup (contains your BAP ID)
  2. You need your smart contract wallet address (e.g., Coinbase Smart Wallet address)
  3. You need the chain ID where the wallet exists (e.g., 1 for Ethereum, 8453 for Base)
// Recovery process (pseudocode)
import { decryptBackup } from 'bitcoin-backup';
import { createHash } from 'crypto';
import { PrivateKey } from '@bsv/sdk';

// 1. Decrypt your BAP backup
const backup = await decryptBackup(encryptedBackup, password);
const bapId = backup.ids[0].idKey; // Your BAP identity key

// 2. Reconstruct derivation input
const chainId = 8453; // Base network
const smartContractAddress = '0x...'; // Your Coinbase Smart Wallet address
const derivationInput = `${bapId}:${chainId}:${smartContractAddress.toLowerCase()}`;

// 3. Derive BSV private key
const hash = createHash('sha256').update(derivationInput).digest('hex');
const bsvPrivateKey = PrivateKey.fromString(hash);

// 4. Import into BSV wallet
const wif = bsvPrivateKey.toWif();
// Import this WIF into any BSV wallet

Security Implication: This is less sovereign than EOA wallets because you need:

  • Your BAP backup (which you control)
  • Knowledge of your smart contract address (public information)
  • This recovery process (documented here)

Without these three pieces, the funds cannot be recovered.

Technical Details

Why Different Methods?

EOA Wallets:

  • Have extractable private keys → direct key reuse works
  • User can export from MetaMask and import to BSV wallet
  • Maximum user sovereignty and recoverability

Smart Contract Wallets:

  • Have NO private keys to export → must use deterministic derivation
  • The smart contract controls the wallet, not a private key
  • We create a recoverable BSV address using user-controlled inputs (BAP ID)

Address Derivation Process

EOA (MetaMask, etc.):

// 1. User signs message with ETH wallet
const message = "sigma-auth-connect:1:0xa640f4840e7002ba3c8c2677da6986a3a55db7b4";
const signature = await signer.signMessage(message);

// 2. Recover uncompressed ETH public key (65 bytes)
const ethPubkey = recoverPublicKey(message, signature);
// Example: 0x042f472d6c7063546f4deed237666feaa593c44d26...

// 3. Convert to BSV compressed format (33 bytes)
const bsvPubkey = PublicKey.fromString(ethPubkey, "hex");
// Automatically compresses: 02 or 03 prefix + 32 bytes X coordinate

// 4. Derive BSV address
const bsvAddress = bsvPubkey.toAddress().toString();
// Example: 195VnjXUbJ953Hcrkfc9boF5aDbQMrM4cF

Smart Contract (Coinbase Smart Wallet, etc.):

// 1. Get user's BAP ID from authenticated session
const session = await authClient.getSession();
const bapId = session.data.user.id;

// 2. Construct derivation input
const chainId = wallet.chainId; // e.g., 8453 for Base
const derivationInput = `${bapId}:${chainId}:${wallet.address.toLowerCase()}`;
// Example: "Go8vCHAa4S6AhXKTABGpANiz35J:8453:0x1234..."

// 3. Hash to create deterministic private key
const hash = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(derivationInput));
const hashHex = Array.from(new Uint8Array(hash))
  .map(b => b.toString(16).padStart(2, "0"))
  .join("");

// 4. Derive BSV private key and address
const bsvPrivateKey = PrivateKey.fromString(hashHex);
const bsvAddress = bsvPrivateKey.toPublicKey().toAddress().toString();

Best Practices

For EOA Wallet Users

Export and backup your ETH private key securely

  • You can recover BSV funds with just this key
  • Store in a password manager or hardware backup

Test recovery before sending large amounts

  • Export key from MetaMask
  • Import into a BSV testnet wallet
  • Verify you can access the same address

Understand the risk of key compromise

  • If someone gets your ETH key, they get your BSV too
  • Both chains use the same private key

For Smart Contract Wallet Users

Backup your BAP identity with strong password

  • You cannot recover without this backup
  • Store password in password manager

Document your wallet addresses

  • Record your Coinbase Smart Wallet address
  • Record the chain ID it's on
  • You need both for recovery

Test recovery process with small amounts first

  • Try the recovery process with testnet
  • Verify the derivation works before trusting it

⚠️ Understand the limitation

  • If you lose your BAP backup, BSV funds are unrecoverable
  • No customer support can help (client-side encryption)

Comparison Table

FeatureEOA WalletsSmart Contract Wallets
ExamplesMetaMask, Ledger, TrezorCoinbase Smart Wallet, Safe, Argent
Private Key Export✅ Yes❌ No
Recovery MethodExport ETH key → Import to BSV walletBAP backup + wallet address + derivation
Recovery Difficulty⭐ Easy⭐⭐⭐ Medium
User Sovereignty✅ Full (own the key)⚠️ Partial (need BAP backup)
Sigma Auth Dependency❌ None (after derivation)⚠️ Need recovery documentation
Recommended ForMaximum controlConvenience (no key management)

Frequently Asked Questions

Can I use my MetaMask seed phrase to recover BSV?

Yes! Your MetaMask seed phrase (12 or 24 words) can be used to recover the private key, which controls both your ETH and BSV addresses. Use a BIP39 tool to convert the seed phrase to a private key, then import to a BSV wallet.

What happens if Sigma Auth goes offline?

  • EOA wallets: No problem - you own the private key
  • Smart contract wallets: You need this documentation to derive the BSV key, but you can do it yourself with the code examples above

Can I use a different derivation method for smart contract wallets?

No - the derivation is deterministic based on your BAP ID and wallet address. Changing the method would create a different address and you'd lose access to existing funds.

Why not use the same method for both wallet types?

Because EOA wallets have extractable private keys that provide maximum user sovereignty. We only use SHA256 derivation when there's no other option (smart contract wallets).