Commit Graph

151 Commits (0ae8ba57a2d763c21c017eb17f0ef62d32e25c0f)

Author SHA1 Message Date
Jin Eguchi 077e637093
add bitcoin-signet (#533) 2020-12-29 00:47:50 +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 be393c6d5d Update dependency of btcutil library 2019-08-04 12:54:54 +02:00
Martin Boehm 39f2c73f3e Add coinbase flag (boolean) to UTXO response #236 2019-07-23 12:52:18 +02:00
Martin Boehm 917840d6b2 Stop indexing OP_RETURN scripts 2019-05-27 12:24:24 +02:00
Martin Boehm 228d40e7a5 Compare whatTheFee estimates to default 2019-05-27 12:24:24 +02:00
Martin Boehm 55e39f0ea4 Implement alternative estimateFee using whatthefee.io WIP #153 2019-05-27 12:24:24 +02:00
Martin Boehm 9642e306ac Merge branch 'mempool' 2019-04-15 12:27:24 +02:00
Martin Boehm 3ef9426229 Change OMNI simple send text 2019-04-15 12:15:03 +02:00
Martin Boehm 4435dbbfb4 Pass correct blockchain object to mempool 2019-04-03 22:08:32 +02:00
Martin Boehm c19f6bfb42 Fix tryParseOmni 2019-04-03 14:09:27 +02:00
Martin Boehm 4bc196f599 Fix tryParseOmni 2019-04-03 12:51:51 +02:00
Martin Boehm f2dc4a56d8 Store time of mempool transaction 2019-04-01 17:00:53 +02:00
Yura Pakhuchiy 827cbcd1d8 Support Groestlcoin xpub 2019-04-01 17:00:53 +02:00
Yura Pakhuchiy 1c290db225 Support Groestlcoin xpub 2019-04-01 12:49:18 +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 283a039290 Resolve formatting issues 2019-03-21 21:05:14 +01:00
Matej Čamaj c0cebd4ce6 Implement Omni parser for Bitcoin 2019-03-21 20:46:25 +01:00
Martin Boehm 6ac14f163a Add TODO for omni parsing 2019-03-21 11:13:42 +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
Martin Boehm b670b4fede Add address derivation tests and benchmarks 2019-01-30 16:29:34 +01:00
Martin Boehm 27dba68319 Add DeriveAddressDescriptors for list of indexes 2019-01-29 12:11:35 +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 f579b97502 Convert P2PK script to P2PKH so that it is indexed together #73 2018-10-12 11:53:03 +02:00
Martin Boehm eb5781f218 Use AddressDescriptor as key in socket.io subscribtions to addresstxid 2018-10-06 19:27:54 +02:00
Martin Boehm 8e057e9e7b Fix incorrect logging formatting directives 2018-10-04 09:19:41 +02:00
Jakub Matys 964ab87abc Supported types of scripts are tested explicitly 2018-10-03 13:18:13 +02:00
Jakub Matys 3f843889ee Disables EstimateFee for Bitcoin and Myriad 2018-10-03 12:29:44 +02:00
Jakub Matys 8c7f383e9a Explicit registration of network parameters + cleanup in tests 2018-10-02 17:02:57 +02:00
Jakub Matys f9e5092f82 Merge branch 'v0.0.7' into integration-tests-upgrade 2018-10-01 12:47:42 +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