Installation
Magic interacts with the Bitcoin blockchain via Magic’s extension NPM package@magic-ext/bitcoin
. The Bitcoin extension also lets you interact with the blockchain using methods from Bitcoinjs-lib.
Initialization
JavaScript
Common Methods
Sign Transaction
To send a standard Bitcoin blockchain transaction, you can call themagic.bitcoin.signTransaction
method to get the signature and raw transaction then send to blockchain by yourself.
JavaScript