Bitcoin scripting

One can install the following development tools for programming Bitcoin operations:

  • NodeJS: This is an open source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a browser. It allows a programmer to write and execute scripts quickly and easily. These scripts can be written to be run in a web browser or on a server.
  • BitcoinJS: This is a JavaScript library for working with Bitcoin and its cryptographic functions. BitcoinJS can be used to generate public/private keys and addresses.
  • Blockchain.info: This is a public API that can be used to query the blockchain to find out balances and broadcast transactions to the network. It can be used to implement a Bitcoin node and install and run a Bitcoin node.

After installing the preceding tools, one can execute the following operations:

  • Generate a new private key and compute a public key
  • Check the balance for a certain address
  • Generate addresses
  • Construct a new transaction
  • Send a transaction, which involves three steps:
    • Build a transaction with a list of inputs and outputs
    • Sign the transaction with the required private keys
    • Broadcast the transaction to the network
  • Build an escrow account
  • Broadcasts the transaction

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset