🧙 Magical Bitcoin 🧙

Alekos Filini - @afilini

Project Goals

  • Develop a set of tools and libraries for on-chain wallets
  • Concentrate the effort of multiple people/companies
  • Generalized, modular and extensible at its core
  • Very, very ambitious: become the "standard" platform to build wallets

The Adoption Gap

  • Many powerful scripting primitives are practically unused
  • Even Bitcoin Core struggles with them
  • Writing scripts manually is hard and dangerous
  • Magical tries to fill this gap

Generalized Primitives

  • Generalized wallet definitions
    • Descriptors
  • Multiparty signing of a transaction
    • PSBT

Descriptors and Miniscript

  • Formal way of "describing" how to construct a script
  • Encodes the script type, structure, keys and derivation paths
  • Normally generated by a Miniscript compiler
    • Turns a high-level "spending policy" into a descriptor

PSBT

  • Standardized encoding of transaction and partial signatures
  • Contains metadata about keys derivation, inputs, change output, etc
  • Starting to see adoption in many wallets

magical-bitcoin-wallet

  • Main repository of the project
  • Fully-working wallet library based on Descriptors and PSBT
    • Generate addresses
    • Monitor the blockchain (Electrum or Esplora)
    • Create a transaction
    • Sign a transaction
  • Very minimalistic command line
  • Can run in a browser (WASM)

Demo

Magical Bitcoin

By Alekos Filini

Magical Bitcoin

  • 491