Commit Graph

86 Commits

Author SHA1 Message Date
Martin Boehm
c8c7e08a18 Golomb filter of scriptPubKeys for mempool txs 2023-05-11 15:36:03 +02:00
Martin Boehm
8bdc3da694 Return address aliases from API 2023-02-01 17:58:37 +01:00
Martin Boehm
b9e3cf8c9b Litecoin: Fix tx parsing related changes in backend 0.21.2, #770 2022-05-22 12:05:39 +02:00
Martin Boehm
a282cde045 Fix format 2022-03-06 21:27:52 +01:00
Martin Boehm
93ea126123 Add get raw block API request #736 2022-03-04 17:26:13 +01:00
Martin Boehm
ba75e60950 Handle Bitcoin taproot addresses 2021-11-10 00:32:11 +01:00
Martin Boehm
0a3ea6e225 Send websocket notification on new tx for input addresses 2020-05-24 17:58:29 +02:00
Martin Boehm
ee3217aba8 Use common.JSONNumber instead of json.Number 2020-05-10 00:14:14 +02:00
David Hill
13527bda06 build: go module support 2020-03-05 11:54:42 -05:00
Vladyslav Burzakovskyy
f6111af5da Add fiat rates functionality (#316)
* Add initial commit for fiat rates functionality

* templates.go: use bash from current user's environment

* bitcoinrpc.go: add FiatRates and FiatRatesParams to config

* blockbook.go: add initFiatRatesDownloader kickoff

* bitcoin.json: add coingecko API URL

* rockdb.go: add FindTicker and StoreTicker functions

* rocksdb_test.go: add a simple test for storing and getting FiatRate tickers

* rocksdb: add FindLastTicker and convertDate, make FindTicker return strings

* rocksdb: add ConvertDate function and CoinGeckoTicker struct, update tests

* blockbook.go, fiat: finalize the CoinGecko downloader

* coingecko.go: do not stop syncing when encountered an error

* rocksdb_test: fix the exported function name

* worker.go: make getBlockInfoFromBlockID a public function

* public.go: apiTickers kickoff

* rocksdb_test: fix the unittest comment

* coingecko.go: update comments

* blockbook.go, fiat: reword CoinGecko -> FiatRates, fix binary search upper bound, remove assignment of goroutine call result

* rename coingecko -> fiat_rates

* fiat_rates: export only the necessary methods

* blockbook.go: update log message

* bitcoinrpc.go: remove fiatRates settings

* use CurrencyRatesTicker structure everywhere, fix time format string, update tests, use UTC time

* add /api/v2/tickers tests, store rates as strings (json.Number)

* fiat_rates: add more tests, metrics and tickers-list endpoint, make the "currency" parameter mandatory

* public, worker: move FiatRates API logic to worker.go

* fiat_rates: add a future date test, fix comments, add more checks, store time as a pointer

* rocksdb_test: remove unneeded code

* fiat_rates: add a "ping" call to check server availability

* fiat_rates: do not return empty ticker, return nil instead if not found

add a test for non-existent ticker

* rocksdb_test: remove Sleep from tests

* worker.go: do not propagate all API errors to the client

* move InitTestFiatRates from rocksdb.go to public_test.go

* public.go: fix FiatRatesFindLastTicker result check

* fiat_rates: mock API server responses

* remove commented-out code

* fiat_rates: add comment explaining what periodSeconds attribute is used for

* websocket.go: implement fiatRates websocket endpoints & add tests

* fiatRates: add getFiatRatesTickersList websocket endpoint & test

* fiatRates: make websocket getFiatRatesByDate accept an array of dates, add more tests

* fiatRates: remove getFiatRatesForBlockID from websocket endpoints

* fiatRates: remove "if test", use custom startTime instead

Update tests and mock data

* fiatRates: finalize websocket functionality

add "date" parameter to TickerList

return data timestamps where needed

fix sync bugs (nil timestamp, duplicate save)

* fiatRates: add FiatRates configs for different coins

* worker.go: make GetBlockInfoFromBlockID private again

* fiatRates: wait & retry on errors, remove Ping function

* websocket.go: remove incorrect comment

* fiatRates: move coingecko-related code to a separate file, use interface

* fiatRates: if the new rates are the same as previous, try five more times, and only then store them

* coingecko: fix getting actual rates, add a timestamp parameter to get uncached responses

* vertcoin_testnet.json: remove fiat rates parameters

* fiat_rates: add timestamp to log message about skipping the repeating rates
2019-12-17 10:40:02 +01:00
Martin Boehm
39f2c73f3e Add coinbase flag (boolean) to UTXO response #236 2019-07-23 12:52:18 +02:00
Martin Boehm
55e39f0ea4 Implement alternative estimateFee using whatthefee.io WIP #153 2019-05-27 12:24:24 +02:00
Martin Boehm
4435dbbfb4 Pass correct blockchain object to mempool 2019-04-03 22:08:32 +02:00
Martin Boehm
f2dc4a56d8 Store time of mempool transaction 2019-04-01 17:00:53 +02:00
Martin Boehm
c813f76336 Try to load mempool inputs from db to speed up mempool sync 2019-03-29 17:01:20 +01:00
Martin Boehm
ce3c7c5e66 Extract mempool interface from blockchain 2019-03-25 16:43:57 +01:00
Martin Boehm
dda96b4a8f Merge branch 'xpub' 2019-03-01 11:12:40 +01:00
Martin Boehm
64c8ae9a62 Estimate full derivation path from xpub 2019-02-05 20:47:54 +01:00
Jeremiah Buddenhagen
87624f44ca Convert JsonValue to ValueSat when "parse": false 2019-01-28 16:39:54 -08:00
Martin Boehm
986275bb76 Implement parser.DeriveAddressDescriptors from xpub 2019-01-28 18:29:12 +01:00
Martin Boehm
499d65460f Fix coding style and formatting issues 2019-01-24 15:24:56 +01:00
Putta Khunchalee
8e82b3da0f Added Zcoin support (#106)
* Add zcoin configuration

* Update ports registry

* Change verification_type to gpg-sha256

* Fix incorrect zcoin configurations

* Change backend verification type to sha256 due to no public key for gpg-sha256

* Initializes Zcoin factory

* Add zcoin parser

* Finish BlockChain implementation for XZC

* Implement EstimateFee for XZC

* Add RPC integration tests for XZC

* Add unittest for parser && fix wrong network params

* Fix incorrect RPC marshaler for XZC

* Add sync integration test for zcoin

* Add zcoin block parser

* Add more testdata for sync integration test

* Remove EstimateSmartFee test for XZC due to it not supported

* Refactor and cleanup XZC parser

* Fix zerocoin spend vin error

* Fix display zerocoin mint and spend

* Support script parser for spend

* Fix build errors and bugs after rebase
2019-01-17 20:31:15 +01:00
Martin Boehm
3ca593aff1 Handle error tx not found #94 2019-01-10 16:39:36 +01:00
Martin Boehm
97e0844a4b Update references to forked btcd, btcutil and bchutil libraries 2019-01-04 14:05:51 +01:00
Martin Boehm
ab077d882c Update references to forked btcd, btcutil and bchutil libraries 2019-01-04 13:47:28 +01:00
Martin Boehm
9a04c862d6 Filter address transactions by input/output or token 2018-12-04 11:54:15 +01:00
Martin Boehm
8ac57a3d56 Add ERC20 transfer information to ethereum transactions 2018-11-28 14:27:02 +01:00
Martin Boehm
6072aa5e9e Handle coin specific tx data more efficiently 2018-11-15 16:18:29 +01:00
Martin Boehm
4448c57ba8 Introduce BitcoinType and EthereumType distinction of blockchains 2018-11-15 16:16:01 +01:00
Martin Boehm
28b3a4d1b4 Implement ETH GetChainInfo 2018-11-15 16:16:01 +01:00
Martin Boehm
8140af1a69 Show coin specific transaction data in explorer and api 2018-10-16 12:25:31 +02:00
Martin Boehm
8e057e9e7b Fix incorrect logging formatting directives 2018-10-04 09:19:41 +02:00
Jakub Matys
3f843889ee Disables EstimateFee for Bitcoin and Myriad 2018-10-03 12:29:44 +02:00
Martin Boehm
7290f8bbcd Make GetBlockInfo and GetChainInfo more coin independent 2018-09-18 10:58:47 +02:00
Martin Boehm
d87d52b2fd Add view of block to explorer 2018-09-17 18:28:08 +02:00
Martin Boehm
635733574c Add bchain method GetChainInfo with extended information about backend 2018-09-14 14:48:43 +02:00
Martin Boehm
503ff4389a Merge branch 'master' into v0.0.7 2018-09-11 13:44:36 +02:00
Martin Boehm
8bdf4b0ae3 Prepare notification of block height in OnNewBlock 2018-09-11 13:37:12 +02:00
Martin Boehm
6dcf3fd45d Send the side of address (input/output) for a new tx notification 2018-09-11 13:19:56 +02:00
Martin Boehm
676aabfaa6 Make AddressDescriptor as type,expose DB/mempool methods working with it 2018-08-30 22:43:37 +02:00
Martin Boehm
95f831eefa Merge branch 'master' 2018-07-31 16:06:51 +02:00
Jakub Matys
f3d727f16e Changes from master 2018-07-31 10:46:15 +02:00
Jakub Matys
7f52de3b65 Upgraded BlockChain configuration 2018-07-26 16:50:06 +02:00
Martin Boehm
882ff1bfd5 Fix integration tests after switch to big.Int amounts 2018-07-25 15:56:08 +02:00
Martin Boehm
b464f282a9 Use big.Int for all amounts 2018-07-24 15:58:37 +02:00
Martin Boehm
6945d1d7f3 Add dogecoin blockbook implementation 2018-06-14 23:12:19 +02:00
Martin Boehm
e7e73947bd Handle invalid json returned from backend 2018-06-13 11:58:25 +02:00
Jakub Matys
6ee4291f11 Refactored marshalling of Bitcoin based RPCs 2018-06-09 14:37:05 +02:00
Martin Boehm
31dc1d9c00 Merge branch 'master' into internal-state 2018-06-08 11:50:35 +02:00
Martin Boehm
eb716d69ed Take coin name from rpc config json 2018-06-05 16:21:54 +02:00