| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
VUE_APP_HASURA_PASS=secretkey VUE_APP_HASURA_SCHEMA=ws://GRAPHQL_IP:8080/v1/graphql
- docker exec -it bitcoindwrapper_postgres_1 bash
- wget https://raw.githubusercontent.com/aitorjs/bitcoind-wrapper/master/docker/dbexport.pgsql
- psql -U postgres postgres < dbexport.pgsql# Use the regtest network, because we can generate blocks as needed. regtest=1 server=1 rpcuser=paco rpcpassword=paco zmqpubhashblock=tcp://0.0.0.0:3000 zmqpubrawblock=tcp://0.0.0.0:3001 # zmqpubrawtx=tcp://0.0.0.0:3002 # zmqpubhashtx=tcp://0.0.0.0:3003 # blocknotify=/usr/bin/curl -X GET bitcoindwrapper:3000/bitcoin/newblock/%s -H "accept: application/json" -H "Authorization: Bearer YOUR-TOKEN" [regtest] # ATTENTION: VERY DANGEROUS OUTSIDE THE DOCKER NETWORK rpcbind=0.0.0.0:18443 rpcallowip=0.0.0.0/0
testnet=1 server=1 rpcuser=paco rpcpassword=paco txindex=1 # In this example we are only interested in receiving raw transactions. # The address here is the URL where bitcoind will listen for new ZeroMQ connection requests. zmqpubhashblock=tcp://0.0.0.0:3000 zmqpubrawblock=tcp://0.0.0.0:3001 # zmqpubrawtx=tcp://0.0.0.0:3002 # zmqpubhashtx=tcp://0.0.0.0:3003 # blocknotify=/usr/bin/curl -X GET bitcoindwrapper:3000/bitcoin/newblock/%s -H "accept: application/json" -H "Authorization: Bearer YOUR-TOKEN" [test] # ATTENTION: VERY DANGEROUS OUTSIDE THE DOCKER NETWORK rpcbind=0.0.0.0:18332 rpcallowip=0.0.0.0/0
| Mainnet | Testnet | Regtest
Network | 8333 | 18333 | 18444 RPC | 8332 | 18332 | 18443
- sudo apt-get install git docker.io docker-compose - sudo usermod -aG docker $USER - reload pc
paco:paco
curl 'http://VUE_IP:9000/' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: http://localhost:9000' --data-binary '{"query":"query {\n getblockcount {\n height\n }\n}"}' --compressed
curl -X POST http://VUE_IP:8080/v1/graphql -H 'x-hasura-admin-secret: secretkey' -H 'Content-Type: application/json' -d '{"query":"query{\n getblockcount {\n height\n }\n}"}'
curl --user paco --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://bitcoind:18443
query MyQuery { getblock(hash: "5dee5822368296e72c64bd1ba57bc6d038aecff38b0905416dfb544c3c2d2105") { bits tx { hash hex locktime size txid version vsize weight vin { coinbase sequence } vout { n scriptPubKey { addresses asm hex type reqSigs } value } } height } }
pg_dump -U postgres postgres > dbexport.pgsql
postgrespassword
docker exec -t bitcoindwrapper_postgres_1 psql -U postgres postgres < /var/lib/postgresql/data/dbexport.pgsql
posgreql volume data is stored inside docker in /var/lib/docker/volumes/bitcoindwrapper_db_data/_data
| Back | FazBrowse Home | New Git URL |