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
Martin Boehm
9af314f7aa
Add websocket method getTransaction
2019-01-16 16:10:30 +01:00
Martin Boehm
1c29283bf0
Add getAccountUtxo method to websocket interface
2019-01-14 17:12:33 +01:00
Martin Boehm
3ca593aff1
Handle error tx not found #94
2019-01-10 16:39:36 +01:00
Martin Boehm
d77fb35bb5
Minify explorer html templates
2019-01-09 15:20:05 +01:00
Martin Boehm
00c1fd6661
Limit number of found transactions for address by page size
2019-01-09 11:48:19 +01:00
Martin Boehm
2c3af5129e
Generalize tokens instead of ERC20 tokens in API
2019-01-07 15:45:00 +01:00
Martin Boehm
1e8506bdf7
Add websocket method getBlockHash
2019-01-04 16:10:24 +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
2552a429e8
Store data in addresses column in more compact way
2019-01-03 17:19:56 +01:00
Martin Boehm
4e040cb1f0
Store addresses in reverse order for newest blocks to be searched first
2018-12-20 17:33:13 +01:00
Martin Boehm
81e105dd4f
Refactor tx api
2018-12-19 13:59:18 +01:00
Martin Boehm
bab500d3f8
Notify on mempool erc20 transfer transaction
2018-12-19 10:06:25 +01:00
Martin Boehm
7edea80209
Add estimateFee method to websocket interface
2018-12-18 09:52:46 +01:00
Martin Boehm
3ff1a86ab1
Add option TxHistoryLight to api.GetAddress
2018-12-17 13:20:10 +01:00
Martin Boehm
f332c0aa9e
Add getInfo websocket method
2018-12-16 00:26:41 +01:00
Martin Boehm
a04b2b67b5
Filter address transactions by height from-to and contract
2018-12-14 16:42:35 +01:00
Martin Boehm
e9e6b472b6
Keep api v1 as compatible with blockbook 0.1.x, add api v2
2018-12-13 14:31:34 +01:00
Martin Boehm
9c142663ce
Add type api.Amount for proper formatting of amounts in json
2018-12-13 00:41:58 +01:00
Martin Boehm
d01081fd83
Allow websocket connections from all origins
2018-12-11 12:14:05 +01:00
Martin Boehm
4b39519750
Change websocket address subscription behavior
2018-12-11 11:50:43 +01:00
Martin Boehm
13f7b48ae6
Add websocket interface
2018-12-10 17:22:37 +01:00
Martin Boehm
75e2ffa025
Add websocket implementation WIP
2018-12-10 00:26:04 +01:00
Martin Boehm
70559ab9e0
Update api.GetAddress to return more ethereum specific data
2018-12-06 13:14:46 +01:00
Martin Boehm
0e1725321d
Fix public_test
2018-12-05 12:02:41 +01:00
Martin Boehm
55ae22bab1
Add socketio method getAccountInfo
2018-12-05 11:41:07 +01:00
Martin Boehm
9a04c862d6
Filter address transactions by input/output or token
2018-12-04 11:54:15 +01:00
Martin Boehm
fead52881f
Show ERC20 contracts for address
2018-12-03 15:48:07 +01:00
Martin Boehm
463eab9d2d
Show ethereum specific data in tx detail in explorer
2018-11-28 14:56:45 +01:00
Martin Boehm
995d169172
Merge branch 'master' into ethereum
2018-11-26 13:04:13 +01:00
Martin Boehm
14efbb02b0
Show empty amounts as zero
2018-11-26 11:26:52 +01:00
Martin Boehm
7a990f9b5b
Implement explorer for EthereumType coin - WIP
2018-11-26 00:20:01 +01:00
Martin Boehm
8886256d0b
Implement index v3 for ethereum type coin
2018-11-23 22:16:32 +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
446ba5cd9d
Remove outputs spent by mempool tx from GetAddressUtxo
2018-11-15 15:44:28 +01:00
Martin Boehm
f1affaf92e
FIx GetAddressUtxo
2018-11-14 23:02:42 +01:00
Martin Boehm
8bf5837b26
Implement address utxo api call #83
2018-11-14 14:46:42 +01:00
Martin Boehm
2dca694f95
Show valid address with zero transaction in explorer #82
2018-11-05 11:26:23 +01:00
Martin Boehm
d7b1c9e09a
Return spent output flag in apiTx
2018-10-26 15:52:12 +02:00
Martin Boehm
77c64e97b6
Add apiSendTx via POST request
2018-10-25 19:40:07 +02:00
Martin Boehm
ab3e1b6172
Modify apiTx to not to return spending txs by default
2018-10-25 18:32:03 +02:00
Martin Boehm
d1176e17d1
Implement apiSendTx and apiEstimateFee
2018-10-25 18:26:51 +02:00
Martin Boehm
4422661918
Implement Send Transaction in explorer
2018-10-22 15:41:27 +02:00
Jakub Matys
ab0eb65de0
Fixed issues reported by goreportcard.com
2018-10-22 10:39:29 +02:00
Martin Boehm
c6316ca10f
Remove public server test dependecy on locale settings
2018-10-19 16:46:06 +02:00
Martin Boehm
017c6b3736
Add socket.io unit tests
2018-10-19 16:37:49 +02:00
Martin Boehm
c852214407
Complete explorer/api unit tests
2018-10-19 16:37:49 +02:00
Martin Boehm
9fd647014a
Add test explorerAddress, explorerSpendingTx, explorerBlocks
2018-10-19 16:37:48 +02:00
Martin Boehm
a6dce9f770
Add unit test for explorerTx, explorerBlock, explorerIndex
2018-10-19 16:37:48 +02:00
Martin Boehm
cc11ae1e57
Setup public http server test
2018-10-19 16:37:48 +02:00
Martin Boehm
8140af1a69
Show coin specific transaction data in explorer and api
2018-10-16 12:25:31 +02:00
Jakub Matys
3b696d677e
Text data (about, URL of TOS) stored in plain text files
2018-10-15 12:51:04 +02:00
wlc-
3ad9b33b17
Add txid to inputs
2018-10-10 20:36:13 +02:00
Martin Boehm
a16ef2904e
Use coin label in the explorer header
2018-10-10 00:23:31 +02:00
Martin Boehm
84b457b34a
Use TxAddresses index in TxCache
2018-10-08 14:55:21 +02:00
Martin Boehm
384d24c6c2
Fix socketio_test
2018-10-08 00:46:55 +02:00
Martin Boehm
f9809d7507
Return inputs for socket.io getAddressHistory and getDetailedTransaction
2018-10-06 23:35: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
44da0c8c41
Show spending transactions in explorer
2018-09-27 13:44:13 +02:00
Martin Boehm
ded10477a8
Serve favicon on internal interface to avoid expensive calls to index
2018-09-26 11:44:42 +02:00
Martin Boehm
c170298e49
Return http status code 500 for internal errors
2018-09-24 14:06:58 +02:00
Martin Boehm
f5ce0b681e
Limit explorer status page in initial sync
2018-09-21 08:51:41 +02:00
Martin Boehm
8ad6d1d52c
Remove /explorer part from URL, blockbook status with external explorer
2018-09-20 22:07:42 +02:00
Martin Boehm
d6b9cd496b
Start public interface in limited mode before initial sync #51
2018-09-20 12:15:46 +02:00
Martin Boehm
bb48f2d26e
Cleanup of internal http interface
2018-09-19 15:59:49 +02:00
Martin Boehm
d87d52b2fd
Add view of block to explorer
2018-09-17 18:28:08 +02:00
Martin Boehm
f80c4d572e
Add application status page to explorer
2018-09-17 11:17:40 +02:00
Martin Boehm
bebddbcd11
Implement list of blocks
2018-09-14 12:10:03 +02:00
Martin Boehm
e07b020c16
Add metrics to explorer
2018-09-14 00:18:13 +02:00
Martin Boehm
435b6f4e80
Show search results using redirect in explorer
2018-09-14 00:13:25 +02:00
Martin Boehm
c6462bb0e7
Add search for tx/address to explorer
2018-09-13 14:25:24 +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
fb0c766ee4
Add paging to explorer
2018-09-05 15:13:45 +02:00
Martin Boehm
82c64ae947
Make satoshi amounts signed in socketio
2018-08-30 13:19:50 +02:00
Martin Boehm
af6de32165
Use indexv3 in socketio getDetailedTransaction
2018-08-30 13:06:49 +02:00
Martin Boehm
2f0e4e2a0f
Fix test tags
2018-08-30 13:06:11 +02:00
Martin Boehm
be19523065
Refactor of address handling, renamed addrID to addr descriptor addrDesc
2018-08-29 15:31:19 +02:00
Martin Boehm
7d708ef868
Unify handling and error handling of pages in public interface
2018-08-24 16:17:43 +02:00
Martin Boehm
bbc47db6dd
Get address data for explorer using index v3 - WIP
2018-08-21 10:11:27 +02:00
Martin Boehm
b464f282a9
Use big.Int for all amounts
2018-07-24 15:58:37 +02:00
Martin Boehm
f2274ce43c
Add paging to api.GetAddress, fix incorrect computation of balance
2018-07-20 19:07:43 +02:00
Martin Boehm
6fb71a7734
Highlight inputs/outputs of shown address
2018-07-02 14:41:37 +02:00
Martin Boehm
7e68630377
Add initial implementation of address explorer
2018-06-30 02:02:16 +02:00
Martin Boehm
20643756e5
Fix formatting of amounts in explorer
2018-06-28 22:41:46 +02:00
Martin Boehm
ce5462118c
Add initial implementation of tx explorer
2018-06-28 21:18:52 +02:00
Martin Boehm
22b7289fa6
Add coin shortcut description
2018-06-28 00:36:56 +02:00
Martin Boehm
d303a4bb09
Display tx summary in explorer
2018-06-28 00:08:33 +02:00
Martin Boehm
96ad79eee5
Design base explorer page - header and footer
2018-06-27 14:10:34 +02:00
Martin Boehm
b52b861db2
Add initial tx explorer template + favicon
2018-06-27 00:44:23 +02:00
Martin Boehm
604b41f10a
Add explorer api worker
2018-06-26 13:02:53 +02:00
Martin Boehm
9bd1b374a7
Refactor https and socketio to internal and public interface
2018-06-21 15:37:46 +02:00
Martin Boehm
6078744489
Join paths correcty in socketio.redirect
2018-06-18 18:21:18 +02:00
Jakub Matys
9409907f80
Tests are classified by tags
2018-06-14 17:27:03 +02:00
Martin Boehm
9401840aca
Recover from panic in onMessage and onSubscribe socket.io methods
2018-06-12 22:58:37 +02:00
Martin Boehm
d4cd2ad607
Return state information for index request on internal http server
2018-06-12 22:57:46 +02:00
Martin Boehm
9c01962001
Return coin_name in socket.io getInfo response
2018-06-05 16:21:54 +02:00
Martin Boehm
5a114bf622
Return hostname in status page
2018-05-30 14:44:59 +02:00