Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/farukterzioglu/paywithbitcoin

A sample for Bitcoin UTXO model
https://github.com/farukterzioglu/paywithbitcoin

bitcoin bitcoin-wallet blockchain utxo

Last synced: 8 days ago
JSON representation

A sample for Bitcoin UTXO model

Awesome Lists containing this project

README

        

```
docker run --name bitcoind -d --volume /Users/[USER_NAME]/bitcoin_data:/root/.bitcoin -p 127.0.0.1:443:18443 farukter/bitcoind:regtest
docker exec -it bitcoind bash

ADD=$(bitcoin-cli getnewaddress)
bitcoin-cli generatetoaddress 101 $ADD
bitcoin-cli getwalletinfo
bitcoin-cli listunspent

// Run the unit test, note the txId

bitcoin-cli getrawtransaction [TXID]
// Check inputs and outputs

bitcoin-cli generate 1
// Note blockhash = [BLOCKHASH]

bitcoin-cli getblock [BLOCKHASH]
// Note tx hashes => [TXHASH]

bitcoin-cli getrawtransaction [TXHASH] 1
```