diadata/internal/pkg/blockchain-scrapers/blockchains
. Each scrapper should comply with the following folder structure currencyName/scrappers/currencySymbol/currencySymbol.go
for example for bitcoin will look like bitcoin/scrapers/btc/btc.go
. You must provide a Dockerfile for your blockchain client and for the Go wrapper that connects to our database. An example dockerfile is provided for the Go bindings with a bitcoind
client scraping the Bitcoin blockchain. The file should be named build/Dockerfile-symbol
for this example build/Dockerfile-btc
diadata/internal/pkg/blockchain-scrapers/blockchains/bitcoin/scrapers/btc
is built and installed and the finished binary is placed into a mininal distroless container. From there it is executed using the statement in the last line.docker-compose.bitcoin.yml
. Ideally, all blockchain clients are run from there directlyscrapers-network
virtual network. Your credentials for the DIA API should be handled by the secrets
directive in the section of your blockchain client. To initialize the API from Go you can createSendSupply
in the ApiClient.go
file.docker-compose up
you can test the entire system with your cryptocurrency VM and your Go wrapper in a virtual network.