Skip to main content

Overview

This guide shows you how to import existing Bitcoin private keys into Dynamic’s MPC wallet system. This is useful when migrating from traditional Bitcoin wallets or integrating with existing systems.

Prerequisites

WIF Format

Bitcoin private keys are imported in WIF (Wallet Import Format). WIF is a base58-encoded format that includes:
  • Network identifier (mainnet or testnet)
  • The 32-byte private key
  • Compression flag
  • Checksum
Example WIF formats:
  • Mainnet compressed: L... or K... (52 characters)
  • Testnet compressed: c... (52 characters)

Supported Address Types

When importing a private key, you must specify the address type. Currently supported:
  • Native SegWit (P2WPKH): BitcoinAddressType.NATIVE_SEGWIT
  • Taproot (P2TR): BitcoinAddressType.TAPROOT

Import Your Bitcoin Private Key

Import with Different Address Types

Native SegWit

Taproot

Export Private Key

You can export an imported wallet’s private key back to WIF format:

Offline Export

If you need to export the private key from existing key shares without a network call, use offlineExportPrivateKey():

Error Handling

Security Considerations

  • Private Key Format: Ensure your private key is in valid WIF format
  • Password Security: Use a strong, unique password
  • Key Storage: Never store private keys in plain text after import
  • Backup: Ensure you have a secure backup of your original private key
  • Key Share Backup: Use backUpToDynamic: true for secure key share storage

Threshold Signature Schemes

Choose based on your security and availability needs:
  • TWO_OF_TWO: Maximum security, requires both server and Dynamic
  • TWO_OF_THREE: Balanced security and availability

Next Steps

Last modified on July 22, 2026