0xB10C / memo

Bitcoin mempool.observer Website
https://mempool.observer/
GNU Affero General Public License v3.0
71 stars 23 forks source link

Add a "I'm feeling lucky" button to allow users to examine random transactions #16

Closed timothyylim closed 5 years ago

timothyylim commented 5 years ago

Users may want to see how memo works but not actually have a txid on hand.

We could add an additional button to grab a random tx from the mempool and visualise it.

Could you make an endpoint @0xB10C and I'll fix the front end?

0xB10C commented 5 years ago

I'd rather not build a extra API endpoint to query the underlying memo-Bitcoin node. We visualize the memo-Bitcoin node mempool, but use the transaction information from the blockstream.info API. If I get a random transaction from the memo-node it might not be in Blockstreams mempool. So I guess it would be better to query the blockstream.info API for that.

It seems as this API endpoint can be used: https://blockstream.info/api/mempool/recent. It shows 10 transactions from their mempool. We could just pick one at random and display it from there.

For the front end I'd make it clear that is some sort of demo. Maybe add a button in the navbar header next to the commented out darkmode. Another option would be to add it as an alert card similar to the WIP notice below. I guess one possibility would be to add it as a button next to the search button. You'd need a icon that clearly shows that is a demo or picking something by itself. Maybe something like a dice could work.

I'd favor the dice button with a description while hovering over it as long as it's clear.

timothyylim commented 5 years ago

Very good point. Will think about it and make a PR.