Martin Boehm
89b1e75641
Add public server unit tests for ethereum type coins
2023-02-01 17:58:37 +01:00
Martin Boehm
fad284a425
Fix isOwn flag for mempool transactions
2022-03-07 09:56:02 +01:00
Martin Boehm
9b8b10b6e0
Add isOwn flag to inputs and outputs in get utxo
2022-03-06 21:25:19 +01:00
Martin Boehm
93ea126123
Add get raw block API request #736
2022-03-04 17:26:13 +01:00
Martin Boehm
ad18eda804
Fix utxo rest API endpoint
2022-03-03 12:09:04 +01:00
Martin Boehm
0c82bbdcbe
Add multi-tickers endpoint
2021-12-14 16:25:26 +01:00
Martin Boehm
e143215288
Fix linting issues
2021-11-28 21:27:16 +01:00
Martin Boehm
e500d6873d
Parse xpub descriptors
2021-11-10 00:32:11 +01:00
Martin Boehm
c4128e5c9c
Handle taproot xpub descriptors
2021-11-10 00:32:11 +01:00
Martin Boehm
f5ae7c540c
Optimize websocket subscribe and unsubscribe addresses
2021-05-21 00:24:57 +02:00
Martin Boehm
8fd8e17929
Add websocket subscription metrics
2021-05-21 00:24:57 +02:00
Martin Boehm
1482b51503
Get real IP of webscoket connection
2021-05-21 00:24:57 +02:00
Martin Boehm
af0711dc12
Cache estimateFee call for bitcoin type coin
2021-05-21 00:24:57 +02:00
Martin Boehm
1d55a66fab
Improve xpub cache
2021-05-21 00:24:57 +02:00
Martin Boehm
c8a8bcdc1b
Move OnNeBlock and OnNewTxAddr to goroutine
2021-05-21 00:24:57 +02:00
Martin Boehm
9a0851b7a1
Add prometheus metrics
2021-05-21 00:24:57 +02:00
kaladin
1f6cddd4ab
Websocket new transaction ( #574 )
2021-03-21 21:55:25 +01:00
Martin Boehm
7e54336e0c
Return info about backend in websocket getInfo request
2021-01-21 10:31:04 +01:00
Martin Boehm
7dffe2e0f9
Show consensus in explorer index page
2021-01-21 10:31:04 +01:00
Martin Boehm
da1c0d762e
Unify error handling of GetTransactionSpecific #395
2020-12-04 11:57:11 +01:00
Martin Boehm
24a783be50
Move websocket connection close out of channel close mutex
2020-12-04 11:57:11 +01:00
Martin Boehm
3d9954bf79
Improve locking and add panic handlers to websocket functionality
2020-11-12 15:31:59 +01:00
Martin Boehm
0a3ea6e225
Send websocket notification on new tx for input addresses
2020-05-24 17:58:29 +02:00
Martin Boehm
bc001ce3a3
Make logs cleaner by not logging public API errors in websocket
2020-05-22 11:19:37 +02:00
Martin Boehm
76324be8ec
Modify logging
2020-05-21 22:43:18 +02:00
Martin Boehm
dd2dc6b2ee
Add sentToSelf to BalanceHistory
2020-05-21 18:05:16 +02:00
Martin Boehm
c43a7a4feb
Merge branch 'gomod' of https://github.com/dajohi/blockbook into gomod
2020-03-21 01:17:42 +01:00
Martin Boehm
2a3c5426ca
Improve remove empty map on websocket unsubscribe
2020-03-17 00:08:00 +01:00
Kirill Fomichev
c2e32b0a25
Remove empty map on address unsubscribe
2020-03-16 23:58:45 +01:00
David Hill
13527bda06
build: go module support
2020-03-05 11:54:42 -05:00
Martin Boehm
e47fd242cf
Add option for lightweight tx details (txslight) to address API #381
2020-03-04 10:45:10 +01:00
Martin Boehm
a6c01534f2
Add filter by contract to get address API #379
2020-03-04 00:37:16 +01:00
Martin Boehm
2e37cbb974
Insert utxos in the right order in disconnect block
2020-02-24 23:11:46 +01:00
Vladyslav Burzakovskyy
f0ccab3e01
getFiatRatesForTimestamps: remove empty currencies from the currency slice
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
9455417e8b
public_test.go: add another test case for /api/v2/tickers
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
4b63b483e4
fiatRates: always return rates as a map, even if the ticker is unavailable
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
4ca66f3b1d
fiatRates: accept an array of strings everywhere and return all available rates if it's empty
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
4b564510e0
balanceHistory: return all currencies if the "currency" parameter is empty
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
171b7f9b9d
balanceHistory: accept a list of currencies, update tests
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
6f06b549df
balanceHistory: accept Unix timestamps instead of a date string
2020-01-22 15:26:12 +01:00
Vladyslav Burzakovskyy
29af6eb34d
currencyRates: make websocket "currency" arguments case-insensitive, like in REST API
2020-01-08 17:57:47 +01:00
Martin
20459a2f46
Fix groupBy parameter parsing
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
94977dc5ef
balanceHistory: fix groupBy parameter initialization
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
6919055e30
balanceHistory: sanitize the groupBy parameter in websocket API
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
918e032bfe
balanceHistory: add "groupBy" parameter
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
d162348d36
fiatRates: update tests according to 9045a9ef64b43b73accb3dc7306791bc56f1dbde
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
db8e0938df
fiatRates: rename "data_timestamp" field to "ts"
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
9cec5424e7
fiatRates: fields to camelCase, update output format and tests
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
c58b1538d6
fiatRates: timestamps as int64, errors as -1, update field names and tests
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
bc0e95f174
websocket: make allFiatRates parameter string a constant
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
bef572c494
FiatRates: store rates as float64 instead of json.Number
2020-01-08 17:57:47 +01:00
Vladyslav Burzakovskyy
14c64410f7
FiatRates: change input & output time values to Unix timestamps
...
make currency parameter optional, return all rates if it's empty
update tests
2020-01-08 17:57:47 +01:00
Martin Boehm
35c9da1ce8
Improve explorer navbar responsiveness, update copyright year #327 , #343
2020-01-02 17:29:14 +01:00
Martin Boehm
225ac85a2a
Add optional fiat rate to balance history
2019-12-18 00:02:24 +01:00
Martin Boehm
15e2c0bf41
Add websocket method getBalanceHistory
2019-12-17 14:37:24 +01:00
Martin Boehm
1cec22ecba
Merge branch 'master' into balanceHistory
2019-12-17 11:52:33 +01: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
c913a022ef
Add get balance history for xpub
2019-12-03 16:02:20 +01:00
Martin Boehm
62208b9634
Add aggregation to balance history
2019-11-29 19:26:20 +01:00
Martin Boehm
bf3d822b87
Add filter from-to to balance history
2019-11-25 18:34:33 +01:00
Martin Boehm
da714b5299
Fix error message informing about missing Ethereum xpub support #314
2019-11-23 14:34:53 +01:00
Martin Boehm
e4c6d23389
Fix error message informing about missing Ethereum xpub support #314
2019-11-19 11:56:40 +01:00
Martin Boehm
6cfb881a04
Add GetBalanceHistory for an address of bitcoin type
2019-11-04 10:55:00 +01:00
Vladyslav Burzakovskyy
4224aab5f2
Implement the "feestats" endpoint ( #250 )
2019-08-07 13:13:45 +02:00
Martin Boehm
4ba0769433
Add "ping" message to the websocket interface #238
2019-07-19 14:59:03 +02:00
Martin Boehm
104f6f9a9d
Add boolean flag isAddress vin and vout in API #209
2019-06-19 14:16:06 +02:00
Martin Boehm
bf461d0737
Add "gap" parameter to websocket "getAccountInfo" method #206
2019-06-18 12:21:22 +02:00
Martin Boehm
6447cdb1b7
Switch from TREZOR to Trezor according to new design guidelines #201
2019-06-17 15:39:35 +02:00
Martin Boehm
c916d46763
Log context in case of websocket and socketio error
2019-06-10 14:27:11 +02:00
Martin Boehm
d7d596bf4b
Stop passing error details to prometheus metrics
2019-06-04 13:09:15 +02:00
Martin Boehm
6f603e2424
Add prefix to socketio and websocket test names
2019-05-27 12:24:25 +02:00
Martin Boehm
6ec0175937
Refactor totalTokens to usedTokens in API
2019-05-27 12:24:25 +02:00
Martin Boehm
42d3ecdd41
Add test of websocket interface
2019-05-27 12:24:25 +02:00
Martin Boehm
749e534a26
Improve API requests when blockbook in sync with backend
2019-05-27 12:24:25 +02:00
Martin Boehm
917840d6b2
Stop indexing OP_RETURN scripts
2019-05-27 12:24:24 +02:00
Martin Boehm
239ccdfd78
Make websocket interface fields camelCase
2019-05-27 12:24:24 +02:00
Martin Boehm
b348a53664
Make all API fields camelCase
2019-05-27 12:24:24 +02:00
Martin Boehm
4b0addbe98
Preserve socket.io BlockTimestamp backward compatibility
2019-04-05 17:13:56 +02:00
Martin Boehm
4435dbbfb4
Pass correct blockchain object to mempool
2019-04-03 22:08:32 +02:00
Martin Boehm
987aec47f9
Show mempool content in explorer
2019-04-02 11:39:38 +02:00
Martin Boehm
ce3c7c5e66
Extract mempool interface from blockchain
2019-03-25 16:43:57 +01:00
Martin Boehm
df952ffb05
Update api.GetBlock to support ethereum type coins
2019-03-21 09:36:18 +01:00
Martin Boehm
bae1050ce4
Log error from api json encode
2019-03-20 18:04:52 +01:00
Martin Boehm
846b20c795
Unify processing of query parameters in address and xpub api
2019-03-18 18:23:03 +01:00
Martin Boehm
133d6f9c59
Specify default page size for websocket getAccountInfo
2019-03-14 21:03:08 +01:00
Martin Boehm
bd89ab8256
Add getTransactionSpecific to websocket interface
2019-03-01 15:37:38 +01:00
Martin Boehm
1c35c632cb
Add tokens to return level choice to websocket interface
2019-03-01 15:25:16 +01:00
Martin Boehm
7b590d9958
Unify AccountDetails levels in GetAccount and GetXpub api calls
2019-02-28 15:07:07 +01:00
Martin Boehm
88d9e09ad4
Highlight own ethereum addresses in explorer like in xpub explorer
2019-02-14 14:53:35 +01:00
Martin Boehm
593247c364
Fix public interface xpub test
2019-02-13 18:34:31 +01:00
Martin Boehm
b8672a0fff
Add public interface test for xpub functionality
2019-02-13 18:10:29 +01:00
Martin Boehm
4846af9f60
Control token detail level returned by xpub api
2019-02-12 15:15:10 +01:00
Martin Boehm
63fb910ecb
Add xpub handling to websocket interface
2019-02-11 11:54:34 +01:00
Martin Boehm
6b0a4960fd
Get utxo for xpub
2019-02-08 15:50:37 +01:00
Martin Boehm
266b0575b6
Highlight xpub addresses in explorer
2019-02-04 16:53:49 +01:00
Martin Boehm
57b40ad6dc
Hide xpub addresses with zero balance in explorer by default
2019-01-31 15:04:09 +01:00
Martin Boehm
8f1f1c87ac
Modify the discovery of xpub addresses
2019-01-31 08:30:18 +01:00
Martin Boehm
225830d3e9
Implement GetAddressForXpub and xpub explorer view - WIP
2019-01-30 17:56:15 +01:00
Martin Boehm
b593643f63
Return Coinbase from API and Websocket interface
2019-01-17 20:30:18 +01:00
Martin Boehm
d1f30e27cf
Handle nil amounts in socket.io interface
2019-01-17 19:58:59 +01:00